/**
 * Retro Recordings XR — Microphones Page
 *
 * Sticky horizontal brand nav + full-width content panels.
 * Mirrors the tape-machines.css architecture exactly (mic- prefix).
 *
 * @package    RetroRecordingsXR
 * @since      2.0.0
 */

/* ==========================================================================
   Layout shell
   ========================================================================== */

.mic-layout {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0 5rem;
}

/* ==========================================================================
   Search bar
   ========================================================================== */

.mic-search-bar {
    padding: 2.75rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.mic-search-form-wrap {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 640px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(212, 165, 116, 0.32);
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.04);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.mic-search-form-wrap:focus-within {
    border-color: rgba(212, 165, 116, 0.65);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1);
}

.mic-search-icon {
    display: flex;
    align-items: center;
    padding: 0 0.75rem 0 1.15rem;
    color: rgba(212, 165, 116, 0.5);
    font-size: 1.15rem;
    flex-shrink: 0;
    pointer-events: none;
    user-select: none;
}

.mic-brand-search {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0.82rem 1rem 0.82rem 0;
    color: rgba(244, 228, 215, 0.88);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.mic-brand-search::placeholder {
    color: rgba(244, 228, 215, 0.25);
}

.mic-brand-search-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(232, 160, 84, 0.6);
    white-space: nowrap;
    min-height: 1.1em;
    text-align: center;
}

.mic-brand-search-count.mic-search-noresults {
    color: rgba(232, 100, 84, 0.75);
}

@media (max-width: 700px) {
    .mic-search-bar { padding: 1.75rem 1.25rem 1.25rem; }
    .mic-search-form-wrap { max-width: 100%; }
}

/* ==========================================================================
   Brand navigation bar
   ========================================================================== */

.mic-nav-wrap {
    position: sticky;
    top: 52px;
    z-index: 50;
    display: flex;
    align-items: stretch;
}

.mic-sidebar {
    flex: 1;
    min-width: 0;
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.15);
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0 2rem;
    scrollbar-width: none;
}

.mic-sidebar::-webkit-scrollbar { display: none; }

.mic-sidebar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(244, 228, 215, 0.28);
    white-space: nowrap;
    align-self: center;
    padding: 0 1.25rem 0 0;
    margin-right: 0.5rem;
    border-right: 1px solid rgba(212, 165, 116, 0.12);
    flex-shrink: 0;
    display: block;
}

.mic-brand-btn.mic-hidden { display: none; }

.mic-brand-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    padding: 1.1rem 1.5rem;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(244, 228, 215, 0.5);
    line-height: 1.2;
    white-space: nowrap;
    text-align: left;
}

/* Flag fallback (brands without a logo) */
.mic-brand-btn-flag {
    font-size: 1.35rem;
    line-height: 1;
    margin-bottom: 0.25rem;
    display: block;
}

/* Logo container — replaces flag when logo is available */
.mic-brand-btn-logo {
    height: 26px;
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 1.35rem; /* flag emoji fallback size */
    line-height: 1;
}

.mic-brand-btn-logo-img {
    height: 18px;
    width: auto;
    max-width: 88px;
    display: block;
    filter: grayscale(1) invert(1) brightness(1.2);
    mix-blend-mode: screen;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.mic-brand-btn:hover .mic-brand-btn-logo-img,
.mic-brand-btn.mic-active .mic-brand-btn-logo-img {
    opacity: 0.9;
}

/* White-background logo variant (dark/colored SVGs like Shure) */
.mic-brand-btn-logo-img--white {
    filter: none;
    mix-blend-mode: normal;
    opacity: 0.75;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 5px;
    border-radius: 2px;
}

.mic-brand-btn:hover .mic-brand-btn-logo-img--white,
.mic-brand-btn.mic-active .mic-brand-btn-logo-img--white {
    opacity: 1;
    background: rgba(255, 255, 255, 0.95);
}

.mic-brand-btn-name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2;
    color: rgba(244, 228, 215, 0.6);
    white-space: nowrap;
}

.mic-brand-btn-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    color: rgba(244, 228, 215, 0.25);
    margin-top: 2px;
    font-weight: 400;
    display: block;
}

.mic-brand-btn:hover {
    border-bottom-color: rgba(232, 160, 84, 0.45);
    background: rgba(232, 160, 84, 0.04);
}

.mic-brand-btn:hover .mic-brand-btn-name {
    color: rgba(244, 228, 215, 0.85);
}

.mic-brand-btn.mic-active {
    color: #e8a054;
    border-bottom-color: #e8a054;
    background: rgba(232, 160, 84, 0.06);
}

.mic-brand-btn.mic-active .mic-brand-btn-name {
    color: rgba(232, 160, 84, 0.9);
}

.mic-brand-btn.mic-active .mic-brand-btn-meta {
    color: rgba(232, 160, 84, 0.5);
}

