/* mark-glass */
.mark-glass {
    --mark-glass--blur: 8px;
    background: linear-gradient(
            217deg,
            rgba(245, 245, 255, 0.3),
            rgba(255, 0, 0, 0) 70.71%
    ),
    linear-gradient(
            127deg,
            rgba(250, 250, 255, 0.2),
            rgba(0, 255, 0, 0) 70.71%
    ),
    linear-gradient(
            336deg,
            rgba(255, 255, 255, 0.1),
            rgba(0, 0, 255, 0) 70.71%
    ) !important;
    backdrop-filter: blur(var(--mark-glass--blur));
    -webkit-backdrop-filter: blur(var(--mark-glass--blur));
}

/* mark-backdrop */

.mark-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fill-color);
    z-index: 999999;
}

/* mark-status-code */

.mark-status-code {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--fill-color);
}

/* mark-badge */

.mark-badge {
    --badge-fill-somevalue: red;
    --badge-color-somevalue: white;
    --badge-fill-highlight: #ffd800;
    --badge-color-highlight: #000;
    --badge-fill-lowlight: #000;
    --badge-color-lowlight: #fff;
    --badge-ellipsis-max-width: 200px;

    display: flex;
    width: auto;
    min-width: 50px;
    width: auto;
    height: 100%;
    max-height: 26px;
    border-radius: 1000px;

    overflow: hidden;
    align-items: center;
    user-select: none;
    white-space: nowrap;

    position: relative;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: initial;
    font-variation-settings: var(--type-ramp-base-font-variations);
    background: var(--neutral-fill-stealth-rest);
    box-sizing: border-box;
    color: var(--neutral-foreground-rest);
}

.mark-badge span {
    padding: 3px 14px;
}

.mark-badge svg {
    width: 14px;
    min-width: 14px;
    fill: var(--accent-fill-rest);
    cursor: pointer;
}
.mark-badge > *:nth-child(1):is(svg) {
    margin-left: 5px;
    margin-right: 3px;
}
.mark-badge > *:nth-child(1):is(svg) + span {
    padding-left: 0px;
}
.mark-badge > span:has(+ svg) {
    padding-right: 0px;
}
.mark-badge > span:has(+ svg) + svg {
    margin-right: 5px;
    margin-left: 3px;
}

.mark-badge[size="small"] {
    max-height: 20px;
    font-size: var(--type-ramp-minus-1-font-size);
    line-height: var(--type-ramp-minus-1-line-height);
    font-variation-settings: var(--type-ramp-minus-1-font-variations);
}

.mark-badge[size="small"] svg {
    width: 12px;
    min-width: 12px;
}

.mark-badge[size="small"] span {
    padding: 2px 10px;
}

.mark-badge[size="large"] {
    max-height: 30px;
    font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    font-variation-settings: var(--type-ramp-plus-1-font-variations);
}

.mark-badge[size="large"] svg {
    width: 16px;
    min-width: 16px;
}

.mark-badge[size="large"] span {
    padding: 5px 16px;
}
.mark-badge[size="large"] > *:nth-child(1):is(svg) {
    margin-left: 7px;
    margin-right: 3px;
}
.mark-badge[size="large"] > span:has(+ svg) + svg {
    margin-right: 7px;
    margin-left: 3px;
}

.mark-badge[ellipsis],
.mark-badge.mark-badge--ellipsis {
    white-space: normal;
    max-width: var(--badge-ellipsis-max-width);
}
.mark-badge[ellipsis] span,
.mark-badge.mark-badge--ellipsis span {
    text-overflow: ellipsis;
    overflow: hidden;
    display: box;
    -webkit-line-clamp: 1;
    /* stylelint-disable-next-line property-no-unknown */
    box-orient: vertical;
    /* stylelint-disable-next-line property-no-vendor-prefix */
    -webkit-box-orient: vertical;
    /* stylelint-disable-next-line value-no-vendor-prefix */
    display: -webkit-box;
}

.mark-badge[appearance="lightweight"] {
    background: transparent;
    color: var(--neutral-foreground-rest);
    font-weight: 600;
}
.mark-badge[appearance="accent"] {
    background: var(--accent-fill-rest);
    color: var(--foreground-on-accent-rest);
}
.mark-badge[appearance="accent"] svg {
    fill: var(--foreground-on-accent-rest);
}
.mark-badge[appearance="neutral"] {
    background: var(--neutral-fill-secondary-rest);
    color: var(--neutral-foreground-rest);
}
.mark-badge[appearance="red"] {
    color: var(--badge-color-somevalue);
    background-color: var(--badge-fill-somevalue);
}
.mark-badge[appearance="red"] svg {
    fill: var(--badge-color-somevalue);
}
.mark-badge[appearance="highlight"] {
    color: var(--badge-color-highlight);
    background-color: var(--badge-fill-highlight);
}
.mark-badge[appearance="highlight"] svg {
    fill: var(--badge-color-highlight);
}
.mark-badge[appearance="lowlight"] {
    color: var(--badge-color-lowlight);
    background-color: var(--badge-fill-lowlight);
}

