/* Audio participant editor. Self-contained: the meg-* base the component
   renders lives here (scoped to .pe-root), so it does not depend on
   movie-edit.css. Applied when ParticipantEditor Variant="audio". */

/* ═══ meg-* base for the participant editor (scoped to .pe-root) ═══ */
.pe-root .meg-empty-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 4px 0 0;
}
.pe-root .meg-genre-search {
    position: relative;
    margin-top: 12px;
}
.pe-root .meg-genre-search-input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    font-size: 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pe-root .meg-genre-search-input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
.pe-root .meg-genre-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
}
.pe-root .meg-genre-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.1s;
}
.pe-root .meg-genre-option:hover { background: #f1f5f9; }
.pe-root .meg-genre-option .material-icons { font-size: 14px; color: #3b82f6; }
.pe-root .meg-genre-no-results {
    padding: 12px 14px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}
.pe-root .meg-participants-group { margin-bottom: 20px; }
.pe-root .meg-participants-group:last-child { margin-bottom: 0; }
.pe-root .meg-participants-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}
.pe-root .meg-participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pe-root .meg-participant {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    position: relative;
    gap: 6px;
}
.pe-root .meg-participant__photo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
}
.pe-root .meg-participant__photo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}
.pe-root .meg-participant__photo--fallback .material-icons { font-size: 32px; }
.pe-root .meg-participant__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}
.pe-root .meg-participant__name {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    max-width: 80px;
}
.pe-root .meg-participant__remove {
    position: absolute;
    top: -4px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0;
    line-height: 1;
}
.pe-root .meg-participant__remove .material-icons { font-size: 11px; }
.pe-root .meg-participant:hover .meg-participant__remove { opacity: 1; }
.pe-root .meg-participant-add {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pe-root .meg-participant-confirm-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
}
.pe-root .meg-participant-confirm-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    flex-shrink: 0;
}
.pe-root .meg-participant-confirm-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}
.pe-root .meg-participant-confirm-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pe-root .meg-participant-confirm-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.pe-root .meg-participant-confirm-cancel:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.pe-root .meg-participant-confirm-cancel .material-icons { font-size: 16px; }

