/* NSR Show Builder - Front End */

.nsr-show {
    font-family: inherit;
    max-width: 900px;
    margin: 0 auto;
}

.nsr-show-header {
    background: #111c31;
    color: #fff;
    padding: 24px 28px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.nsr-show-title {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #fff;
}

.nsr-show-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.875em;
    opacity: 0.85;
}

.nsr-show-meta span::before {
    margin-right: 4px;
    opacity: 0.7;
}

.nsr-meta-presenter::before { content: "🎙"; }
.nsr-meta-date::before      { content: "📅"; }
.nsr-meta-duration::before  { content: "⏱"; }
.nsr-meta-tracks::before    { content: "🎵"; }

/* Tracklist */
.nsr-tracklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nsr-track {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #e8472a;
    border-radius: 4px;
    overflow: hidden;
}

.nsr-track-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fafafa;
}

.nsr-track-num {
    font-weight: 700;
    color: #e8472a;
    font-size: 1.1em;
    min-width: 24px;
}

.nsr-track-name {
    flex: 1;
    font-size: 1em;
    line-height: 1.3;
}

.nsr-track-artist {
    color: #111c31;
}

.nsr-track-sep {
    color: #aaa;
}

.nsr-track-song {
    color: #333;
}

.nsr-track-year {
    font-size: 0.8em;
    background: #111c31;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Detail panel */
.nsr-track-details {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 20px;
    padding: 16px;
    border-top: 1px solid #eee;
    align-items: start;
}

.nsr-sleeve img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.nsr-details-cols {
    display: contents;
}

.nsr-record-col h5,
.nsr-artist-col h5 {
    margin: 0 0 8px;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.nsr-record-col dl,
.nsr-artist-col dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    font-size: 0.82em;
}

.nsr-record-col dt,
.nsr-artist-col dt {
    font-weight: 600;
    color: #555;
}

.nsr-record-col dd,
.nsr-artist-col dd {
    margin: 0;
    color: #333;
}

.nsr-artist-bio {
    font-size: 0.8em;
    color: #555;
    line-height: 1.5;
    margin: 8px 0 0;
}

.nsr-ext-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.78em;
    color: #e8472a;
    text-decoration: none;
}

.nsr-ext-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .nsr-track-details {
        grid-template-columns: 1fr;
    }
    .nsr-sleeve { display: none; }
    .nsr-details-cols { display: flex; flex-direction: column; gap: 12px; }
}

/* Print button on [nsr_show] display */
.nsr-show-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.nsr-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #111c31;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 600;
    transition: background 0.15s;
}

.nsr-print-btn:hover {
    background: #1e3150;
    color: #fff;
    text-decoration: none;
}

@media print {
    .nsr-show-actions { display: none; }
}

.nsr-builder {
    font-family: inherit;
    max-width: 860px;
    margin: 0 auto;
    color: #222;
}

.nsr-builder-notice {
    padding: 14px 18px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Header */
.nsr-builder-header {
    background: #111c31;
    color: #fff;
    padding: 20px 24px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.nsr-builder-header h2 {
    margin: 0 0 14px;
    font-size: 1.3em;
    color: #fff;
}

.nsr-builder-meta {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
}

.nsr-builder-meta label {
    display: flex;
    flex-direction: column;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    gap: 4px;
}

.nsr-builder-meta input {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    color: #fff;
    padding: 6px 10px;
    font-size: 1.1em;
    width: 100%;
    box-sizing: border-box;
}

.nsr-builder-meta input::placeholder { opacity: 0.5; }
.nsr-builder-meta input:focus {
    outline: none;
    border-color: #4db8d0;
    background: rgba(255,255,255,0.18);
}

/* Runtime bar */
.nsr-builder-runtime {
    background: #1a2d4a;
    color: #4db8d0;
    padding: 8px 24px;
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.nsr-builder-runtime #nsrb-total-time {
    color: #fff;
}

/* Track rows */
.nsrb-tracklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.nsrb-track-row {
    background: #fff;
    border: 1px solid #dde1e7;
    border-left: 4px solid #e8472a;
    border-radius: 4px;
    overflow: hidden;
}

.nsrb-track-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
}

.nsrb-num {
    font-weight: 700;
    color: #e8472a;
    min-width: 22px;
    font-size: 0.95em;
}

.nsrb-track-header input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid #dde1e7;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
}

.nsrb-track-header input:focus {
    outline: none;
    border-color: #4db8d0;
}

.nsrb-artist { font-weight: 600; }

.nsrb-duration-badge {
    background: #4db8d0;
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.nsrb-btn-icon {
    background: none;
    border: 1px solid #dde1e7;
    border-radius: 4px;
    padding: 5px 9px;
    cursor: pointer;
    font-size: 0.85em;
    line-height: 1;
    color: #555;
    transition: background 0.15s;
}

.nsrb-btn-icon:hover { background: #f0f0f0; }

.nsrb-remove {
    color: #c0392b;
    border-color: #f5c6c6;
}

.nsrb-remove:hover { background: #fdf0f0; }

/* Info panel beneath each track */
.nsrb-info {
    padding: 12px;
    border-top: 1px dashed #eee;
    display: grid;
    grid-template-columns: 90px 1fr 1fr;
    gap: 14px;
    align-items: start;
    font-size: 0.82em;
}

.nsrb-sleeve {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.nsrb-record-info strong,
.nsrb-artist-info strong {
    display: block;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.nsrb-record-info dl,
.nsrb-artist-info dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
}

.nsrb-record-info dt,
.nsrb-artist-info dt { font-weight: 600; color: #555; }
.nsrb-record-info dd,
.nsrb-artist-info dd { margin: 0; color: #333; }

.nsrb-bio {
    margin: 6px 0 0;
    color: #666;
    line-height: 1.4;
    font-size: 0.9em;
}

.nsrb-ext-link {
    display: inline-block;
    margin-top: 6px;
    color: #e8472a;
    font-size: 0.85em;
    text-decoration: none;
}

.nsrb-ext-link:hover { text-decoration: underline; }

.nsrb-loading { color: #888; font-style: italic; margin: 0; }
.nsrb-err     { color: #c0392b; margin: 0; }

/* Buttons */
.nsrb-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.15s, opacity 0.15s;
}

.nsrb-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.nsrb-btn-secondary {
    background: #f0f2f5;
    color: #333;
    border: 1px solid #c8cdd4;
    margin-bottom: 16px;
}

.nsrb-btn-secondary:hover { background: #e4e7ec; }

.nsrb-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.nsrb-btn-primary {
    background: #111c31;
    color: #fff;
}

.nsrb-btn-primary:hover { background: #1e3150; }

.nsrb-btn-az {
    background: #1a7a5e;
    color: #fff;
}

.nsrb-btn-az:hover { background: #155f49; }

/* Status message */
.nsrb-status {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.5;
}

.nsrb-status-success {
    background: #edfaef;
    border: 1px solid #46b450;
    color: #1a5c1e;
}

.nsrb-status-error {
    background: #fdf0f0;
    border: 1px solid #dc3232;
    color: #7a1212;
}

/* Duration on [nsr_show] display shortcode */
.nsr-track-duration {
    font-size: 0.78em;
    color: #4db8d0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 700px) {
    .nsr-builder-meta {
        grid-template-columns: 1fr 1fr;
    }
    .nsrb-info {
        grid-template-columns: 1fr;
    }
    .nsrb-sleeve { display: none; }
}

@media (max-width: 480px) {
    .nsr-builder-meta { grid-template-columns: 1fr; }
    .nsrb-track-header input { min-width: 80px; }
}
