/* Modern Color System for Hebron City E-Services Portal
 * Based on comprehensive design report recommendations
 * Implements a cohesive color palette with primary, secondary, and neutral colors
 * Supports dark mode with CSS variables
 */

:root {
    /* Primary Colors */
    --primary-color: #2c5282;
    --primary-light: #4299e1;
    --primary-dark: #1a365d;
    
    /* Secondary Colors */
    --secondary-color: #38a169;
    --secondary-light: #68d391;
    --secondary-dark: #276749;

    /* Success Colors */
    --success-color: #38a169;         /* base green */
    --success-light: #68d391;   /* lighter green */
    --success-dark: #276749;    /* darker green */

    /* Danger Colors */
    --danger-color: #e53e3e;          /* base red */
    --danger-light: #f56565;    /* lighter red */
    --danger-dark: #742a2a;     /* darker red */
    
    /* Neutral Colors */
    --neutral-100: #f7fafc;
    --neutral-200: #edf2f7;
    --neutral-300: #e2e8f0;
    --neutral-400: #cbd5e0;
    --neutral-500: #a0aec0;
    --neutral-600: #718096;
    --neutral-700: #4a5568;
    --neutral-800: #2d3748;
    --neutral-900: #1a202c;
    
    /* Accent Colors */
    --accent-red: #e53e3e;
    --accent-orange: #ed8936;
    --accent-yellow: #ecc94b;
    
    /* Status Colors */
    --status-success: var(--secondary-color);
    --status-warning: var(--accent-yellow);
    --status-error: var(--accent-red);
    --status-info: var(--primary-light);
    
    /* 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);
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-full: 9999px;
}

/* Dark Mode Variables */
.dark-mode {
    --primary-color: #4299e1;
    --primary-light: #63b3ed;
    --primary-dark: #2b6cb0;
    
    --secondary-color: #48bb78;
    --secondary-light: #68d391;
    --secondary-dark: #38a169;
    
    --neutral-100: #1a202c;
    --neutral-200: #2d3748;
    --neutral-300: #4a5568;
    --neutral-400: #718096;
    --neutral-500: #a0aec0;
    --neutral-600: #cbd5e0;
    --neutral-700: #e2e8f0;
    --neutral-800: #edf2f7;
    --neutral-900: #f7fafc;
    
    --shadow-sm: 0 1px 2px 0 rgba(255, 255, 255, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(255, 255, 255, 0.07), 0 2px 4px -1px rgba(255, 255, 255, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(255, 255, 255, 0.07), 0 4px 6px -2px rgba(255, 255, 255, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(255, 255, 255, 0.07), 0 10px 10px -5px rgba(255, 255, 255, 0.04);
}

/* Background Colors */
.bg-custom {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
}

.bg-custom-light {
    background-color: var(--primary-light) !important;
}

.bg-custom-dark {
    background-color: var(--primary-dark) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-neutral {
    background-color: var(--neutral-200) !important;
}

/* Text Colors */
.text-bg-custom {
    color: var(--neutral-100);
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-muted {
    color: var(--neutral-600) !important;
}

/* Navigation Links */
.custom-nav-link {
    color: var(--neutral-100);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.custom-nav-link:hover {
    color: var(--neutral-100);
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-nav-link.active {
    color: var(--neutral-100);
    background-color: var(--primary-dark);
    font-weight: 600;
}

/* Links */
.href-custom {
    color: var(--primary-color) !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.href-custom:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline;
}

/* Form Controls */
/* Focus state */
input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2) !important;
}

/* Input styling */
.form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-400);
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

.form-control:hover {
    border-color: var(--neutral-500);
}

/* Dropdown customization */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    padding-right: 2rem !important;
}

select option:hover {
    background-color: var(--primary-light) !important;
    color: var(--neutral-100) !important;
}

select option:checked {
    background-color: var(--primary-color) !important;
    color: var(--neutral-100) !important;
}

/* Buttons */
.custom-primary-btn {
    background-color: var(--primary-color);
    color: var(--neutral-100);
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.custom-primary-btn:hover,
.custom-primary-btn:focus-visible {
    background-color: var(--primary-dark);
    color: var(--neutral-100);
    transform: translateY(-1px);
}

.custom-primary-btn:active {
    background-color: var(--primary-dark) !important;
    color: var(--neutral-100) !important;
    border: none !important;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

.custom-secondary-btn {
    background-color: var(--secondary-color);
    color: var(--neutral-100);
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.custom-secondary-btn:hover,
.custom-secondary-btn:focus-visible {
    background-color: var(--secondary-dark);
    color: var(--neutral-100);
    transform: translateY(-1px);
}

.custom-secondary-btn:active {
    background-color: var(--secondary-dark) !important;
    color: var(--neutral-100) !important;
    border: none !important;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
}

.custom-btn {
    background: linear-gradient(to left, var(--primary-light), var(--primary-color), var(--primary-dark));
    color: var(--neutral-100);
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background-size: 200%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.custom-btn:hover {
    background-position: right;
    color: var(--neutral-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.custom-btn:disabled {
    background: linear-gradient(to left, var(--neutral-400), var(--neutral-500), var(--neutral-400));
    color: var(--neutral-700);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--neutral-100);
    border: 2px solid var(--neutral-400);
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

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

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

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

.custom-checkbox:focus {
    outline: 2px solid rgba(66, 153, 225, 0.5);
    outline-offset: 2px;
}

/* Cards */
.custom-card {
    background-color: var(--neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.custom-card-header {
    background-color: var(--primary-color);
    color: var(--neutral-100);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--neutral-300);
}

/* Modals */
.custom-modal {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.custom-modal-header {
    background-color: var(--primary-color);
    color: var(--neutral-100);
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--neutral-300);
}

/* Status Indicators */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.status-success {
    background-color: rgba(56, 161, 105, 0.1);
    color: var(--status-success);
}

.status-warning {
    background-color: rgba(236, 201, 75, 0.1);
    color: var(--status-warning);
}

.status-error {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--status-error);
}

.status-info {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--status-info);
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}
