/* ============================================================
   BLACKGLASS SKIN — the search engine wears real brass
   ------------------------------------------------------------
   The engine itself lives in js/blackglass-system.js and its
   layout in computer-styles.css (the "BlackGlass Cinematic Search
   Engine" block). This file only re-skins it with the art kit in
   assets/images/blackglass/: the search bar, the result rows, the
   scrollbar, the divider and the magnifier.

   Loaded AFTER computer-styles.css, so every rule here is a
   deliberate override and the engine still works with this file
   missing — it just goes back to flat CSS boxes.
   ============================================================ */

/* ── SEARCH BAR ────────────────────────────────────────────
   A brass pill. border-image keeps the ornate end caps intact
   while the middle stretches to whatever width the panel has. */
.bg-search-bar {
    background: transparent;
    border: 0;
    border-image-source: url('../assets/images/blackglass/searchbar.png');
    border-image-slice: 30 60 30 60 fill;
    border-image-width: 15px 30px 15px 30px;
    border-image-repeat: stretch;
    border-radius: 0;
    padding: 13px 20px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    transition: filter 0.3s, transform 0.3s;
}
.bg-search-bar:hover,
.bg-search-bar.bg-focused {
    filter: drop-shadow(0 0 10px rgba(200, 164, 94, 0.35));
    transform: translateY(-1px);
}

/* The magnifier that replaced the emoji. */
.bg-search-glass {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
    opacity: 0.9;
}
.bg-search-bar.bg-focused .bg-search-glass {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(200, 164, 94, 0.55));
}

/* ── RESULT ROWS ───────────────────────────────────────────
   Each row sits in the same brass rail as the search bar. */
.bg-result-item {
    border-bottom: 0 !important;
    border-image-source: url('../assets/images/blackglass/rowbar.png');
    border-image-slice: 30 60 30 60 fill;
    border-image-width: 14px 26px 14px 26px;
    border-image-repeat: stretch;
    padding: 10px 18px;
    margin-bottom: 8px;
    transition: filter 0.25s, transform 0.25s;
}
.bg-result-active {
    filter: drop-shadow(0 0 8px rgba(200, 164, 94, 0.22));
}
.bg-result-item:hover {
    transform: translateX(2px);
}

/* The meta line keeps the flourish under it. */
.bg-results-meta {
    padding-bottom: 14px;
    background-image: url('../assets/images/blackglass/divider.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% 9px;
}

/* ── SCROLLBAR ─────────────────────────────────────────────
   Brass track, brass thumb, brass arrows at both ends. */
.bg-results-panel::-webkit-scrollbar,
.bg-article-panel::-webkit-scrollbar,
.bg-channel-content::-webkit-scrollbar { width: 14px; }

.bg-results-panel::-webkit-scrollbar-track,
.bg-article-panel::-webkit-scrollbar-track,
.bg-channel-content::-webkit-scrollbar-track {
    background: url('../assets/images/blackglass/sbtrack.png') center / 10px 100% no-repeat;
}
.bg-results-panel::-webkit-scrollbar-thumb,
.bg-article-panel::-webkit-scrollbar-thumb,
.bg-channel-content::-webkit-scrollbar-thumb {
    background: url('../assets/images/blackglass/sbthumb.png') center / 100% 100% no-repeat;
    border-radius: 0;
    min-height: 34px;
}
.bg-results-panel::-webkit-scrollbar-button:single-button:vertical:decrement,
.bg-article-panel::-webkit-scrollbar-button:single-button:vertical:decrement,
.bg-channel-content::-webkit-scrollbar-button:single-button:vertical:decrement {
    height: 14px;
    background: url('../assets/images/blackglass/sbup.png') center / contain no-repeat;
}
.bg-results-panel::-webkit-scrollbar-button:single-button:vertical:increment,
.bg-article-panel::-webkit-scrollbar-button:single-button:vertical:increment,
.bg-channel-content::-webkit-scrollbar-button:single-button:vertical:increment {
    height: 14px;
    background: url('../assets/images/blackglass/sbdown.png') center / contain no-repeat;
}

/* ── THE SCAN ──────────────────────────────────────────────
   The magnifier comes apart on purpose: while the engine pulls
   results the ring holds still, the four sights turn around it,
   and the sight dot breathes. Then it all goes and the list
   lands. Pure decoration — a click still skips the beat. */
#bg-scan {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(8, 7, 6, 0.72);
    animation: bg-scan-in 0.25s ease both;
    pointer-events: none;
}
#bg-scan.bg-hidden { display: none !important; }

