/* Custom premium design system for Safeguarding Form */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - HSL tailored colors */
    --font-sans: 'Outfit', sans-serif;
    
    --teal: 180, 100%, 25%; /* #008080 */
    --teal-hover: 180, 100%, 20%;
    --teal-light: 180, 40%, 96%;
    --teal-glow: 180, 100%, 25%, 0.15;
    
    --coral: 16, 100%, 66%; /* #FF7F50 */
    --coral-hover: 16, 100%, 58%;
    --coral-light: 16, 100%, 97%;
    
    /* System Colors - Light Mode */
    --bg-base: 210, 40%, 98%; /* #f8fafc */
    --bg-surface: 0, 0%, 100%; /* #ffffff */
    --bg-surface-hover: 210, 40%, 96.1%; /* #f1f5f9 */
    
    --border-color: 214, 32%, 91%; /* #e2e8f0 */
    --border-focus: 180, 100%, 25%;
    
    --text-primary: 222, 47%, 11%; /* #0f172a */
    --text-secondary: 215, 16%, 47%; /* #64748b */
    --text-muted: 215, 20%, 65%;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode Theme Variables */
.dark {
    --bg-base: 222, 47%, 6%; /* Very dark slate blue */
    --bg-surface: 222, 47%, 11%; /* Dark slate */
    --bg-surface-hover: 222, 47%, 15%;
    
    --border-color: 217, 33%, 17%;
    --border-focus: 180, 80%, 40%;
    
    --text-primary: 210, 40%, 98%; /* Off-white */
    --text-secondary: 215, 20%, 65%; /* Slate gray */
    --text-muted: 215, 16%, 47%;
    
    --teal-light: 180, 80%, 12%;
    --coral-light: 16, 80%, 15%;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

body {
    font-family: var(--font-sans);
    background-color: hsl(var(--bg-base));
    color: hsl(var(--text-primary));
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Header */
.glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.dark .glass-header {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom premium card design */
.form-card {
    background-color: hsl(var(--bg-surface));
    border: 1px solid hsl(var(--border-color));
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1), 
                background-color 0.3s ease, 
                border-color 0.3s ease;
}
.form-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Custom inputs, selects, textareas */
.custom-input {
    background-color: hsl(var(--bg-surface));
    color: hsl(var(--text-primary));
    border: 1.5px solid hsl(var(--border-color));
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    outline: none;
    transition: all 0.2s ease;
}
.custom-input:focus {
    border-color: hsl(var(--border-focus));
    box-shadow: 0 0 0 4px hsl(var(--teal-glow));
}
.custom-input::placeholder {
    color: hsl(var(--text-muted));
}

/* Custom dropdown list rendering */
.dropdown-list {
    background-color: hsl(var(--bg-surface));
    border: 1.5px solid hsl(var(--border-color));
    box-shadow: var(--shadow-lg);
    border-radius: 0.75rem;
    overflow-y: auto;
    z-index: 50;
    animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: hsl(var(--text-primary));
    transition: background-color 0.15s ease;
}
.dropdown-item:hover, .dropdown-item.active {
    background-color: hsl(var(--teal-light));
    color: hsl(var(--teal));
    font-weight: 500;
}
.dark .dropdown-item:hover, .dark .dropdown-item.active {
    color: #2dd4bf; /* Mint/teal for dark mode readability */
}

/* Custom Radio & Checkbox buttons */
.radio-group label {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid hsl(var(--border-color));
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    color: hsl(var(--text-secondary));
    background-color: hsl(var(--bg-surface));
}

.radio-group input[type="radio"]:checked + label {
    border-color: hsl(var(--border-focus));
    background-color: hsl(var(--teal-light));
    color: hsl(var(--teal));
    font-weight: 600;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid hsl(var(--border-color));
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: hsl(var(--bg-surface));
}
.checkbox-item:hover {
    border-color: hsl(var(--border-focus));
    background-color: hsl(var(--teal-light));
}
.checkbox-item input {
    margin-top: 0.25rem;
    width: 1.2rem;
    height: 1.2rem;
    accent-color: hsl(var(--border-focus));
}

/* Custom incident categories with risk colors */
.incident-label {
    transition: all 0.2s ease;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1.5px solid hsl(var(--border-color));
    cursor: pointer;
}
.incident-label:hover {
    transform: translateY(-1px);
}

/* Risk level dynamic styles */
.risk-Blue {
    border-left: 6px solid #3b82f6 !important;
    background-color: #eff6ff;
}
.dark .risk-Blue {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: #2563eb;
}
.risk-Yellow {
    border-left: 6px solid #eab308 !important;
    background-color: #fefce8;
}
.dark .risk-Yellow {
    background-color: rgba(234, 179, 8, 0.15);
    border-color: #ca8a04;
}
.risk-Orange {
    border-left: 6px solid #f97316 !important;
    background-color: #fff7ed;
}
.dark .risk-Orange {
    background-color: rgba(249, 115, 22, 0.15);
    border-color: #ea580c;
}
.risk-Red {
    border-left: 6px solid #ef4444 !important;
    background-color: #fef2f2;
}
.dark .risk-Red {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: #dc2626;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed hsl(var(--border-color));
    border-radius: 1rem;
    transition: all 0.25s ease;
}
.upload-zone:hover {
    border-color: hsl(var(--border-focus));
    background-color: hsl(var(--teal-light));
}

/* Micro-animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toggle Switch Styling */
.theme-toggle-btn {
    cursor: pointer;
    border-radius: 50%;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: hsl(var(--bg-surface));
    border: 1px solid hsl(var(--border-color));
    color: hsl(var(--text-primary));
    transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
    transform: scale(1.05);
    border-color: hsl(var(--border-focus));
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--text-muted));
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--text-secondary));
}
