body {
    font-family: 'Inter', sans-serif;
}

@import url('https://rsms.me/inter/inter.css');

.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 40; /* Ensure backdrop is below modals */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-backdrop.active {
    display: flex;
}

.modal-backdrop.show {
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50; /* Default z-index for modals */
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: translate(-50%, -45%);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Higher z-index for nested modals */
#notes-list-modal {
    z-index: 60;
}
#note-view-modal, #note-form-modal, #delete-note-modal {
    z-index: 70;
}
#mapping-wizard-modal {
    z-index: 80;
}
#export-modal, #duplicate-modal, #alert-modal {
    z-index: 90;
}


.modal.active {
    display: block;
}

.modal.show {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hidden {
    display: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #2563eb;
    cursor: pointer;
    border-radius: 50%;
}

input[type=range]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #2563eb;
    cursor: pointer;
    border-radius: 50%;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10;
    border-radius: .5rem;
    overflow: hidden;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1
}

.show {
    display: block;
}

.sortable-header {
    cursor: pointer;
}

.sort-indicator {
    opacity: 0.3;
}

.sortable-header.sorted .sort-indicator {
    opacity: 1;
}

.autocomplete-container {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d1d5db;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 150px;
    overflow-y: auto;
    background-color: white;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d1d5db;
}

.autocomplete-items div:hover {
    background-color: #e9e9e9;
}

.dashboard-tab, .analytics-tab-content {
    display: none;
}

.dashboard-tab.active, .analytics-tab-content.active {
    display: block; 
}

/* --- STYLES for Card View & Filters --- */
.view-toggle-btn {
    background-color: #e2e8f0; /* bg-slate-200 */
    color: #475569; /* text-slate-600 */
    transition: background-color 0.2s, color 0.2s;
}
.view-toggle-btn:hover {
    background-color: #cbd5e1; /* bg-slate-300 */
}
.view-toggle-btn.active {
    background-color: #2563eb; /* bg-blue-600 */
    color: white;
}

.applicant-card {
    transition: all 0.2s ease-in-out;
}
.applicant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
}

.custom-filter-options {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 20;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
}

.custom-filter-options a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.custom-filter-options a:hover {
    background-color: #f1f1f1;
}

/* Funnel Tooltip Style */
.funnel-tooltip {
    position: absolute;
    background-color: rgba(17, 24, 39, 0.8); /* bg-gray-900 with opacity */
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    pointer-events: none; /* Important */
    white-space: nowrap;
    z-index: 100;
}

/* Facet Filter Styles */
#facet-drawer {
    transition: transform 0.3s ease-in-out;
    z-index: 45; /* Below modals but above content */
}

.filter-chip {
    transition: all 0.15s ease-in-out;
}
.filter-chip.active {
    background-color: #3b82f6; /* bg-blue-600 */
    color: white;
    font-weight: 600;
}
