/* Shared decorative Sources panel — docked DevTools structure with eekseye red accent.
   Visual only. Distinct gray panel beside the site, not blended into the page. */

html.has-site-devtools {
    --dt-panel-w: 48%;
}

/* Neutralize style.css body { transform: scale(1) } so fixed overlays
   (cart, cookies) use the viewport and can stack above the panel. */
html.has-site-devtools body {
    transform: none;
}

@media (max-width: 1180px) and (min-width: 769px) {
    html.has-site-devtools {
        --dt-panel-w: 40%;
    }
}

/* Leave page content in the left (or upper) column so nothing sits under the panel. */
@media (min-width: 769px) {
    html.has-site-devtools {
        overflow-x: hidden;
    }
    html.has-site-devtools body {
        width: calc(100% - var(--dt-panel-w));
        max-width: calc(100% - var(--dt-panel-w));
        box-sizing: border-box;
    }
    html.has-site-devtools .nav-header,
    html.has-site-devtools .site-header,
    html.has-site-devtools header.site-header,
    html.has-site-devtools .cookie-consent-banner,
    html.has-site-devtools .cookie-settings-panel {
        width: calc(100% - var(--dt-panel-w)) !important;
        max-width: calc(100% - var(--dt-panel-w)) !important;
        right: auto !important;
        left: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    html.has-site-devtools .nav-header-top-row {
        width: 100%;
        max-width: 100%;
    }
    /* Cart/profile drawer stays in the left column; do not cover the panel. */
    html.has-site-devtools .eeks-profile-overlay {
        right: var(--dt-panel-w) !important;
    }
}



.site-devtools {
    --dt-bg: #202124;
    --dt-toolbar: #3c3c3c;
    --dt-toolbar-left: #444746;
    --dt-border: #0f0f0f;
    --dt-rule: #3c3c3c;
    --dt-text: #e8eaed;
    --dt-muted: #9aa0a6;
    --dt-dim: #80868b;
    --dt-accent: #c42828;
    --dt-underline: #c42828;
    --dt-hover: rgba(255, 255, 255, 0.07);
    --dt-selected: rgba(196, 40, 40, 0.22);
    --dt-kw: #c42828;
    --dt-str: #ce9178;
    --dt-prop: #9cdcfe;
    --dt-fn: #dcdcaa;
    --dt-num: #b5cea8;
    --dt-com: #6a9955;
    --dt-op: #d4d4d4;
    --dt-err: #f28b82;
    --dt-warn: #fdd663;
    --dt-js: #e8ab53;
    --dt-css: #c586c0;
    --dt-ts: #62a8e8;
    --dt-folder: #dcb67a;
    --dt-ui: 11px;
    --dt-code: 11px;
    position: fixed;
    top: 0;
    right: 0;
    width: var(--dt-panel-w, 48%);
    height: 100%;
    height: 100vh;
    height: 100svh;
    z-index: 40;
    display: flex;
    flex-direction: column;
    background: var(--dt-bg);
    color: var(--dt-text);
    font-family: "Segoe UI", "Roboto", "Helvetica Neue", system-ui, sans-serif;
    font-size: var(--dt-ui);
    line-height: 1.35;
    border-left: 1px solid #5a5a5a;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    animation: siteDevtoolsIn 1.15s ease 0.45s forwards;
    -webkit-font-smoothing: antialiased;
    color-scheme: dark;
}

.site-devtools button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
}

.site-devtools button:focus,
.site-devtools button:focus-visible {
    outline: none;
    box-shadow: none;
}

@keyframes siteDevtoolsIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .site-devtools {
        animation: none;
        opacity: 1;
    }
}



/* Faint crisp scanline — texture only, no blur, does not hide chrome. */
.site-devtools::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    opacity: 0.12;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(255, 255, 255, 0.04) 2px,
        rgba(255, 255, 255, 0.04) 3px
    );
}

