/* Custom report list widget (CustomReportListWidgetRenderer). Global, like the
   inline <style> it replaces: child components (LevelInstanceChoicePicker,
   RespondentGenerationPanel) receive these class names as parameters. */

.custom-report-list-widget {
    padding: 8px;
}

.crl-list {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.crl-list-header {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crl-add-btn {
    width: 100%;
}

.crl-add-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
    background: #fff;
}

.crl-add-label {
    font-size: 12px;
    color: #6b7280;
}

.crl-add-select {
    font-size: 13px;
    padding: 4px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.crl-options-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px 10px 58px;
    background: #f3f7f7;
    border-bottom: 1px solid #f0f0f0;
}

.crl-options-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

/* The format choice refines "download only", so it sits indented under it. */
.crl-options-formats {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 22px;
    font-size: 12px;
    color: #374151;
}

.crl-options-formats-label {
    color: #6b7280;
}

.crl-respondents {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #e0eceb;
    padding-top: 8px;
    margin-top: 2px;
}

.crl-level-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 8px 58px;
}

.crl-options-btn.open,
.crl-options-btn:hover {
    background-color: #d6f0ee;
    color: #008180;
}

.crl-ref-picker {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}

.crl-ref-option {
    text-align: left;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
}

.crl-ref-option:hover {
    background: #e0f7f4;
}

.crl-ref-badge {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #008180;
    background: #d6f0ee;
    border-radius: 4px;
    padding: 1px 6px;
    vertical-align: middle;
}

.crl-list-items {
    flex: 1;
    overflow-y: auto;
}

.crl-empty {
    padding: 12px;
    font-size: 13px;
    color: #6b7280;
}

.crl-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s ease;
}

.crl-list-item:hover {
    background: #e0f7f4;
}

.crl-list-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: #e9f0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008180;
    font-size: 18px;
    flex-shrink: 0;
}

.crl-list-item-info {
    flex: 1;
    min-width: 0;
}

.crl-list-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crl-list-item-sub {
    font-size: 12px;
    color: #6b7280;
}

.crl-download-only {
    cursor: default;
}

.crl-dl-btn {
    background: #fff;
    border: 1px solid #008180;
    color: #008180;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
}

.crl-dl-btn:hover:not(:disabled) {
    background: #d6f0ee;
}

.crl-dl-btn:disabled {
    opacity: .6;
    cursor: default;
}

.crl-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.crl-copy-btn:hover {
    background-color: #d6f0ee;
    color: #008180;
}

.crl-delete-btn:hover {
    background-color: #fecaca;
    color: #dc2626;
}

.crl-confirm {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.crl-confirm-text {
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
}

.crl-confirm .popup-btn-danger,
.crl-confirm .popup-btn-outline {
    padding: 4px 10px;
    font-size: 12px;
}

.crl-loading {
    padding: 16px;
    color: #6c757d;
}

.crl-xoet-badge {
    color: #92400e;
    background: #fef3c7;
}
