/* ── Agent Music Page ──────────────────────────────────────────────────────── */

/* Now Playing Hero */
.music-now-playing {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(245, 200, 66, 0.1);
    border-radius: 8px;
    margin-bottom: 24px;
}

.music-now-playing__cover {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: rgba(245, 200, 66, 0.08);
    border: 1px solid rgba(245, 200, 66, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 32px;
    color: rgba(245, 200, 66, 0.4);
    overflow: hidden;
}

.music-now-playing__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-now-playing__title {
    font-family: 'Share Tech Mono', monospace;
    color: #f5c842;
    font-size: 18px;
    margin: 0 0 4px 0;
}

.music-now-playing__artist {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
}

/* Tabs */
.music-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(245, 200, 66, 0.1);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.music-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.music-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.music-tab--active {
    color: #f5c842;
    border-bottom-color: #f5c842;
}

/* Panels */
.music-panel {
    min-height: 200px;
}

/* Track list */
.music-track-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.music-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.music-track-row:hover {
    background: rgba(245, 200, 66, 0.06);
}

.music-track-row--active {
    background: rgba(245, 200, 66, 0.1);
    border-left: 3px solid #f5c842;
}

.music-track-row__play {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(245, 200, 66, 0.15);
    border: none;
    color: #f5c842;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.music-track-row__play:hover {
    background: rgba(245, 200, 66, 0.3);
}

.music-track-row__info {
    flex: 1;
    min-width: 0;
}

.music-track-row__title {
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-row__artist {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.music-track-row__badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.music-track-row__badge--default {
    background: rgba(100, 200, 100, 0.15);
    color: #8fbc8f;
}

.music-track-row__badge--uploaded {
    background: rgba(100, 150, 255, 0.15);
    color: #87ceeb;
}

.music-track-row__badge--external {
    background: rgba(200, 100, 255, 0.15);
    color: #dda0dd;
}

.music-track-row__duration {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

.music-track-row__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.music-track-row__action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.music-track-row__action-btn:hover {
    color: #f5c842;
}

.music-track-row__action-btn--delete:hover {
    color: #e74c3c;
}

/* Upload zone */
.music-upload-zone {
    border: 2px dashed rgba(245, 200, 66, 0.2);
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.music-upload-zone:hover,
.music-upload-zone--dragover {
    border-color: rgba(245, 200, 66, 0.5);
    background: rgba(245, 200, 66, 0.03);
}

.music-upload-zone__label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0 0 8px 0;
}

.music-upload-zone__hint {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin: 0;
}

/* Upload form */
.music-upload-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 400px;
}

.music-upload-form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.music-upload-form__field label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.music-upload-form__field input,
.music-upload-form__field select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(245, 200, 66, 0.15);
    border-radius: 4px;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.2s;
}

.music-upload-form__field input:focus,
.music-upload-form__field select:focus {
    border-color: rgba(245, 200, 66, 0.5);
}

/* Upload progress */
.music-upload-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.music-upload-progress__bar {
    height: 100%;
    background: #f5c842;
    width: 0%;
    transition: width 0.3s;
}

/* Buttons */
.music-btn {
    background: rgba(245, 200, 66, 0.1);
    border: 1px solid rgba(245, 200, 66, 0.2);
    color: #f5c842;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.music-btn:hover {
    background: rgba(245, 200, 66, 0.2);
}

.music-btn--primary {
    background: rgba(245, 200, 66, 0.2);
    border-color: #f5c842;
}

.music-btn--primary:hover {
    background: rgba(245, 200, 66, 0.35);
}

/* Empty state */
.music-empty {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    text-align: center;
    padding: 32px 16px;
}

/* External form */
.music-external-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 500px;
    margin-bottom: 24px;
}

/* Playlist controls */
.music-playlist-controls {
    margin-bottom: 16px;
}

.music-playlist-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(245, 200, 66, 0.08);
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 8px;
}

.music-playlist-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.music-playlist-card__name {
    color: #f5c842;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
}

.music-playlist-card__meta {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
}

.music-playlist-card__actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.music-playlist-card__play-btn,
.music-playlist-card__edit-btn {
    background: rgba(245, 200, 66, 0.15);
    border: none;
    color: #f5c842;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    transition: background 0.2s;
}

.music-playlist-card__play-btn:hover,
.music-playlist-card__edit-btn:hover {
    background: rgba(245, 200, 66, 0.3);
}

.music-playlist-card__delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    transition: color 0.2s;
}

.music-playlist-card__delete-btn:hover {
    color: #e74c3c;
}

/* Modal */
.music-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.music-modal-overlay[data-visible="true"] {
    display: flex;
}

.music-modal {
    background: #1a0d08;
    border: 1px solid rgba(245, 200, 66, 0.2);
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 380px;
}

.music-modal__title {
    color: #f5c842;
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    margin: 0 0 16px 0;
}

.music-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Mobile */
@media (max-width: 600px) {
    .music-now-playing {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .music-tabs {
        gap: 0;
    }

    .music-tab {
        padding: 8px 10px;
        font-size: 11px;
    }

    .music-track-row__badge,
    .music-track-row__duration {
        display: none;
    }
}

/* ── Listen banner ─────────────────────────────────────────────────────── */
.music-listen-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.2rem;
    background: color-mix(in srgb, #c9a227 8%, transparent);
    border: 1px solid #c9a22730;
    border-radius: 3px;
    margin-bottom: 1.2rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.music-listen-banner:hover {
    border-color: #c9a227;
    background: color-mix(in srgb, #c9a227 14%, transparent);
}

.music-listen-banner__label {
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: #c9a227;
    font-weight: 700;
    border: 1px solid #c9a22760;
    padding: 2px 6px;
    border-radius: 2px;
    flex-shrink: 0;
}

.music-listen-banner__text {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #9a9080;
}