.dt-code-row.is-lit {
    background: rgba(196, 40, 40, 0.16);
}
.dt-code-row.is-lit .dt-ln,
.dt-code-row.is-lit .dt-line { color: var(--dt-accent); }
.dt-code-row.is-passing {
    background: rgba(196, 40, 40, 0.10);
}
.dt-code-row.is-passing .dt-ln { color: var(--dt-accent); }
.dt-code-row.is-pulse {
    animation: dtLinePulse 1.35s ease-in-out 2;
}
@keyframes dtLinePulse {
    0%, 100% { background: transparent; }
    50% { background: rgba(196, 40, 40, 0.18); }
}
.dt-whisper {
    position: absolute;
    left: 14px;
    top: 0;
    right: 0;
    color: var(--dt-accent);
    font-family: "Menlo", "Consolas", "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    pointer-events: none;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.85s ease;
}
.dt-whisper.is-fade { opacity: 0; }
.dt-code-row.is-whisper .dt-line > :not(.dt-whisper):not(.dt-caret-blink) { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
    .dt-code-row.is-pulse { animation: none; }
}

/* ----- top tab bar ----- */
.dt-tabbar {
    flex: 0 0 27px;
    height: 27px;
    display: flex;
    align-items: center;
    background: var(--dt-toolbar);
    border-bottom: 1px solid var(--dt-border);
    padding: 0 6px 0 4px;
    gap: 0;
    user-select: none;
    color: #d0d0d0;
}

.dt-tabbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-right: 6px;
    background: var(--dt-toolbar-left);
    margin-left: -4px;
    padding: 0 6px 0 6px;
    height: 100%;
}

.dt-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #c7c7c7;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: default;
    border-radius: 2px;
}

.dt-ico:hover { background: var(--dt-hover); }

.dt-ico svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.dt-tabs {
    display: flex;
    align-items: stretch;
    height: 100%;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.dt-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: #c4c4c4;
    white-space: nowrap;
    font-size: 12px;
    cursor: default;
    height: 100%;
}

.dt-tab:hover { color: #eee; background: rgba(255, 255, 255, 0.04); }

.dt-tab.is-active {
    color: var(--dt-accent);
}

.dt-tab.is-active::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 0;
    height: 2px;
    background: var(--dt-underline);
}

.dt-tabbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    padding-left: 6px;
}

.dt-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    padding: 0 3px;
    color: var(--dt-muted);
}

.dt-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.dt-badge.is-error { color: var(--dt-err); }
.dt-badge.is-error .dt-badge-dot { background: var(--dt-err); }
.dt-badge.is-warn { color: var(--dt-warn); }
.dt-badge.is-warn .dt-badge-dot { background: var(--dt-warn); }

/* ----- second row: page / files ----- */
.dt-subbar {
    flex: 0 0 27px;
    height: 27px;
    display: flex;
    align-items: stretch;
    background: var(--dt-toolbar);
    border-bottom: 1px solid var(--dt-border);
    min-width: 0;
    user-select: none;
}

.dt-panes {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
}

/* tree */
.dt-tree {
    flex: 0 0 188px;
    width: 188px;
    background: var(--dt-bg);
    border-right: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.dt-tree-tabs {
    flex: 0 0 188px;
    width: 188px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    color: #c4c4c4;
    font-size: 12px;
    border-right: 1px solid #1a1a1a;
    box-sizing: border-box;
}

.dt-tree-tab {
    position: relative;
    padding: 4px 7px 6px;
    cursor: default;
}

.dt-tree-tab.is-active {
    color: var(--dt-accent);
}

.dt-tree-tab.is-active::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 0;
    height: 2px;
    background: var(--dt-underline);
}

.dt-tree-scroll {
    flex: 1;
    overflow: auto;
    padding: 2px 0 8px;
}

.dt-tree-row {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 8px 0 4px;
    cursor: pointer;
    color: #d8d8d8;
    white-space: nowrap;
    overflow: hidden;
    border-radius: 0;
}

