/**
 * contact-prefs-editor.css — shared styling for the Communication/Contact
 * Preferences editor (#1820). Included on admin/customer_detail.html AND
 * admin_tickets.html so both mounts of ContactPrefsEditor look identical.
 *
 * The .edit-rank-* / .edit-window-* / .edit-day-chip* rules are the byte-identical
 * copy of what used to live inline in customer_detail.html (moved here so the two
 * surfaces can't drift). The .cpe-* rules are the shared module's own scaffolding.
 */

/* ===== Contact Method Ranking + windows (moved verbatim from customer_detail.html) ===== */
.edit-rank-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.85rem;
    text-align: left;
}
.edit-rank-row-first {
    background: var(--success-bg, #d1fae5);
    border-color: var(--success-border, #10b981);
}
.edit-rank-badge {
    font-weight: 600;
    color: var(--text-muted);
    min-width: 6.5rem;
}
.edit-rank-row-first .edit-rank-badge {
    color: var(--success-text, #065f46);
}
.edit-window-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}
.edit-window-row:last-child { border-bottom: none; }
.edit-day-chips {
    display: flex;
    gap: 0.2rem;
}
.edit-day-chip {
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
}
.edit-day-chip-active {
    background: var(--info-bg, #dbeafe);
    border-color: var(--info-text, #3b82f6);
    color: var(--info-text, #3b82f6);
    font-weight: 600;
}
.edit-window-times {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
}
.edit-window-times input[type="time"] {
    font-size: 0.8rem;
    padding: 0.1rem 0.3rem;
}
.edit-window-remove-btn {
    background: none;
    border: none;
    color: var(--error, #ef4444);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.3rem;
}
.edit-window-summary {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.edit-window-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}
.edit-window-add-btn {
    background: none;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 0.3rem;
}

/* ===== shared module scaffolding ===== */
.cpe-block {
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}
.cpe-block-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.cpe-row { margin-bottom: 0.4rem; }
.cpe-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
}
.cpe-notes {
    width: 100%;
    min-height: 60px;
    font-size: 0.85rem;
    padding: 0.4rem;
    box-sizing: border-box;
}
.cpe-notes-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}
.cpe-save-row {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cpe-save-status { font-size: 0.8rem; }
.cpe-loading {
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.cpe-error {
    padding: 0.5rem;
    font-size: 0.82rem;
    border-radius: 0.35rem;
}
.cpe-error button {
    margin-left: 0.35rem;
    padding: 0.1rem 0.5rem;
    cursor: pointer;
}

/* Collapsible Best-Times / Quiet-Hours sub-sections (modal only) */
.cpe-collapse-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.cpe-collapse-summary {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
}
.cpe-chevron {
    transition: transform 0.15s ease;
    display: inline-block;
}
