.offset-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.offset-input label {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
}

/* Global override: force FluentSelect and FluentCombobox dropdowns to open downwards */
.fluent-select__listbox,
.fluent-combobox__listbox {
    top: 100% !important;
    bottom: auto !important;
    position: absolute !important;
}
/* Force FluentSelect and FluentCombobox dropdowns to open downwards */
.overlay-select .fluent-select__listbox,
.readonly-combo .fluent-combobox__listbox {
    top: 100% !important;
    bottom: auto !important;
}
/* Fluent styles are already included via DevToolkit.styles.css reference in index.html */

body {
    --body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    margin: 0;
}

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - 86px);
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}

.body-content {
    align-self: stretch;
    height: calc(100dvh - 86px) !important;
    display: flex;
}

.content {
    padding: 0.5rem 1.5rem;
    align-self: stretch !important;
    width: 100%;
}

footer {
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest);
    align-items: center;
    padding: 10px 10px;
}

    footer a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        footer a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        footer a:hover {
            text-decoration: underline;
        }

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHh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Nzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA8ODcuMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::before {
    content: "An error has occurred. "
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.header {
    /* background-color: var(--shell-background); */
    --accent-fill-rest: var(--shell-background);
}

/* fluent-header {
        --accent-fill-rest: var(--shell-background);
    }

    fluent-header::part(control) {
        background-color: var(--shell-background);
    } */

@media (max-width: 600px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }
}

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}


:root {
    --shell-background: #f5f5f7;
    --shell-foreground: #101828;
}

body[data-theme='dark'] {
    --shell-background: #1e1e1e;
    --shell-foreground: #f1f5f9;
    --neutral-layer-1: red;
    --neutral-layer-2: yellow;
    --accent-fill-rest: #007acc;
    color: var(--shell-foreground);
    background-color: var(--shell-background);
}

body[data-theme='dark'] fluent-card {
    --fill-color: #252526;
}

/*    body[data-theme='dark'] fluent-button {
        --accent-fill-rest: #007acc;
        --accent-fill-hover: #007acc;
        --accent-fill-pressed: #007acc;
        --accent-foreground-rest: #007acc;
    }
        body[data-theme='dark'] fluent-button[appearance="outline"] {
            --neutral-fill-rest: red;
            --neutral-foreground-rest: #e2e8f0;
        }*/

