/* October Rust — custom overrides
   Dark audio card to match the site palette (#0A0A0A background, #FB4900 accent).
   Loaded after {{ghost_head}} so it overrides Ghost's default cards.min.css. */

.gh-content .kg-audio-card {
    background: #141414;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.gh-content .kg-audio-card .kg-audio-title {
    color: #fff;
}

.gh-content .kg-audio-card .kg-audio-thumbnail.placeholder {
    background: var(--ghost-accent-color, #FB4900);
}

.gh-content .kg-audio-card .kg-audio-current-time,
.gh-content .kg-audio-card .kg-audio-time {
    color: rgba(255, 255, 255, 0.65);
}

.gh-content .kg-audio-card .kg-audio-play-icon svg,
.gh-content .kg-audio-card .kg-audio-pause-icon svg,
.gh-content .kg-audio-card .kg-audio-mute-icon svg,
.gh-content .kg-audio-card .kg-audio-unmute-icon svg {
    fill: #fff;
}

.gh-content .kg-audio-card .kg-audio-seek-slider:before,
.gh-content .kg-audio-card .kg-audio-volume-slider:before {
    background-color: var(--ghost-accent-color, #FB4900);
}

.gh-content .kg-audio-card .kg-audio-player-container input[type="range"]::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.18);
}

.gh-content .kg-audio-card .kg-audio-player-container input[type="range"]::-webkit-slider-thumb {
    background: var(--ghost-accent-color, #FB4900);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.gh-content .kg-audio-card .kg-audio-player-container input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.18);
}

.gh-content .kg-audio-card .kg-audio-player-container input[type="range"]::-moz-range-thumb {
    background: var(--ghost-accent-color, #FB4900);
    border: 0;
}

/* ============================================================
   Backing tracks — card play overlay
   ============================================================ */

.gh-card.has-audio .gh-card-excerpt {
    display: none;
}

.gh-card-image .gh-card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #FB4900;
    color: #0A0A0A;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.gh-card-image .gh-card-play:hover {
    transform: scale(1.06);
}

.gh-card-play svg {
    width: 22px;
    height: 22px;
}

.gh-card-play .gh-card-pause-icon {
    display: none;
}

.gh-card-play.is-playing .gh-card-play-icon {
    display: none;
}

.gh-card-play.is-playing .gh-card-pause-icon {
    display: block;
}

/* ============================================================
   Backing tracks — sticky bottom player
   ============================================================ */

.bt-player {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: -140px;
    z-index: 200;
    width: min(860px, calc(100vw - 2rem));
    transition: bottom 0.35s ease;
    pointer-events: none;
}

.bt-player.up {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    pointer-events: auto;
}

.bt-player-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 58px;
    padding: 0 1rem;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
    color: #fff;
}

body.bt-player-active {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.bt-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 220px;
}

.bt-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-artist {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.bt-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #bbb;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.bt-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.bt-btn svg {
    width: 16px;
    height: 16px;
}

.bt-play {
    width: 40px;
    height: 40px;
    background: #FB4900;
    color: #0A0A0A;
}

.bt-play:hover {
    background: #FB4900;
    color: #0A0A0A;
    opacity: 0.9;
}

.bt-play svg {
    width: 18px;
    height: 18px;
}

.bt-player .bt-pause-icon {
    display: none;
}

.bt-player.is-playing .bt-play-icon {
    display: none;
}

.bt-player.is-playing .bt-pause-icon {
    display: block;
}

.bt-track {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.bt-time {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    min-width: 34px;
    text-align: center;
}

.bt-prog {
    position: relative;
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
}

.bt-fill {
    height: 100%;
    width: 0;
    background: #FB4900;
    border-radius: 999px;
}

.bt-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bbb;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bt-dl:hover {
    background: rgba(251, 73, 0, 0.14);
    color: #FB4900;
    border-color: rgba(251, 73, 0, 0.35);
}

.bt-dl svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .bt-player {
        width: calc(100vw - 1rem);
    }

    .bt-player-inner {
        gap: 0.6rem;
        padding: 0 0.6rem;
    }

    .bt-info {
        max-width: 30vw;
    }

    .bt-artist {
        display: none;
    }

    .bt-time {
        min-width: 28px;
        font-size: 0.62rem;
    }
}

@media (max-width: 400px) {
    .bt-dl {
        display: none;
    }
}

/* ============================================================
   Backing tracks — volume control
   ============================================================ */

.bt-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.bt-volume-slider {
    width: 80px;
    height: 4px;
    accent-color: #FB4900;
    cursor: pointer;
}

.bt-player .bt-muted-icon {
    display: none;
}

.bt-player.is-muted .bt-volume-icon {
    display: none;
}

.bt-player.is-muted .bt-muted-icon {
    display: block;
}

/* iOS ignores programmatic volume — show only the mute toggle on touch/small screens */
@media (hover: none), (max-width: 600px) {
    .bt-volume-slider {
        display: none;
    }
}

/* ============================================================
   Homepage — Albums section (square cover tiles + titles)
   ============================================================ */

.gh-home-albums .gh-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--grid-gap, 42px);
}

.gh-home-albums .gh-album-cover {
    display: block;
    color: inherit;
    text-decoration: none;
}

.gh-home-albums .gh-album-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.gh-home-albums .gh-album-cover-title {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.3;
}

/* Full-width band to distinguish the Albums section from the Latest feed */
.gh-container.gh-home-albums {
    background: #141414;
    padding-block: 56px;
    margin-top: 0;
}

/* Wider content (full 16-col width) */
.gh-container.gh-home-albums .gh-main {
    grid-column: 1 / -1;
}

/* The theme hides .gh-container-title when a container has no .gh-card
   descendants; our cover tiles aren't .gh-card, so re-show it here.
   Also give it accent treatment and align it with the wider content. */
.gh-container.gh-home-albums .gh-container-title {
    display: block;
    grid-column: 1 / -1;
    color: var(--ghost-accent-color, #FB4900);
    border-bottom-color: rgba(251, 73, 0, 0.25);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ============================================================
   About page — Gear list
   ============================================================ */

.gh-content .about-gear-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.gh-content .about-gear-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ghost-accent-color, #FB4900);
    opacity: 0.7;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.gh-content .about-gear-name {
    font-weight: 600;
}

.gh-content .about-gear-type {
    margin-top: 1px;
    font-size: 0.85em;
    color: var(--color-secondary-text);
}

/* Native embed cards (YouTube) render at intrinsic 200x113 without this —
   make them fill the content width at 16:9 */
.gh-content .kg-embed-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}
