/* =====================================================================
   V121 (Sprint 37, LB LD LF): the purchase routes of the /manual edition
   pages, one stylesheet for the markup of src/lib/edition-routes.php.
   Loaded after deploy.css (/manual/digital|audio|physical/) or
   manual-specs.css (/manual/specs/) through $pageCss (dm_asset() busts it).
   - .bundle-routes: the BUNDLE_ROUTES block (bundle tile + Masterclass
     tile); inside the dark store panel on digital + audio, inside a
     .route-panel on physical + specs.
   - .route-panel: the store panel's dark surface + ONLINE rail (#1A7F37,
     chip #6FCF8E, as deploy.css .store-panel) under its own class, since
     verify-v79 counts .store-panel per page.
   - .edition-status: the physical edition's PLANNED box (light amber, the
     PENDING color of lib/deploy-status.php via --st).
   Hovers never white on the brand register (verify-hovers): white fill, dark-teal text.
   Tiles: side by side when there is room, stacked at <= 640 px.
   ===================================================================== */

.route-panel {
    background: var(--dark-teal);
    border-left: 6px solid #1A7F37;
    border-radius: 6px;
    padding: 26px 28px;
    margin: 0 0 40px;
}

.route-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.route-panel-title {
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    margin: 0;
}

.route-panel-status {
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: 700;
    color: #6FCF8E;
    white-space: nowrap;
}

/* The block sits under the panel's own content (digital: under the body
   grid; audio: under the button) with a hairline above it. */
.store-panel .bundle-routes {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bundle-routes-label {
    font-family: var(--font-code);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #6FCF8E;
    margin: 0 0 12px;
}

.bundle-routes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 12px;
}

.bundle-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 14px 16px;
}

.bundle-tile--best {
    border-color: var(--brand-orange);
    background: rgba(var(--brand-orange-rgb), 0.16);
}

.bundle-tile-tag {
    align-self: flex-start;
    font-family: var(--font-code);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #6FCF8E;
}

.bundle-tile--best .bundle-tile-tag {
    color: #fff;
    background: var(--brand-orange);
    padding: 2px 6px;
    border-radius: 2px;
}

.bundle-tile-title {
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.bundle-tile-copy {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.bundle-tile-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    max-width: 100%;
    font-family: var(--font-code);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
}

.bundle-tile--best .bundle-tile-btn {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}

.bundle-tile-btn:hover,
.bundle-tile-btn:focus-visible,
.bundle-tile--best .bundle-tile-btn:hover,
.bundle-tile--best .bundle-tile-btn:focus-visible {
    background: #fff;
    border-color: #fff;
    color: var(--dark-teal);
}

/* LF: the three edition buttons of /manual/specs/'s DEPLOY_ROUTES box */
.edition-routes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}

.edition-route-btn {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    padding: 9px 14px;
    text-decoration: none;
}

.edition-route-label {
    font-family: var(--font-code);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    overflow-wrap: anywhere;
}

.edition-route-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.edition-route-btn:hover,
.edition-route-btn:focus-visible { background: #fff; border-color: #fff; }

.edition-route-btn:hover .edition-route-label,
.edition-route-btn:focus-visible .edition-route-label,
.edition-route-btn:hover .edition-route-note,
.edition-route-btn:focus-visible .edition-route-note { color: var(--dark-teal); }

/* The box closes the content column of /manual/specs/ (before
   SYSTEM_DEPENDENCIES). */
.book-description .route-panel { margin: 32px 0 40px; }

/* LD: the physical edition's status box */
.edition-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fdf6ec;
    border: 1px solid rgba(180, 83, 9, 0.35);
    border-left: 6px solid var(--st, #B45309);
    border-radius: 6px;
    padding: 22px 26px;
    margin: 0 0 32px;
}

.edition-status-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 16px;
}

.edition-status-tag {
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--dark-teal);
    margin: 0;
}

.edition-status-chip {
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--st, #B45309);
}

.edition-status-title {
    font-family: var(--font-code);
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    line-height: 1.2;
    color: var(--dark-teal);
    margin: 0;
}

.edition-status-copy {
    color: #1a1a1a;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* House rule: every rule that sets display gets its [hidden] twin. */
.route-panel-head[hidden],
.bundle-routes-grid[hidden],
.bundle-tile[hidden],
.bundle-tile-btn[hidden],
.edition-routes[hidden],
.edition-route-btn[hidden],
.edition-status[hidden],
.edition-status-head[hidden] { display: none; }

@media (max-width: 640px) {
    .route-panel { padding: 20px 18px; }
    .edition-status { padding: 18px 18px; }
    .bundle-routes-grid { grid-template-columns: 1fr; }
    .edition-routes { flex-direction: column; }
    .edition-route-btn { width: 100%; }
}

/* --- V125 (ME): the LOCALES line of an edition box (dm_edition_locale_badges(), lib/edition-routes.php): the
   physical status box (planned badges dashed in the box's amber --st) and the /manual/audio/ buy box (an online
   badge white on the ONLINE green, 5.1:1; a planned one dashed grey). --- */
.edition-locales {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 4px 0 0;
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.edition-locales-label {
    font-weight: 700;
    color: var(--brand-orange);
}

.edition-status .edition-locales-label { color: var(--dark-teal); }

.edition-locale {
    font-weight: 700;
    color: var(--dark-teal);
    border: 1px solid transparent;
    border-radius: 2px;
    padding: 1px 8px;
}

.edition-locale--online {
    color: #fff;
    background: #1A7F37;
}

.edition-locale--planned { border: 1px dashed #6b7280; }

.edition-status .edition-locale--planned { border-color: var(--st, #B45309); }

.edition-locales-hint {
    flex-basis: 100%;
    color: var(--text-dim);
    font-size: 0.72rem;
}

.edition-locales[hidden],
.edition-locale[hidden],
.edition-locales-hint[hidden] { display: none; }
