/* Custom styles for Kwekwe Polytechnic Admission System */

/* Custom color variables */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
}

/* Global styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Form enhancements */
.form-input {
    transition: all 0.15s ease-in-out;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-500);
}

/* Button enhancements */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-600);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-success {
    background-color: var(--success-600);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-700);
}

.btn-warning {
    background-color: var(--warning-600);
    color: white;
}

.btn-warning:hover {
    background-color: var(--warning-700);
}

.btn-danger {
    background-color: var(--error-600);
    color: white;
}

.btn-danger:hover {
    background-color: var(--error-700);
}

/* Card enhancements */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 1.5rem;
}

/* Navigation enhancements */
.nav-link {
    transition: all 0.15s ease-in-out;
}

.nav-link:hover {
    color: var(--primary-600);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-600);
    background-color: var(--primary-50);
}

/* Alert styles */
.alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: var(--success-50);
    border-color: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.alert-warning {
    background-color: var(--warning-50);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.alert-error {
    background-color: var(--error-50);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.alert-info {
    background-color: var(--primary-50);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

/* Table enhancements */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-active {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Loading states */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: var(--primary-600);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal enhancements */
.modal-backdrop {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.15s ease-out;
}

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

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

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

/* Debug styles for reminder button */
.reminder-button {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px 8px;
    background-color: #fef3c7; /* Light yellow background */
}

.reminder-button:hover {
    background-color: #fde68a; /* Slightly darker yellow on hover */
    transform: scale(1.1);
}

.reminder-button:active {
    transform: scale(0.95);
    background-color: #fcd34d; /* Even darker when clicked */
}

/* Flash animation for testing */
@keyframes buttonFlash {
    0% { background-color: #fef3c7; }
    50% { background-color: #f59e0b; }
    100% { background-color: #fef3c7; }
}

.reminder-button.debug-click {
    animation: buttonFlash 1s;
}

/* Chart containers */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

/* Progress bars */
.progress {
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    height: 0.5rem;
}

.progress-bar {
    background-color: var(--primary-600);
    height: 100%;
    transition: width 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        border-radius: 0.5rem;
        margin: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Accessibility enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for keyboard navigation */
.focus-visible:focus {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Certificate level specific colors */
.nc-color {
    color: #2563eb;
}

.nd-color {
    color: #059669;
}

.hnd-color {
    color: #7c3aed;
}

.nc-bg {
    background-color: #dbeafe;
}

.nd-bg {
    background-color: #d1fae5;
}

.hnd-bg {
    background-color: #e9d5ff;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Utility classes */
.text-balance {
    text-wrap: balance;
}

.transition-colors {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.transition-transform {
    transition: transform 0.15s ease-in-out;
}

.transition-shadow {
    transition: box-shadow 0.15s ease-in-out;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
}