.mark-badge.mark-badge--outline {
    background-color: transparent;
    color: var(--neutral-foreground-rest);
    border: 1px solid var(--neutral-foreground-rest);
}

.mark-badge.mark-badge--outline[appearance="lightweight"] {
    background-color: transparent;
    border: transparent;
}
.mark-badge.mark-badge--outline[appearance="accent"] {
    border-color: var(--accent-fill-rest);
    color: var(--accent-fill-rest);
}
.mark-badge.mark-badge--outline[appearance="accent"] svg {
    fill: var(--accent-fill-rest);
}
.mark-badge.mark-badge--outline[appearance="red"] {
    border-color: var(--badge-fill-somevalue);
    color: var(--badge-fill-somevalue);
}
.mark-badge.mark-badge--outline[appearance="red"] svg {
    fill: var(--badge-fill-somevalue);
}
.mark-badge.mark-badge--outline[appearance="highlight"] {
    color: var(--badge-fill-highlight);
    border-color: var(--badge-fill-highlight);
}
.mark-badge.mark-badge--outline[appearance="highlight"] svg {
    fill: var(--badge-fill-highlight);
}
.mark-badge.mark-badge--outline[appearance="lowlight"] {
    color: var(--badge-fill-lowlight);
    border-color: var(--badge-fill-lowlight);
}

/* mark-grid */

.mark-grid {
    --mark-grid--gap: 8px;
    --mark-grid--gap: 8px;
    --mark-grid--card-min-width: 300px;
    --mark-grid--card-max-width: 500px;

    display: flex;
    gap: var(--mark-grid--gap);
}

.mark-grid.mark-grid--bordered .mark-grid__card {
    border: calc(var(--stroke-width) * 1px) solid
    var(--neutral-stroke-layer-rest);
}

.mark-grid .mark-grid__column {
    display: flex;
    flex-direction: column;
    gap: var(--mark-grid--gap);
}

.mark-grid__card {
    display: flex;
    flex-direction: column;
    contain: content;
    height: auto;
    width: auto;
    min-width: var(--mark-grid--card-min-width, none);
    max-width: var(--mark-grid--card-max-width, none);

    box-sizing: border-box;
    background: var(--fill-color);
    color: var(--neutral-foreground-rest);
    border-radius: calc(var(--layer-corner-radius) * 1px);
    box-shadow: var(--elevation-shadow-card-rest);
    padding: calc(var(--design-unit) * 5px);
}

.mark-grid__card .mark-grid__card__title {
    font-size: var(--type-ramp-plus-3-font-size);
    line-height: var(--type-ramp-plus-3-line-height);
    font-weight: 500;
    font-family: var(--body-font);
    margin-bottom: 1rem;
}

.mark-grid__card .mark-grid__card__text {
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: 400;
    font-family: var(--body-font);
    margin-bottom: 1rem;
}

.mark-grid__card svg {
    fill: var(--neutral-foreground-rest);
    width: var(--type-ramp-plus-3-font-size);
    height: var(--type-ramp-plus-3-font-size);
}


.mark-grid__composite-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mark-grid__composite-card .mark-grid__card {
    border-radius: 0;
}

.mark-grid__composite-card .mark-grid__card:first-child {
    border-top-left-radius: calc(var(--layer-corner-radius) * 1px);
    border-top-right-radius: calc(var(--layer-corner-radius) * 1px);
}

.mark-grid__composite-card .mark-grid__card:last-child {
    border-bottom-left-radius: calc(var(--layer-corner-radius) * 1px);
    border-bottom-right-radius: calc(var(--layer-corner-radius) * 1px);
}

.mark-grid__composite-card
.mark-grid__card.mark-grid__card--row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: calc(var(--design-unit) * 5px);
}

.mark-grid__composite-card
.mark-grid__card.mark-grid__card--button {
    will-change: background;
    transition: background 0.4s;
    cursor: pointer;
}

.mark-grid__composite-card
.mark-grid__card.mark-grid__card--button:hover {
    background: padding-box
    linear-gradient(
            var(--neutral-fill-hover),
            var(--neutral-fill-hover)
    ),
    border-box var(--neutral-stroke-control-hover);
}


.mark-grid__composite-card
.mark-grid__card.mark-grid__card--row
.mark-grid__card--row__left-icon {
    fill: var(--neutral-foreground-rest);
    width: var(--type-ramp-plus-3-font-size);
    height: var(--type-ramp-plus-3-font-size);
}


.mark-grid__composite-card
.mark-grid__card.mark-grid__card--row
.mark-grid__card--row__text {
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: 500;
    font-family: var(--body-font);
}


.mark-grid__composite-card
.mark-grid__card.mark-grid__card--row
.mark-grid__card--row__right-icon {
    margin-left: auto;
}

/* ai editor */

.ai-editor-wrapper {
    position: relative;
}

.ai-editor-prediction-tooltip {
    position: absolute;
    left: 0;
    max-width: 100%;
    padding: 8px 12px;
    background-color: var(--neutral-layer-2);
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    z-index: 100;
    pointer-events: none;
}

.ai-editor-prediction-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* ai editor */

/* table */
th > .keycapture {
    width: 100% !important;
}