@media (max-width: 700px) {
    .mic-nav-wrap { top: 48px; }
    .mic-sidebar { padding: 0 0.75rem; }
    .mic-sidebar-label { display: none; }
    .mic-brand-btn { padding: 0.85rem 1rem; }
    .mic-brand-btn-meta { display: none; }
    .mic-brand-btn-flag { font-size: 1.1rem; }
}

/* ==========================================================================
   Panels
   ========================================================================== */

.mic-panels {
    padding: 4rem 2.5rem 0;
}

.mic-panel {
    display: none;
    animation: mic-panel-in 0.3s ease forwards;
}

.mic-panel.mic-active {
    display: block;
}

@keyframes mic-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
    .mic-panels { padding: 2rem 1.25rem 0; }
}

/* ==========================================================================
   Mic card — mirrors tape-machine-card layout
   ========================================================================== */

.mic-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0 2rem;
    padding: 1.75rem;
}

.mic-media {
    grid-row: 1 / 20;
    align-self: start;
}

.mic-content {
    min-width: 0;
}

@media (max-width: 700px) {
    .mic-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    .mic-media {
        grid-row: auto;
        margin-bottom: 1.25rem;
    }
}

/* ==========================================================================
   Mic image — same thumbnail/lightbox pattern
   ========================================================================== */

.mic-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
}

.mic-image--portrait {
    aspect-ratio: 2 / 3;
}

.mic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.mic-image img:hover { transform: scale(1.03); }

.mic-gallery { position: relative; }

.mic-gallery-trigger {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.mic-gallery-trigger:focus-visible {
    outline: 2px solid rgba(232, 160, 84, 0.8);
    outline-offset: 2px;
}

.mic-gallery-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(20, 18, 16, 0.85);
    border: 1px solid rgba(212, 165, 116, 0.35);
    color: rgba(244, 228, 215, 0.92);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    transition: background 0.2s, border-color 0.2s;
}

.mic-gallery-badge-icon {
    color: rgba(232, 160, 84, 1);
    font-size: 8px;
    line-height: 1;
}

.mic-gallery-trigger:hover .mic-gallery-badge {
    background: rgba(20, 18, 16, 0.95);
    border-color: rgba(232, 160, 84, 0.6);
}

.mic-gallery-item-hidden { display: none; }

.mic-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.mic-image--portrait + .mic-placeholder,
.mic-placeholder--portrait {
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(212, 165, 116, 0.1);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 16, 0.6);
}

/* ==========================================================================
   Spec table
   ========================================================================== */

.mic-specs,
.mic-specs tr,
.mic-specs td,
.mic-specs th {
    border-bottom: 1px solid #333333 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.mic-specs tr:last-child,
.mic-specs tr:last-child td {
    border-bottom: none !important;
}

.mic-specs td:first-child {
    font-size: 11px;
    color: rgba(212, 165, 116, 0.55);
}

/* ==========================================================================
   Brand header — logo, eyebrow, name, tagline
   Mirrors console-brands.css .cb-brand-header pattern (mic- prefix)
   ========================================================================== */

.mic-brand-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(212, 165, 116, 0.15);
}

/* Panel logo card — float top-right */
.mic-panel-logo-wrap {
    float: right;
    margin: 0 0 1.5rem 2.5rem;
    clear: right;
    border-radius: 2px;
}

.mic-panel-logo-wrap--white {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.85rem 1.25rem;
}

.mic-panel-logo-wrap--dark {
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 0.85rem 1.25rem;
}

.mic-panel-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: 240px;
}

/* Dark card: invert dark marks to white */
.mic-panel-logo-wrap--dark .mic-panel-logo {
    filter: grayscale(1) invert(1) brightness(1.2);
    mix-blend-mode: screen;
    opacity: 0.9;
}

/* Dark card + colour logo: preserve original colours */
.mic-panel-logo-wrap--dark .mic-panel-logo--color {
    filter: none;
    mix-blend-mode: normal;
    opacity: 1;
}

/* Dark card + white logo: screen blend only */
.mic-panel-logo-wrap--dark .mic-panel-logo--white {
    filter: brightness(1.15);
    mix-blend-mode: screen;
    opacity: 0.92;
}

/* White card: show original marks */
.mic-panel-logo-wrap--white .mic-panel-logo {
    filter: none;
    mix-blend-mode: normal;
    opacity: 1;
}

@media (max-width: 700px) {
    .mic-panel-logo-wrap {
        float: none;
        margin: 0 0 1.25rem 0;
        display: inline-block;
    }
    .mic-panel-logo { height: 40px; }
}

.mic-brand-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #e8a054;
    margin-bottom: 0.6rem;
    display: block;
}

.mic-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    color: #f4e4d7;
    line-height: 1;
    margin: 0 0 0.5rem;
}

.mic-brand-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: rgba(244, 228, 215, 0.45);
    margin: 0;
}

/* ==========================================================================
   Brand official link
   ========================================================================== */

