/* Spectral Parcel Scout - Shared Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-700: #334155;
    --slate-900: #0f172a;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-300);
}

/* Table Sorting */
.sortable {
    user-select: none;
    transition: all 0.2s ease;
}

.sortable:hover {
    background-color: var(--slate-100);
}

.sortable[data-sort-dir="asc"] i {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary);
}

.sortable[data-sort-dir="desc"] i {
    opacity: 1;
    color: var(--primary);
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Table Row Hover & Selection */
.table-row {
    transition: all 0.15s ease;
    cursor: pointer;
}

.table-row:hover {
    background-color: #f1f5f9;
}

.table-row.selected {
    background-color: var(--primary-light);
    background-opacity: 0.1;
}

/* Priority Band Badges */
.band-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.band-a {
    background-color: #dcfce7;
    color: #166534;
}

.band-a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
}

.band-b {
    background-color: #fef3c7;
    color: #92400e;
}

.band-b::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
}

.band-c {
    background-color: #fee2e2;
    color: #991b1b;
}

.band-c::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ef4444;
}

/* Map Loading Overlay */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Status Pills */
.status-pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.status-open {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-contacted {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-negotiating {
    background-color: #fdf4ff;
    color: #86198f;
}

.status-won {
    background-color: #dcfce7;
    color: #166534;
}

.status-lost {
    background-color: #f3f4f6;
    color: #374151;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    #tableContainer {
        max-height: 60vh;
    }
    
    #mapContainer {
        height: 60vh;
        width: 100% !important;
    }
}

@media (max-width: 640px) {
    .table-header-grid {
        display: none;
    }
    
    .table-row-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
        padding: 12px;
    }
}

/* Animation for Modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-backdrop {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.3s ease;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: #22c55e;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

.toast-info {
    background: #3b82f6;
    color: white;
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
}

.custom-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}