/* ═══ Audio overrides on top of the base above ═══ */
.pe-root .meg-participants-list { align-items: flex-start; }
.pe-root .meg-participant__name {
    min-height: 29px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pe-root .meg-participant__official {
    position: absolute;
    top: 54px;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pe-root .meg-participant__official-badge {
    position: relative;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #cbd5e1;
    box-shadow: 0 0 0 1.5px #fff;
    transition: background 0.15s;
}
.pe-root .meg-participant__official-badge::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 7.5px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: translate(-50%, -58%) rotate(45deg);
}
.pe-root .meg-participant__official input:checked ~ .meg-participant__official-badge { background: #10b981; }
.pe-root .meg-participant__official:hover .meg-participant__official-badge { background: #10b981; }
.pe-root .meg-participant__tracks {
    font-size: 10px;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    cursor: default;
}
.pe-root .meg-participant-add--top {
    margin-top: 10px;
    margin-bottom: 20px;
}
.pe-root .pe-role-select .tch-btn { border-radius: 6px; }

/* ── Audio variant: blend into the flat form layout (no card chrome) ── */
.meg-section.pe-audio {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}
.pe-audio .meg-genre-search { margin-top: 4px; }
.pe-audio .meg-participant-add { margin-top: 12px; }
.pe-optional { color: #94a3b8; font-weight: 400; }

.pe-audio .meg-generate-btn { background: #FFC000; color: #fff; }
.pe-audio .meg-generate-btn:hover:not(:disabled) { background: #e6ad00; }
.pe-audio .meg-input--select + .meg-label,
.pe-audio .meg-input:focus + .meg-label,
.pe-audio .meg-input:not(:placeholder-shown) + .meg-label { color: #64748b; }
.pe-audio .meg-input:focus { border-color: #FFC000; box-shadow: 0 0 0 3px rgba(255,192,0,.15); }
.pe-audio .meg-genre-option .material-icons { color: #64748b; }

/* Create-participant modal confirm button: force the yellow accent over the
   Syncfusion dialog theme (dialog is portaled to body, so no .pe-audio scope). */
.e-dialog .e-footer-content .e-btn.pe-create-confirm-btn,
.e-btn.pe-create-confirm-btn {
    background: #FFC000;
    border-color: #FFC000;
    color: #fff;
}
.e-dialog .e-footer-content .e-btn.pe-create-confirm-btn:hover,
.e-btn.pe-create-confirm-btn:hover {
    background: #e6ad00;
    border-color: #e6ad00;
    color: #fff;
}
.e-dialog .e-footer-content .e-btn.pe-create-confirm-btn:active,
.e-dialog .e-footer-content .e-btn.pe-create-confirm-btn:focus,
.e-btn.pe-create-confirm-btn:active,
.e-btn.pe-create-confirm-btn:focus {
    background: #d6a100;
    border-color: #d6a100;
    color: #fff;
}

/* ── Modal confirm buttons (create artist / track selection): always yellow,
   matching the artist "Add" button, even inside the portaled TchDialog ── */
.pe-btn-yellow,
.pe-btn-yellow:focus,
.pe-btn-yellow:active,
.pe-btn-yellow:disabled {
    background-color: #FFC000 !important;
    border-color: #FFC000 !important;
    color: #fff !important;
    opacity: 1 !important;
}
.pe-btn-yellow:hover {
    background-color: #e6ad00 !important;
    border-color: #e6ad00 !important;
    color: #fff !important;
}

/* ── Official check: yellow accent to match the other official checks on the form ── */
.pe-audio .meg-participant__official input:checked ~ .meg-participant__official-badge,
.pe-audio .meg-participant__official:hover .meg-participant__official-badge { background: #FFC000; }

/* ── Artist search: custom HTML dropdown, styled like the language popup ──
   (textbox with no border; results list mirrors the Syncfusion dropdown look) */
.pe-search .meg-genre-search-input {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 15px;
    padding: 8px 14px;
    color: #334155;
}
.pe-search .meg-genre-search-input::placeholder { color: #94a3b8; font-size: 13px; }
.pe-search .meg-genre-search-input:focus {
    box-shadow: none;
    background: #fff;
}
.pe-search .meg-genre-search-icon { display: none; }
.pe-search .meg-genre-dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 320px;
    padding: 4px 0;
    margin-top: 2px;
}
.pe-search .meg-genre-option {
    padding: 10px 16px;
    gap: 12px;
    font-size: 13px;
    color: #334155;
    border-radius: 0;
}
.pe-search .meg-genre-option:hover { background: #f1f5f9; }
.pe-search .meg-genre-option .material-icons {
    font-size: 20px;
    color: #64748b;
}
.pe-search .meg-genre-no-results {
    padding: 12px 16px;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   Audio artists: participant editor + track-assignment modal
   (moved here from movie-edit.css; on top of the shared meg-* base)
   ═══════════════════════════════════════════════════════════════ */

.pe-track-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    margin-top: 8px;
}
.pe-track-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}
.pe-track-option input { cursor: pointer; }

/* ── Track-assignment modal (new album artists → tracks) ── */
.pe-assign-body { text-align: left; }
.pe-assign-note {
    font-size: 12px;
    color: #64748b;
    margin: 8px 0;
}
.pe-assign-note p { margin: 0 0 4px; }
.pe-assign-note p:last-child { margin-bottom: 0; }
.pe-assign-scroll {
    max-height: 340px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.pe-assign-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.pe-assign-table th,
.pe-assign-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eef2f7;
}
.pe-assign-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
    text-align: center;
    font-weight: 600;
    color: #334155;
    vertical-align: bottom;
}
.pe-assign-track-col {
    text-align: left;
    color: #334155;
    white-space: nowrap;
}
.pe-assign-table thead th.pe-assign-track-col {
    text-align: center;
}
.pe-assign-artist-col {
    text-align: center;
    min-width: 120px;
}
.pe-assign-artist-head {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.pe-assign-artist-head input { cursor: pointer; }
.pe-assign-artist-head-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
}
.pe-assign-artist-name {
    font-weight: 600;
    color: #1e293b;
}
.pe-assign-artist-role {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}
.pe-assign-cell { text-align: center; }
.pe-assign-cell input { cursor: pointer; }
.pe-assign-table tbody tr:hover { background: #f8fafc; }
.pe-assign-artist-tag {
    font-size: 8.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.pe-tag--add { color: #059669; }
.pe-tag--remove { color: #dc2626; }
.pe-assign-col--add { background: #f0fdf4; }
.pe-assign-col--remove { background: #fef2f2; }
.pe-assign-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}
.pe-create-body { text-align: left; }
.pe-create-field { margin-bottom: 12px; }

/* ── Drag-to-reorder handle ── */
.pe-root .meg-participant__drag {
    position: absolute;
    top: -4px;
    left: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.15s;
    padding: 0;
    line-height: 1;
}
.pe-root .meg-participant__drag:active { cursor: grabbing; }
.pe-root .meg-participant__drag .material-icons { font-size: 16px; }
.pe-root .meg-participant:hover .meg-participant__drag { opacity: 1; }
.pe-root .meg-participant.sortable-ghost { opacity: 0.4; }
.pe-root .meg-participant.sortable-chosen,
.pe-root .meg-participant.sortable-chosen .meg-participant__drag { cursor: grabbing; }