.mic-brand-official-link {
    display: inline-block;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(232, 160, 84, 0.45);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 160, 84, 0.2);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.mic-brand-official-link:hover {
    color: rgba(232, 160, 84, 0.85);
    border-color: rgba(232, 160, 84, 0.5);
    text-decoration: none;
}

/* ==========================================================================
   Iconic recording callout — mic-specific element
   ========================================================================== */

.mic-iconic-recording {
    margin-top: 14px;
    padding: 10px 14px;
    border-left: 2px solid rgba(232, 160, 84, 0.4);
    background: rgba(232, 160, 84, 0.04);
    border-radius: 0 2px 2px 0;
}

.mic-iconic-recording-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(232, 160, 84, 0.5);
    display: block;
    margin-bottom: 4px;
}

.mic-iconic-recording-text {
    font-family: 'Playfair Display', serif;
    font-size: 0.875rem;
    font-style: italic;
    color: rgba(244, 228, 215, 0.75);
    line-height: 1.4;
}

/* ==========================================================================
   Brand nav footer — Prev / Next
   ========================================================================== */

.mic-brand-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.1);
}

.mic-brand-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    background: rgba(26, 18, 10, 0.5);
    border: 1px solid rgba(212, 165, 116, 0.14);
    border-radius: 2px;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-width: 0;
}

.mic-brand-nav-btn:hover {
    border-color: rgba(212, 165, 116, 0.35);
    background: rgba(44, 24, 16, 0.6);
}

.mic-brand-nav-btn--next {
    justify-content: flex-end;
    text-align: right;
}

.mic-brand-nav-arrow {
    font-size: 1rem;
    color: rgba(212, 165, 116, 0.4);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.mic-brand-nav-btn:hover .mic-brand-nav-arrow {
    color: rgba(232, 160, 84, 0.85);
}

.mic-brand-nav-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mic-brand-nav-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(212, 165, 116, 0.35);
    display: block;
}

.mic-brand-nav-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(244, 228, 215, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.2s ease;
}

.mic-brand-nav-btn:hover .mic-brand-nav-name {
    color: rgba(244, 228, 215, 0.95);
}

@media (max-width: 700px) {
    .mic-brand-nav-footer { gap: 0.5rem; }
    .mic-brand-nav-btn    { padding: 0.75rem 0.85rem; }
    .mic-brand-nav-name   { font-size: 0.82rem; }
}


/* ==========================================================================
   Vintage ads — brand-level strip (below mic cards)
   --------------------------------------------------------------------------
   Horizontal scrollable row of vintage magazine ads per brand. Mirrors the
   cb-vintage-ads pattern from console-brands.css. Each thumbnail opens in
   GLightbox (grouped by mic-brand-ads-<slug> gallery id).
   ========================================================================== */

.mic-vintage-ads {
    margin: 1.4rem 0 2rem;
    padding: 1.1rem 0 1.2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.12);
    border-bottom: 1px solid rgba(212, 165, 116, 0.12);
}

.mic-vintage-ads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0 0.15rem;
}

.mic-vintage-ads-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #e8a054;
    font-weight: 600;
}

.mic-vintage-ads-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(244, 228, 215, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mic-vintage-ads-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.6rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 165, 116, 0.3) transparent;
}

.mic-vintage-ads-strip::-webkit-scrollbar { height: 6px; }
.mic-vintage-ads-strip::-webkit-scrollbar-track { background: transparent; }
.mic-vintage-ads-strip::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.3);
    border-radius: 3px;
}

.mic-vintage-ad {
    flex: 0 0 auto;
    width: 140px;
    aspect-ratio: 3 / 4;
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(212, 165, 116, 0.1);
    border-radius: 2px;
    overflow: hidden;
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: border-color 0.25s, transform 0.25s, filter 0.25s;
    /* Dim by default — ads shouldn't dominate the page, only hint at content */
    filter: brightness(0.72) saturate(0.8) contrast(0.95);
}

.mic-vintage-ad:hover {
    border-color: rgba(232, 160, 84, 0.5);
    transform: translateY(-2px);
    filter: brightness(1) saturate(1) contrast(1);
}

.mic-vintage-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mic-vintage-ad-year {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(20, 18, 16, 0.88);
    color: rgba(244, 228, 215, 0.9);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
}

/* Spread (two-page) brand-level ad — wider thumbnail, gold accent */
.mic-vintage-ad--spread {
    width: 240px;            /* ~1.7× the normal 140px */
    aspect-ratio: 3 / 2;     /* landscape to reflect the two-page layout */
    border-color: rgba(232, 160, 84, 0.28); /* subtle gold hint at rest */
    filter: brightness(0.85) saturate(0.9) contrast(0.97); /* slightly less dimmed */
}

.mic-vintage-ad--spread:hover {
    border-color: rgba(232, 160, 84, 0.7);
}

.mic-vintage-ad-spread-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(232, 160, 84, 0.92);
    color: #1a1a1a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .mic-vintage-ad         { width: 110px; }
    .mic-vintage-ad--spread { width: 190px; }
}
