/* =============================================================
   Cleff Catalog — complete self-contained styles
   Includes all mup-catalog-* rules so the Hub renders correctly
   without depending on MUP dashboard.min.css being present.
   ============================================================= */

/* ── Song list ───────────────────────────────────────────────── */
.mup-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Song card ───────────────────────────────────────────────── */
.mup-catalog-item {
    background: #fef3c7;
    border-radius: 10px;
    border: 1px solid #fcd34d;
    overflow: hidden;
}
.mup-catalog-item.wip {
    background: #f5f5f5;
    border-color: #bbb;
}
.mup-catalog-item[open] {
    background: #fff;
}

/* ── Summary row ─────────────────────────────────────────────── */
.mup-catalog-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.mup-catalog-summary::-webkit-details-marker { display: none; }

.mup-catalog-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mup-catalog-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.mup-catalog-project {
    font-size: 11px;
    color: #666;
}
.mup-catalog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mup-catalog-status {
    font-size: 12px;
}
.mup-catalog-status.wip  { color: #92400e; }
.mup-catalog-status.done { color: #166634; }

/* Toggle arrow */
.mup-toggle {
    color: #888;
    font-size: 12px;
    transition: transform .2s;
    display: inline-block;
}
.mup-catalog-item[open] .mup-toggle { transform: rotate(90deg); }

/* ── Expanded detail area ────────────────────────────────────── */
.mup-catalog-details {
    padding: 12px;
    border-top: 1px solid #e8e8e8;
}

.mup-catalog-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #666;
    margin-bottom: 10px;
}

/* ── ISWC / ISRC codes ───────────────────────────────────────── */
.mup-catalog-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.mup-catalog-code {
    font-size: 10px;
    color: #666;
    font-family: monospace;
    background: #e8e8e8;
    padding: 3px 6px;
    border-radius: 4px;
}

/* ── Inner sections (ownership, songwriters, etc.) ───────────── */
.mup-catalog-section {
    margin-bottom: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 6px;
}
.mup-catalog-section-title {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

/* ── Data rows ───────────────────────────────────────────────── */
.mup-catalog-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #efefef;
}
.mup-catalog-row:last-child { border-bottom: none; }
.mup-catalog-row.sub {
    padding-left: 12px;
    font-size: 11px;
    color: #666;
}

/* ── Songwriter rows ─────────────────────────────────────────── */
.mup-catalog-songwriter {
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 6px;
    margin-bottom: 6px;
}
.mup-catalog-songwriter:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ── Badges ──────────────────────────────────────────────────── */
.mup-catalog-pro {
    font-size: 10px;
    color: #1e40af;
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}
.mup-catalog-ipi {
    font-size: 10px;
    color: #888;
    font-family: monospace;
    background: #e8e8e8;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
}
.mup-catalog-split {
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 4px;
}
.mup-catalog-email {
    font-size: 10px;
    color: #666;
    margin-left: 4px;
}

/* ── Contributors grid ───────────────────────────────────────── */
.mup-contributors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.mup-contributor-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
}
.mup-contributor-role  { color: #888; font-weight: 500; }
.mup-contributor-name  { color: #1a1a1a; }

/* ── File links ──────────────────────────────────────────────── */
.mup-catalog-files {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.mup-file-link {
    font-size: 11px;
    background: #0073aa;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s;
}
.mup-file-link:hover { background: #005a87; color: #fff; }

/* ── Empty state ─────────────────────────────────────────────── */
.mup-empty {
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* ── Add song button ─────────────────────────────────────────── */
.mup-book-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #dcfce7;
    color: #166534;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background .15s;
}
.mup-book-btn:hover { background: #bbf7d0; }

/* ── Collaborator tag chips (add-song form) ──────────────────── */
.csf-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
}
.csf-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: #166534;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}
.csf-result {
    padding: 10px 14px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.csf-result:last-child { border-bottom: none; }
.csf-result:hover      { background: #f0fdf4; }

/* ── Catalog edit form (hub) ─────────────────────────────────── */
.cef-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}
.cef-label-sm {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    margin-bottom: 3px;
}
.cef-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}
.cef-input:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}
.cef-section {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}
.cef-section-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}
.cef-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.cef-sw-card {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 8px;
}
.cef-remove-btn {
    width: 30px;
    height: 30px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.cef-remove-btn:hover { background: #b91c1c; }
.cef-add-btn {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #1a1a1a;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    margin-top: 4px;
}
.cef-add-btn:hover { background: #333; }

/* ── Sync & A&R metadata chips ── */
.cef-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cef-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    padding: 0;
}
.cef-chip input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none;
}
.cef-chip span {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555;
    font-weight: 500;
    transition: all 0.15s;
    display: inline-block;
    line-height: 1.3;
    white-space: nowrap;
}
.cef-chip input:checked + span {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
    font-weight: 600;
}
.cef-chip:hover span {
    border-color: #aaa;
}