.bg-scan-rig {
    position: relative;
    width: 116px;
    height: 116px;
}
.bg-scan-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: bg-scan-breathe 2.4s ease-in-out infinite;
}
.bg-scan-sights {
    position: absolute;
    inset: 0;
    animation: bg-scan-spin 2.6s linear infinite;
}
.bg-scan-tick {
    position: absolute;
    width: 8px;
    height: 19px;
    left: 50%;
    margin-left: -4px;
}
.bg-scan-tick-n { top: 8px; }
.bg-scan-tick-s { bottom: 8px; }
.bg-scan-tick-w { top: 50%; left: 10px; margin: -4px 0 0 0; width: 19px; height: 8px; transform: rotate(90deg); }
.bg-scan-tick-e { top: 50%; left: auto; right: 10px; margin: -4px 0 0 0; width: 19px; height: 8px; transform: rotate(90deg); }

.bg-scan-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
}
.bg-scan-glow {
    position: absolute;
    width: 26px;
    height: 26px;
    top: 50%;
    left: 50%;
    margin: -13px 0 0 -13px;
    animation: bg-scan-pulse 1.1s ease-in-out infinite;
}
.bg-scan-label {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 0.28rem;
    text-transform: uppercase;
    color: #8a7a5a;
}

@keyframes bg-scan-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes bg-scan-spin  { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bg-scan-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes bg-scan-breathe { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }

/* ── THE FULL LOG ──────────────────────────────────────────
   The dropdown lists what it can fit; this opens the rest.
   One big brass card, one column per category. */
.bg-dropdown-all {
    padding: 8px 14px;
    border-top: 1px solid #2a2520;
    text-align: right;
    font-size: 10px;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    color: #8a7a5a;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.bg-dropdown-all:hover {
    color: #c8a45e;
    background: rgba(200, 164, 94, 0.07);
}

#bg-all-panel {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 7, 6, 0.78);
    animation: bg-scan-in 0.2s ease both;
}
#bg-all-panel.bg-hidden { display: none !important; }

.bg-all-card {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 100%;
    overflow-y: auto;
    padding: 26px 30px 22px;
    border-image-source: url('../assets/images/blackglass/card.png');
    border-image-slice: 46 fill;
    border-image-width: 23px;
    border-image-repeat: stretch;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.7));
}

.bg-all-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: 1px solid rgba(200, 164, 94, 0.45);
    color: #c8a45e;
    width: 22px;
    height: 22px;
    line-height: 1;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.bg-all-close:hover { background: rgba(200, 164, 94, 0.18); }

.bg-all-title {
    font-family: 'Georgia', serif;
    font-size: 17px;
    letter-spacing: 0.14rem;
    color: #c8a45e;
    text-align: center;
}
.bg-all-sub {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.22rem;
    text-transform: uppercase;
    color: #5a5244;
    text-align: center;
    margin: 4px 0 18px;
    padding-bottom: 12px;
    background: url('../assets/images/blackglass/divider.png') center bottom / 100% 8px no-repeat;
}

.bg-all-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px 22px;
}
.bg-all-col-head {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: #8a7a5a;
    border-bottom: 1px solid rgba(200, 164, 94, 0.25);
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.bg-all-item {
    font-size: 12px;
    line-height: 1.45;
    color: #8a7a6a;
    padding: 6px 8px;
    margin: 0 -8px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.bg-all-item:hover {
    color: #c8a45e;
    background: rgba(200, 164, 94, 0.08);
}

.bg-all-foot {
    margin-top: 18px;
    font-family: 'Courier New', monospace;
    font-size: 8px;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    color: #4a4436;
    text-align: center;
}
