/* ═══════════════════════════════════════════
   RRRH History Widget — history.css
   Palette: Warm Black / Saddle Brown / Aged Gold / Forest Green
   ═══════════════════════════════════════════ */

.rrrh-history-wrap {
    background: #0d0d0a;
    border-radius: 12px;
    padding: 24px 28px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.rrrh-history__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, #3a6a28, #8B6914, #8B4513) 1;
}
.rrrh-history__dot {
    width: 8px; height: 8px;
    background: #4a9a30;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(74,154,48,.5);
    animation: rrrh-hw-pulse 2s infinite;
}
@keyframes rrrh-hw-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74,154,48,.5); }
    70%  { box-shadow: 0 0 0 6px rgba(74,154,48,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,154,48,0); }
}
.rrrh-history__label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8B6914;
}

/* Grid — two columns by default */
.rrrh-history--double .rrrh-history__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
}
.rrrh-history--single .rrrh-history__grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Row */
.rrrh-history__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background .15s;
    min-width: 0;
}
.rrrh-history__row:hover { background: rgba(255,255,255,.04); }

/* Track number */
.rrrh-history__num {
    font-size: 11px;
    font-weight: 700;
    color: #3d2b10;
    width: 16px;
    text-align: right;
    flex-shrink: 0;
}

/* Album art */
.rrrh-history__art-wrap {
    width: 38px; height: 38px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1208;
}
.rrrh-history__art {
    width: 38px; height: 38px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Track info */
.rrrh-history__info {
    flex: 1;
    min-width: 0;
}
.rrrh-history__title {
    font-size: 13px;
    font-weight: 700;
    color: #e8d5a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.rrrh-history__artist {
    font-size: 11px;
    color: #9a7850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Elapsed time */
.rrrh-history__time {
    font-size: 10px;
    color: #5a3e1b;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Empty state */
.rrrh-history__empty {
    grid-column: 1 / -1;
    color: #5a3e1b;
    font-size: 13px;
    font-style: italic;
    padding: 12px 0;
    text-align: center;
}

/* Responsive — stack to single column on small screens */
@media (max-width: 600px) {
    .rrrh-history--double .rrrh-history__grid {
        grid-template-columns: 1fr;
    }
    .rrrh-history-wrap { padding: 20px 16px; }
}