.dt-tree-row:hover { background: var(--dt-hover); }
.dt-tree-row.is-active {
    background: var(--dt-selected);
    color: #fff;
}

.dt-caret {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    color: #9aa0a6;
    display: inline-flex;
}

.dt-caret.is-empty { visibility: hidden; }

.dt-tree-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dt-tree-icon svg { width: 14px; height: 14px; }

.dt-tree-label {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.dt-tree-children { display: none; }
.dt-tree-children.is-open { display: block; }

/* editor column */
.dt-editor {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--dt-bg);
}

.dt-filetabs {
    flex: 1 1 auto;
    height: auto;
    display: flex;
    align-items: stretch;
    background: transparent;
    border-bottom: 0;
    min-width: 0;
    overflow: hidden;
}

.dt-filetab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    color: #c8c8c8;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    border-right: 1px solid transparent;
}

.dt-filetab:hover { background: rgba(255,255,255,0.04); color: #eee; }

.dt-filetab.is-active {
    color: var(--dt-accent);
    background: var(--dt-bg);
}

.dt-filetab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--dt-underline);
}

.dt-filetab-x {
    font-size: 11px;
    color: #9aa0a6;
    line-height: 1;
    padding: 0 1px;
}

.dt-filetabs-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 4px;
}

.dt-code-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    position: relative;
    background: var(--dt-bg);
    scrollbar-color: #555 #202124;
    scrollbar-width: thin;
}

.dt-code-scroll::-webkit-scrollbar,
.dt-tree-scroll::-webkit-scrollbar,
.dt-side-scroll::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

.dt-code-scroll::-webkit-scrollbar-thumb,
.dt-tree-scroll::-webkit-scrollbar-thumb,
.dt-side-scroll::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border: 2px solid #202124;
}

.dt-code-scroll::-webkit-scrollbar-thumb:hover,
.dt-tree-scroll::-webkit-scrollbar-thumb:hover,
.dt-side-scroll::-webkit-scrollbar-thumb:hover {
    background: #5c5c5c;
}

.dt-code-scroll::-webkit-scrollbar-corner {
    background: #202124;
}

.dt-code-row {
    display: flex;
    align-items: flex-start;
    min-height: 16px;
    line-height: 16px;
}

.dt-code-row.is-current .dt-line {
    background: rgba(255, 255, 255, 0.03);
}

.dt-ln {
    flex: 0 0 36px;
    width: 36px;
    text-align: center;
    color: #6e6e6e;
    font-family: "Menlo", "Consolas", "Courier New", monospace;
    font-size: 11px;
    user-select: none;
    border-right: 1px solid #3a3a3a;
    position: sticky;
    left: 0;
    background: var(--dt-bg);
    z-index: 1;
}

.dt-line {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 10px 0 14px;
    font-family: "Menlo", "Consolas", "Courier New", monospace;
    font-size: var(--dt-code);
    white-space: pre;
    color: #d4d4d4;
    position: relative;
}

.dt-caret-blink {
    display: inline-block;
    width: 1px;
    height: 13px;
    background: var(--dt-accent);
    vertical-align: text-bottom;
    margin-left: 0;
    animation: dtCaret 1.1s step-end infinite;
}

@keyframes dtCaret {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .dt-caret-blink { animation: none; }
}

.dt-tok-kw { color: var(--dt-kw); }
.dt-tok-str { color: var(--dt-str); }
.dt-tok-prop { color: var(--dt-prop); }
.dt-tok-fn { color: var(--dt-fn); }
.dt-tok-num { color: var(--dt-num); }
.dt-tok-com { color: var(--dt-com); }
.dt-tok-op { color: var(--dt-op); }

/* status */
.dt-status {
    flex: 0 0 22px;
    height: 22px;
    display: flex;
    align-items: center;
    background: var(--dt-bg);
    border-top: 1px solid #1a1a1a;
    color: var(--dt-muted);
    font-size: 11px;
    padding: 0 8px;
    user-select: none;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}

