/* ============================================
   BROTHERPLAYER — Custom Streaming Player
   SoundCloud-style, branded to justinjamessinclair.com
   ============================================ */

/* Player Container */
.bp-player {
    background: #fff;
    border: 1px solid rgba(51, 46, 42, 0.08);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
    box-shadow: 0 2px 12px rgba(51, 46, 42, 0.06);
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bp-player:hover {
    box-shadow: 0 4px 20px rgba(51, 46, 42, 0.1);
}

/* Playing state accent */
.bp-player.bp-playing {
    border-color: rgba(96, 108, 89, 0.25);
}

/* Top Row: Play Button + Info + Time */
.bp-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

/* Play/Pause Button */
.bp-play-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    border: 2px solid var(--color-green);
    background: transparent;
    color: var(--color-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

.bp-play-btn:hover {
    background: var(--color-green);
    color: #fff;
    transform: scale(1.05);
}

.bp-play-btn:active {
    transform: scale(0.97);
}

.bp-playing .bp-play-btn {
    background: var(--color-green);
    color: #fff;
    animation: bp-pulse 2s ease-in-out infinite;
}

@keyframes bp-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(96, 108, 89, 0.25);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(96, 108, 89, 0);
    }
}

/* Play icon offset for visual center */
.bp-play-btn .fa-play {
    margin-left: 2px;
}

/* Song Info */
.bp-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.bp-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-charcoal);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-meta {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(51, 46, 42, 0.5);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Time Display */
.bp-time {
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    color: rgba(51, 46, 42, 0.45);
    white-space: nowrap;
    min-width: fit-content;
}

/* ============================================
   PROGRESS BAR / WAVEFORM
   ============================================ */

.bp-progress-container {
    position: relative;
    height: 32px;
    cursor: pointer;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    overflow: hidden;
}

/* Waveform bars */
.bp-waveform {
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 100%;
    position: absolute;
    inset: 0;
}

.bp-wave-bar {
    flex: 1;
    background: rgba(51, 46, 42, 0.12);
    border-radius: 1.5px 1.5px 0 0;
    min-width: 2px;
    transition: background 0.1s ease;
}

.bp-wave-bar.bp-played {
    background: var(--color-green);
}

/* Hover preview line */
.bp-progress-container:hover .bp-hover-line {
    opacity: 1;
}

.bp-hover-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(51, 46, 42, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.bp-hover-time {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    color: var(--color-charcoal);
    background: rgba(236, 232, 220, 0.95);
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
}

/* ============================================
   BOTTOM ROW: STATS + VOLUME
   ============================================ */

.bp-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bp-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bp-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: rgba(51, 46, 42, 0.45);
    cursor: default;
    transition: color 0.2s ease;
}

.bp-stat i {
    font-size: 0.75rem;
}

/* Like button */
.bp-like-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: rgba(51, 46, 42, 0.45);
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bp-like-btn:hover {
    color: var(--color-red);
    background: rgba(133, 61, 62, 0.06);
}

.bp-like-btn.bp-liked {
    color: var(--color-red);
}

.bp-like-btn.bp-liked i {
    animation: bp-heart-pop 0.35s ease;
}

@keyframes bp-heart-pop {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.35);
    }

    60% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.bp-like-btn i {
    font-size: 0.8rem;
}

/* Comment link */
.bp-comment-link {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: rgba(51, 46, 42, 0.45);
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bp-comment-link:hover {
    color: var(--color-charcoal);
    background: rgba(51, 46, 42, 0.04);
}

/* Play count */
.bp-plays {
    cursor: default;
}

/* Volume Control */
.bp-volume {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.bp-volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(51, 46, 42, 0.4);
    font-size: 0.8rem;
    padding: 0.2rem;
    transition: color 0.2s ease;
}

.bp-volume-btn:hover {
    color: var(--color-charcoal);
}

.bp-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 3px;
    background: rgba(51, 46, 42, 0.12);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.bp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-green);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.bp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.bp-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-green);
    cursor: pointer;
    border: none;
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */

.bp-loading {
    text-align: center;
    padding: 1rem;
    color: rgba(51, 46, 42, 0.4);
    font-size: 0.8rem;
    font-family: var(--font-body);
}

.bp-loading i {
    animation: bp-spin 1s linear infinite;
    margin-right: 0.4rem;
}

@keyframes bp-spin {
    to {
        transform: rotate(360deg);
    }
}

.bp-error {
    text-align: center;
    padding: 0.75rem;
    color: var(--color-red);
    font-size: 0.78rem;
    font-family: var(--font-body);
    background: rgba(133, 61, 62, 0.05);
    border-radius: 6px;
}

/* ============================================
   BANDCAMP EMBED (inside BrotherPlayer container)
   ============================================ */

.bp-bandcamp {
    background: #fff;
    border: 1px solid rgba(51, 46, 42, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin: 1.25rem 0;
    box-shadow: 0 2px 12px rgba(51, 46, 42, 0.06);
}

.bp-bandcamp iframe {
    border-radius: 0;
    display: block;
}

.bp-bandcamp .bp-bc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-top: 1px solid rgba(51, 46, 42, 0.06);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .bp-player {
        padding: 1rem;
    }

    .bp-play-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.8rem;
    }

    .bp-title {
        font-size: 0.95rem;
    }

    .bp-time {
        font-size: 0.65rem;
    }

    .bp-progress-container {
        height: 26px;
    }

    .bp-volume {
        display: none;
    }

    .bp-bottom {
        flex-wrap: wrap;
    }
}

@media (max-width: 400px) {
    .bp-top {
        gap: 0.6rem;
    }

    .bp-stats {
        gap: 0.6rem;
    }
}