.diff-output {
    font-family: Consolas, "Segoe UI Mono", monospace;
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 8px;
    background-color: var(--neutral-layer-1, #f4f6fb);
    max-height: 420px;
    overflow: auto;
    margin-top: 12px;
}

.diff-line {
    display: flex;
    gap: 12px;
    padding: 4px 12px;
    border-top: 1px solid rgba(16, 24, 40, 0.06);
    align-items: flex-start;
}

.diff-line:first-child {
    border-top: none;
}

.diff-line-marker {
    width: 20px;
    text-align: center;
    font-weight: 600;
}

.diff-line pre {
    margin: 0;
    white-space: pre-wrap;
    flex: 1;
}

.diff-char-inserted {
    background-color: rgba(16, 185, 129, 0.35);
}

.diff-char-deleted {
    background-color: rgba(248, 113, 113, 0.4);
}

.diff-char-modified {
    background-color: rgba(250, 204, 21, 0.45);
}

.diff-line-inserted {
    background-color: rgba(16, 185, 129, 0.18);
}

.diff-line-deleted {
    background-color: rgba(248, 113, 113, 0.2);
}

.diff-line-modified {
    background-color: rgba(250, 204, 21, 0.25);
}

.diff-line-unchanged {
    background-color: transparent;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.palette-card {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 10px;
    overflow: hidden;
    background-color: var(--neutral-layer-1, #f9fafb);
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.palette-chip {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.palette-meta {
    padding: 8px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contrast-status {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contrast-status span {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.contrast-pass {
    background-color: #ecfdf3;
    color: #065f46;
    border-color: #bbf7d0;
}

.contrast-fail {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.contrast-preview {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.preview-chip {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
}

.timezone-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.timezone-datetime-input {
    padding: 10px 12px;
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: var(--neutral-layer-1, #fff);
    color: inherit;
}

.timezone-datetime-input:focus {
    outline: 2px solid var(--accent-fill-rest, #2563eb);
    border-color: var(--accent-fill-rest, #2563eb);
}

.timezone-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 12px;
    overflow: hidden;
}

.timezone-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr auto;
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid rgba(16, 24, 40, 0.08);
    align-items: center;
}

.timezone-row:first-child {
    border-top: none;
}

.timezone-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timezone-row-main span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.timezone-row-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timezone-time {
    font-size: 1rem;
    font-weight: 600;
}

.timezone-offset {
    font-size: 0.85rem;
    opacity: 0.75;
}

.timezone-row-delta {
    font-weight: 600;
    color: var(--accent-fill-rest, #2563eb);
}

.participant-table {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.participant-row {
    display: grid;
    grid-template-columns: 2fr 2fr auto auto;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(16, 24, 40, 0.08);
    align-items: center;
}

.participant-row:first-child {
    border-top: none;
}

.participant-main,
.participant-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.participant-day {
    font-size: 0.82rem;
    opacity: 0.75;
}

.participant-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.status-pass {
    background-color: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.status-warn {
    background-color: rgba(251, 191, 36, 0.25);
    color: #92400e;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.slot-card {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 12px;
    padding: 14px;
    background-color: var(--neutral-layer-1, #fff);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slot-head {
    font-weight: 600;
}

.slot-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slot-card li {
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.slot-day {
    font-size: 0.8rem;
    opacity: 0.75;
}

.convert-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

fluent-card.convert-card {
    width: 100%;
    display: block;
}

@media (min-width: 840px) {
    .convert-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
    }

    .convert-grid fluent-card {
        height: 100%;
        width: 100%;
        display: block;
    }
}

.schema-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

fluent-card.schema-card {
    width: 100%;
    display: block;
}

@media (min-width: 840px) {
    .schema-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .schema-grid fluent-card {
        height: 100%;
        width: 100%;
    }
}

.duration-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.duration-input {
    padding: 10px 12px;
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: var(--neutral-layer-1, #fff);
    color: inherit;
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    width: 100%;
}

.duration-card {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 10px;
    padding: 12px 14px;
    background-color: var(--neutral-layer-1, #f9fafb);
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

.duration-card-label {
    font-size: 0.85rem;
    opacity: 0.75;
}

.duration-card-value {
    font-size: 1.35rem;
    font-weight: 600;
}

.duration-card-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.timeline-list {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-row {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid rgba(16, 24, 40, 0.06);
}

.timeline-row:first-child {
    border-top: none;
}

.timeline-row-label {
    font-weight: 600;
}

.timeline-row-value {
    font-size: 0.95rem;
}

.timeline-row-hint {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: right;
}

.offset-summary {
    border: 1px dashed var(--accent-fill-rest, #2563eb);
    border-radius: 12px;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.offset-summary div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.offset-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.offset-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.offset-hint {
    font-size: 0.8rem;
    opacity: 0.7;
}

.breakdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.breakdown-item {
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 10px;
    padding: 12px 14px;
    background-color: var(--neutral-layer-1, #fff);
}

.breakdown-item-head {
    font-weight: 600;
    margin-bottom: 6px;
}

.breakdown-item-body {
    font-size: 0.9rem;
    opacity: 0.85;
}

fluent-tabs {
    width: 100%;
    display: block;
}

.cron-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.cron-input {
    padding: 10px 12px;
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: var(--neutral-layer-1, #fff);
    color: inherit;
}

.cron-input:focus {
    outline: 2px solid var(--accent-fill-rest, #2563eb);
    border-color: var(--accent-fill-rest, #2563eb);
}

.cron-summary {
    margin: 8px 0 0;
    font-size: 1rem;
    line-height: 1.4;
}

.cron-breakdown-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cron-breakdown-list code {
    font-family: Consolas, "Segoe UI Mono", monospace;
    background-color: var(--neutral-layer-1, #f3f4f6);
    padding: 2px 6px;
    border-radius: 6px;
}

.cron-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.cron-reference-grid ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.cron-reference-grid li {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.har-controls-grid,
.har-sanitizer-grid,
.har-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.summary-label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.har-pre {
    background-color: var(--neutral-layer-1, #0f172a0d);
    border: 1px solid var(--neutral-stroke-strong-rest, #d0d7de);
    border-radius: 8px;
    padding: 12px;
    font-family: Consolas, "Segoe UI Mono", monospace;
    font-size: 0.9rem;
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
}

.status-ok {
    color: #166534;
    font-weight: 600;
}

.status-redirect {
    color: #92400e;
    font-weight: 600;
}

.status-error {
    color: #b91c1c;
    font-weight: 600;
}