.dt-status-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dt-status-pos {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dt-status-right {
    margin-left: auto;
}

/* sidebar */
.dt-side {
    flex: 0 0 156px;
    width: 156px;
    background: var(--dt-bg);
    border-left: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: #c8c8c8;
    user-select: none;
}

.dt-subbar .dt-side-tools {
    flex: 0 0 156px;
    width: 156px;
    height: auto;
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 0 4px;
    border-left: 1px solid #1a1a1a;
    border-bottom: 0;
    color: #c7c7c7;
    box-sizing: border-box;
}

.dt-side-scroll {
    flex: 1;
    overflow: auto;
    padding-bottom: 8px;
}

.dt-sec {
    border-bottom: 1px solid #202020;
}

.dt-sec-h {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px 0 6px;
    font-size: 12px;
    color: #ddd;
    cursor: default;
}

.dt-sec-h:hover { background: var(--dt-hover); }

.dt-sec-body { padding: 0 0 2px; }

.dt-check,
.dt-sec-h {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dt-check {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 20px;
    padding: 0 8px 0 22px;
    font-size: 11px;
    color: #d0d0d0;
}

.dt-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin: 0;
    border: 1px solid #7a7a7a;
    border-radius: 2px;
    background: #1f1f1f;
    display: inline-block;
    position: relative;
    flex: 0 0 12px;
}

.dt-check input:checked {
    background: #c42828;
    border-color: #c42828;
}

.dt-check input:checked::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.dt-paused {
    height: 20px;
    padding: 0 10px 0 22px;
    font-size: 12px;
    font-style: italic;
    color: #8b8b8b;
    display: flex;
    align-items: center;
    background: #242424;
}

/* compact mid-width */
@media (max-width: 1180px) and (min-width: 769px) {
    .dt-tree, .dt-tree-tabs { flex-basis: 132px; width: 132px; }
    .dt-side, .dt-subbar .dt-side-tools { flex-basis: 150px; width: 150px; }
    .dt-tab { padding: 0 6px; font-size: 11px; }
}

/* Mobile: compact code panel docked to the bottom of the viewport on every page. */
@media (max-width: 768px) {
    html.has-site-devtools {
        --dt-panel-w: 0%;
        --dt-panel-h: 35vh;
        scroll-padding-bottom: var(--dt-panel-h);
    }
    html.has-site-devtools body {
        width: 100%;
        max-width: 100%;
        padding-bottom: var(--dt-panel-h);
        box-sizing: border-box;
        scroll-padding-bottom: var(--dt-panel-h);
    }
    /* Cart covers the bottom panel while open so Checkout stays tappable. */
    html.has-site-devtools .eeks-profile-overlay {
        z-index: 10090;
    }
    html.has-site-devtools .nav-header,
    html.has-site-devtools .nav-header-top-row,
    html.has-site-devtools .site-header {
        width: 100% !important;
        max-width: 100% !important;
        right: 0;
    }
    html.has-site-devtools .cookie-consent-banner,
    html.has-site-devtools .cookie-settings-panel {
        width: 100% !important;
        max-width: 100% !important;
        right: 0 !important;
        bottom: var(--dt-panel-h);
    }
    .site-devtools {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: var(--dt-panel-h, 35vh);
        border-left: 0;
        border-top: 1px solid #5a5a5a;
        animation-delay: 0.35s;
        transform: none !important;
        z-index: 40;
    }
    .dt-tree,
    .dt-tree-tabs,
    .dt-side,
    .dt-subbar .dt-side-tools,
    .dt-tabbar-left,
    .dt-tabbar-right .dt-ico,
    .dt-filetabs-end {
        display: none;
    }
    .dt-tabbar { flex-basis: 24px; height: 24px; }
    .dt-tab { font-size: 10px; padding: 0 5px; }
    .dt-subbar,
    .dt-filetabs { flex-basis: 24px; height: 24px; }
}

