/*
 * BCS Custom - initial skeleton
 * Joomla 3.10.12
 *
 * Deliberately conservative. This stylesheet establishes the structure
 * without attempting to reproduce the existing CloudBase3 appearance.
 */

:root {
    --bcs-page: #f4f6f8;
    --bcs-surface: #ffffff;
    --bcs-text: #20252b;
    --bcs-muted: #66717c;
    --bcs-border: #d9e0e6;
    --bcs-accent: #174f73;
    --bcs-accent-dark: #103b56;
    --bcs-live: #8f1d22;
    --bcs-max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html, body.bcs-site {
    margin: 0;
}

html {
    padding: 0;
}

body.bcs-site {
    background: var(--bcs-page);
    color: var(--bcs-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.bcs-container {
    width: min(100% - 32px, var(--bcs-max-width));
    margin-inline: auto;
}

.bcs-header {
    background: var(--bcs-surface);
    border-bottom: 1px solid var(--bcs-border);
}

.bcs-brand {
    padding: 18px 0 12px;
}

.bcs-brand-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
}

.bcs-brand-name {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bcs-brand-tagline {
    color: var(--bcs-muted);
    font-size: 0.85rem;
}

.bcs-navigation {
    padding-bottom: 12px;
}

.bcs-main {
    padding: 24px 0 48px;
}

.bcs-section {
    margin: 0 0 32px;
}

.bcs-section-heading {
    margin-bottom: 14px;
}

.bcs-section-heading h1,
.bcs-section-heading h2 {
    margin: 0;
    line-height: 1.2;
}

.bcs-section-heading p {
    margin: 6px 0 0;
    color: var(--bcs-muted);
}

.bcs-live-section {
    background: var(--bcs-surface);
    border: 1px solid var(--bcs-border);
    border-radius: 10px;
    padding: 24px;
}

.bcs-live-section .bcs-section-heading {
    margin-bottom:20px;
}

.bcs-live-section .bcs-section-heading h1 {
    color: var(--bcs-live);
    font-size: 1.8rem;
}

/* Merged identical section baselines */
.bcs-archive-section,
.bcs-understand-section,
.bcs-local-section {
    background: var(--bcs-surface);
    border: 1px solid var(--bcs-border);
    border-radius: 10px;
    padding: 24px;
}

/* Merged identical structural grids */
.bcs-understand-grid,
.bcs-local-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.bcs-understand-grid .bcs-card,
.bcs-local-grid .bcs-card {
    background: var(--bcs-surface);
    border: 1px solid var(--bcs-border);
    border-radius: 8px;
    padding: 20px;
}

.bcs-understand-grid a.bcs-card:hover,
.bcs-local-grid a.bcs-card:hover {
    border-color: #c4d2de;
    box-shadow: 0 4px 12px rgba(24, 43, 60, 0.07);
}


/* =========================================
   BCS Scanner Player - Dark Theme Edition
   ========================================= */

.bcs-player {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 22px 24px;
    background: #20252b;             /* Dark panel background */
    color: #ffffff;                  /* White text for visibility */
    border: 1px solid #111820;       /* Deep slate border */
    border-radius: 12px;
}

/* Scanner display */
.bcs-player-display {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    padding: 10px 16px;
    background: #111820;             /* Ultra dark screen */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2d3743;
}

.bcs-player-status {
    width: 100%;
    color: #b1d4fa;                  /* Glowing ice-blue text */
    font-family: "Doto", monospace;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main controls wrapper */
.bcs-player-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

/* Buttons */
.bcs-player-controls {
    display: flex;
    gap: 8px;
}

.bcs-player-button {
    height: 38px;
    min-width: 72px;
    padding: 0 16px;
    border: 1px solid #3a4654;       /* Muted dark border */
    border-radius: 6px;
    background: #2d3743;             /* Dark button base */
    color: #ffffff;                  /* White button text */
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

/* Standard Button Hover */
.bcs-player-button:hover {
    background: #3d4a5a;
    border-color: #4e5e72;
}

.bcs-player-button:active {
    transform: translateY(1px);
}

/* Primary Play Button Overrides */
.bcs-player-play {
    background: var(--bcs-accent, #174f73);       /* Deep blue accent */
    border-color: var(--bcs-accent, #174f73);
}

.bcs-player-play:hover {
    background: var(--bcs-accent-dark, #103b56);  /* Darker blue on hover */
    border-color: var(--bcs-accent-dark, #103b56);
}

/* Volume Layout & Label */
.bcs-player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.bcs-player-volume label {
    color: #aeb7bf;                  /* Muted text on dark background */
    font-size: 13px;
    font-weight: 600;
}

#volume-slider {
    width: 110px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--bcs-accent, #174f73); /* Colors the slider handle */
}

/* Peak meter */
.bcs-player-meter {
    flex: 1 1 auto;
    width: 100px;
    height: 44px;
    margin-left: 4px;
    overflow: hidden;
    background: #111820;             /* Dark container for visualizer graph */
    border-radius: 6px;
}


/* Scanner Archive */
.bcs-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.bcs-archive-grid .bcs-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 20px;
    background: var(--bcs-surface);
    border: 1px solid var(--bcs-border);
    border-radius: 8px;
    color: var(--bcs-text);
    text-decoration: none;
}

.bcs-archive-grid .bcs-card:hover {
    color: var(--bcs-text);
    border-color: var(--bcs-accent);
    text-decoration: none;
}

.bcs-archive-grid .bcs-card-title {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.bcs-archive-grid .bcs-card-description {
    color: var(--bcs-muted);
    font-size: 0.9rem;
}

.bcs-archive-grid .bcs-card-action {
    margin-top: auto;
    padding-top: 18px;
    color: var(--bcs-accent);
    font-size: 0.9rem;
    font-weight: 700;
}

/* Joomla article pages (Merged properties safely) */
.bcs-component-section {
    max-width: 900px;
    margin: 24px auto 48px;
}

.bcs-component-section .page-header {
    margin-bottom: 24px;
}

.bcs-component-section .page-header h1,
.bcs-component-section .page-header h2 {
    margin: 0;
    color: var(--bcs-accent-dark);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.bcs-component-section .article-info {
    display: flex;
}

.bcs-footer {
    background: #20252b;
    color: #fff;
    padding: 28px 0;
}

.bcs-footer-placeholder {
    margin: 0;
    color: #d9dee3;
}

/* =========================================
   Responsive Breakpoints (Consolidated)
   ========================================= */

@media (max-width: 700px) {
    .bcs-container {
        width: min(100% - 20px, var(--bcs-max-width));
    }

    .bcs-live-section,
    .bcs-archive-section,
    .bcs-understand-section,
    .bcs-local-section {
        padding: 16px;
        border-radius: 7px;
    }

    .bcs-understand-grid,
    .bcs-local-grid,
    .bcs-archive-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .bcs-player {
        padding: 18px;
    }

    .bcs-player-main {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 10px 8px;
        align-items: center;
    }

    .bcs-player-controls {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        gap: 8px;
    }

    .bcs-player-meter {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        height: 44px;
    }

    .bcs-player-volume {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        width: 100%;
    }

    #volume-slider {
        flex: 1;
        width: auto;
    }

    .bcs-player-status {
        font-size: 15px;
    }
}

/* ChatGPT add - 10/20 */


/* Let the secondary sections breathe */
.bcs-archive-section,
.bcs-understand-section,
.bcs-local-section {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* Give the live scanner a little more presence */
.bcs-live-section {
    border-color: #d4dde5;
    box-shadow: 0 4px 16px rgba(24, 43, 60, 0.07);
}

/* Sharpen the section hierarchy */
.bcs-section-heading {
    margin-bottom: 18px;
}

.bcs-section-heading h1,
.bcs-section-heading h2 {
    letter-spacing: -0.025em;
}

/* Informational cards: subtle, clean, consistent */
.bcs-understand-grid .bcs-card,
.bcs-local-grid .bcs-card {
    border-color: #dfe5eb;
    box-shadow: 0 2px 8px rgba(24, 43, 60, 0.035);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

/* Archive cards: clearer interactive feedback */
.bcs-archive-grid .bcs-card {
    border-color: #dfe5eb;
    box-shadow: 0 2px 8px rgba(24, 43, 60, 0.035);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.bcs-archive-grid .bcs-card:hover {
    border-color: var(--bcs-accent);
    box-shadow: 0 5px 14px rgba(24, 43, 60, 0.09);
    transform: translateY(-2px);
}

.bcs-understand-grid .bcs-card:hover,
.bcs-local-grid .bcs-card:hover {
    border-color: var(--bcs-accent);
    box-shadow: 0 5px 14px rgba(24, 43, 60, 0.09);
}

.bcs-archive-grid .bcs-card:focus-visible {
    outline: 3px solid var(--bcs-accent);
    outline-offset: 3px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .bcs-archive-grid .bcs-card,
    .bcs-understand-grid .bcs-card,
    .bcs-local-grid .bcs-card {
        transition: none;
    }

    .bcs-archive-grid .bcs-card:hover {
        transform: none;
    }
}

/* Keep the lighter section treatment on mobile */
@media (max-width: 700px) {
    .bcs-archive-section,
    .bcs-understand-section,
    .bcs-local-section {
        padding: 0;
    }

    .bcs-section-heading {
        margin-bottom: 14px;
    }
}

/* =========================================
   BCS Informational Article Overlay
   ========================================= */


.bcs-article-overlay {
    position: absolute;
    top: var(--bcs-overlay-top, 0px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 19, 27, 0.78);
}


.bcs-article-overlay[hidden] {
    display: none;
}

.bcs-article-overlay-panel {
    display: flex;
    flex-direction: column;
    width: min(100%, 1000px);
    max-height: calc(100vh - 48px);
    background: #fff;
    color: var(--bcs-text);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.bcs-article-overlay-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    padding: 12px 18px;
    background: #f4f6f8;
    border-bottom: 1px solid var(--bcs-border);
}

.bcs-article-overlay-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 6px 14px;
    border: 1px solid #cbd3db;
    border-radius: 6px;
    background: #fff;
    color: #20252b;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bcs-article-overlay-close:hover {
    background: #e8edf2;
    border-color: var(--bcs-accent);
}

.bcs-article-overlay-content {
    padding: 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.bcs-article-overlay-content .bcs-component-section {
    max-width: none;
    margin: 0;
}

.bcs-article-overlay-content .page-header h1,
.bcs-article-overlay-content .page-header h2 {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .bcs-article-overlay {
        padding: 8px;
    }

    .bcs-article-overlay-panel {
        max-height: calc(100vh - 16px);
        border-radius: 7px;
    }

    .bcs-article-overlay-content {
        padding: 18px;
    }
}