/* ============================================================
   chatbox_suno.css
   Pannello Import Brani da Suno
   ============================================================ */

#suno-panel {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0;
    color: #eee;
    font-size: 0.88em;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Header */
#suno-panel .suno-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}
#suno-panel .suno-title { color: #fff; font-weight: bold; }
#suno-panel .suno-close { color: #aaa; cursor: pointer; }
#suno-panel .suno-close:hover { color: #fff; }

/* Body */
#suno-panel .suno-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

/* Campi */
#suno-panel .suno-field { display: flex; flex-direction: column; gap: 6px; }
#suno-panel .suno-label { color: #aaa; font-size: 0.82em; font-weight: 600; }

#suno-panel .suno-select,
#suno-panel .suno-input {
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #eee;
    font-size: 0.88em;
    padding: 7px 10px;
    font-family: inherit;
}
#suno-panel .suno-select:focus,
#suno-panel .suno-input:focus { outline: none; border-color: #2B87F2; }

#suno-panel .suno-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
#suno-panel .suno-input-row .suno-input { flex: 1; }

#suno-panel .suno-label-inline {
    white-space: nowrap;
    margin-bottom: 0;
    flex-shrink: 0;
}

#suno-panel .suno-hint {
    color: #555;
    font-size: 0.76em;
    line-height: 1.4;
}

/* Bottoni */
#suno-panel .suno-btn {
    height: 32px;
    padding: 0 14px;
    background: #2a2a3a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #aaa;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
#suno-panel .suno-btn:hover { background: #333; color: #fff; }
#suno-panel .suno-btn-import {
    background: #2B87F2;
    border-color: #2B87F2;
    color: #fff;
}
#suno-panel .suno-btn-import:hover { background: #1a6fd4; }

/* Risultato import */
#suno-panel .suno-result {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    border: 1px solid #333;
    background: #222;
}
#suno-panel .suno-result-ok      { border-color: #38a852; background: #0d1f0d; color: #4ecb82; }
#suno-panel .suno-result-error   { border-color: #c0392b; background: #1f0d0d; color: #e57373; }
#suno-panel .suno-result-loading { border-color: #444;    background: #222;    color: #aaa; }

/* Anteprima brano */
#suno-panel .suno-preview {
    border-radius: 8px;
    overflow: hidden;
}
#suno-panel .suno-preview-loading,
#suno-panel .suno-preview-error {
    padding: 12px;
    color: #888;
    font-size: 0.85em;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
}
#suno-panel .suno-preview-error { color: #e57373; border-color: #c0392b; background: #1f0d0d; }

#suno-panel .suno-preview-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 14px;
}
#suno-panel .suno-preview-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
#suno-panel .suno-preview-cover {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
#suno-panel .suno-preview-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#suno-panel .suno-preview-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#suno-panel .suno-preview-label {
    font-size: 0.72em;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#suno-panel .suno-preview-value {
    color: #fff;
    font-size: 0.9em;
    font-weight: 600;
}
#suno-panel .suno-preview-style {
    color: #2B87F2 !important;
    font-size: 0.82em !important;
    font-weight: normal !important;
}
#suno-panel .suno-preview-audio {
    width: 100%;
    height: 28px;
    margin-top: 4px;
}
#suno-panel .suno-preview-lyrics-wrap {
    border-top: 1px solid #333;
    padding-top: 10px;
}
#suno-panel .suno-preview-lyrics {
    color: #aaa;
    font-size: 0.80em;
    line-height: 1.6;
    max-height: 160px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
    white-space: pre-wrap;
}

/* Sezione brani importati */
#suno-panel .suno-imported-section { display: flex; flex-direction: column; gap: 8px; }
#suno-panel .suno-imported-title {
    color: #888;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #333;
    padding-top: 10px;
}
#suno-panel .suno-imported-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#suno-panel .suno-empty { color: #555; font-size: 0.82em; text-align: center; padding: 12px 0; }

/* Riga brano importato */
#suno-panel .suno-track-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    border-radius: 7px;
    padding: 8px 10px;
    border: 1px solid transparent;
}
#suno-panel .suno-track-cover {
    width: 42px;
    height: 42px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}
#suno-panel .suno-track-info { flex: 1; min-width: 0; }
#suno-panel .suno-track-title {
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
#suno-panel .suno-track-meta { color: #888; font-size: 0.76em; }

/* Footer */
#suno-panel .suno-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 15px;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

/* Bottone SUNO nel menu L&B */
#lb2-panel .lb2-btn-suno {
    background: #1a1a2e;
    border-color: #2B87F2;
    color: #2B87F2;
    font-weight: bold;
}
#lb2-panel .lb2-btn-suno:hover { background: #2B87F2; color: #fff; }
