/* =============================================================
 FILE: Selection-Modals-4032373782CAO.css
 PURPOSE: Dashboard theme stylesheet for Selection Modals.

 USED BY:
   - /Dashboard/Includes/Dashboard-Head.php
   - /Dashboard/Includes/Page-Open.php
   - /Registration/Register.php
 ============================================================= */
.selection-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: none;
}

.selection-modal-overlay.active {
    display: flex;
}

.selection-modal {
    background: var(--card-bg, #111111);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 11px;
    width: 90%;
    max-width: 680px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 14px 36px rgba(0, 0, 0, 0.34), 0 36px 72px rgba(0, 0, 0, 0.26);
    animation: modalSlideIn 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.selection-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.selection-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-primary, #e0e0e0);
    font-weight: 600;
}

.selection-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 7px;
    transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.selection-modal-close:hover {
    background: var(--hover-bg, rgba(255,255,255,0.1));
    color: var(--text-primary, #e0e0e0);
}

.selection-modal-search {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.selection-modal-search input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg, #0a0a0a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 7px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.selection-modal-search input:focus {
    border-color: var(--accent, #ffffff);
}

.selection-modal-search input::placeholder {
    color: var(--text-muted, #555);
}

.selection-modal-body {
    overflow-y: auto;
    padding: 8px 16px 16px;
    flex: 1;
}

.selection-modal-body::-webkit-scrollbar {
    width: 6px;
}

.selection-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.selection-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color, rgba(255,255,255,0.08));
    border-radius: 3px;
}

.selection-category {
    margin-bottom: 4px;
}

.selection-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.selection-category-header:hover {
    background: var(--hover-bg, rgba(255,255,255,0.05));
}

.selection-category-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selection-category-count {
    font-size: 0.75rem;
    color: var(--text-muted, #555);
    background: var(--hover-bg, rgba(255,255,255,0.05));
    padding: 2px 8px;
    border-radius: 10px;
}

.selection-category-chevron {
    color: var(--text-muted, #555);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
}

.selection-category.collapsed .selection-category-chevron {
    transform: rotate(-90deg);
}

.selection-category.collapsed .selection-category-items {
    display: none;
}

.selection-category-items {
    padding: 0 4px 8px;
}

.selection-item {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    cursor: pointer;
    border-radius: 7px;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), border-color 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1), opacity 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary, #e0e0e0);
    font-size: 0.93rem;
}

.selection-item:hover {
    background: var(--hover-bg, rgba(255,255,255,0.08));
}

.selection-item.selected {
    background: var(--accent, #ffffff);
    color: #000;
}

.selection-item.search-hidden {
    display: none;
}

.selection-category.search-hidden {
    display: none;
}

.selection-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #555);
    font-size: 0.95rem;
    display: none;
}

.selection-no-results.visible {
    display: block;
}

.selection-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: var(--accent, #ffffff);
    color: #000;
    border-radius: 14px 18px 14px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.selection-badge:hover {
    filter: brightness(1.1);
}

.selection-badge .badge-remove {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
}

.selection-badge .badge-remove:hover {
    opacity: 1;
}

.selection-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    background: var(--input-bg, #0a0a0a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 7px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.93rem;
    cursor: pointer;
    transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms cubic-bezier(0.4, 0, 0.2, 1), transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.selection-trigger:hover {
    border-color: var(--accent, #ffffff);
}

.selection-trigger .trigger-placeholder {
    color: var(--text-muted, #555);
}

.selection-trigger .trigger-arrow {
    margin-left: auto;
    color: var(--text-muted, #555);
    font-size: 0.8rem;
}

.custom-religion-input {
    display: none;
    margin-top: 10px;
}

.custom-religion-input.visible {
    display: block;
}

.custom-religion-input input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg, #0a0a0a);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 7px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.93rem;
    outline: none;
    transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.custom-religion-input input:focus {
    border-color: var(--accent, #ffffff);
}

@media (max-width: 768px) {
    .selection-modal {
        width: 95%;
        max-height: 85vh;
        margin: 10px;
    }

    .selection-modal-header {
        padding: 14px 18px;
    }

    .selection-modal-search {
        padding: 10px 18px;
    }

    .selection-modal-body {
        padding: 8px 12px 12px;
    }
}

/* 320px - Ultra-small screens */
@media (max-width: 320px) {
    .selection-modal {
        width: 98%;
        margin: 5px;
        max-height: 90vh;
    }
    .selection-modal-header {
        padding: 12px 14px;
    }
    .selection-modal-header h3 {
        font-size: 1rem;
    }
    .selection-modal-search {
        padding: 8px 14px;
    }
    .selection-modal-body {
        padding: 6px 8px 10px;
    }
    .selection-badge {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .selection-trigger {
        padding: 10px 12px;
        font-size: 0.88rem;
    }
}

/* Touch device targets */
@media (hover: none) and (pointer: coarse) {
    .selection-modal-close {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .selection-item {
        min-height: 48px;
    }
    .selection-category-header {
        min-height: 48px;
    }
    .selection-trigger {
        min-height: 48px;
    }
    .selection-badge {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }
    .selection-modal-search input {
        min-height: 48px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .selection-modal {
        animation: none;
    }
    .selection-modal-close,
    .selection-item,
    .selection-category-header,
    .selection-badge,
    .selection-trigger,
    .selection-category-chevron,
    .selection-modal-search input,
    .custom-religion-input input {
        transition: none;
    }
}
