/* Security Awareness Training - Custom Styles */

/* Smooth transitions for interactive elements */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Video player styles */
#training-video {
    background: #000;
}

#training-video::-webkit-media-controls-timeline {
    display: none !important;
}

#training-video::-webkit-media-controls-play-button {
    display: none !important;
}

#training-video::-webkit-media-controls {
    display: none !important;
}

/* Quiz option hover effect */
.quiz-option {
    transition: all 0.15s ease;
}

.quiz-option:has(input:checked) {
    border-color: #dc2626;
    background-color: rgba(220, 38, 38, 0.05);
}

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

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

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

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

/* Print styles */
@media print {
    nav, footer, .no-print { display: none !important; }
    main { max-width: 100% !important; padding: 0 !important; }
}

/* ═══════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════ */

html.dark {
    color-scheme: dark;
}

/* Cards / Panels */
html.dark .bg-white {
    background-color: #1e293b !important;
}

html.dark .bg-gray-50 {
    background-color: #0f172a !important;
}

html.dark .bg-gray-100 {
    background-color: #1e293b !important;
}

/* Borders */
html.dark .border-gray-200,
html.dark .border-gray-100,
html.dark .border-gray-300 {
    border-color: #334155 !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-50 > :not([hidden]) ~ :not([hidden]) {
    border-color: #1e293b !important;
}

/* Text Colors */
html.dark .text-gray-900 { color: #f1f5f9 !important; }
html.dark .text-gray-800 { color: #e2e8f0 !important; }
html.dark .text-gray-700 { color: #cbd5e1 !important; }
html.dark .text-gray-600 { color: #94a3b8 !important; }
html.dark .text-gray-500 { color: #64748b !important; }
html.dark .text-gray-400 { color: #94a3b8 !important; }

/* Form Inputs */
html.dark input[type="text"],
html.dark input[type="password"],
html.dark input[type="email"],
html.dark input[type="number"],
html.dark input[type="date"],
html.dark input[type="file"],
html.dark select,
html.dark textarea {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html.dark input[type="text"]:focus,
html.dark input[type="password"]:focus,
html.dark input[type="email"]:focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #475569 !important;
}

html.dark input:disabled,
html.dark select:disabled {
    background-color: #1e293b !important;
    opacity: 0.5;
}

/* Tables */
html.dark table thead.bg-gray-50 th,
html.dark table thead.bg-gray-50 {
    background-color: #1e293b !important;
}

html.dark tr:hover {
    background-color: rgba(51, 65, 85, 0.5) !important;
}

html.dark .bg-gray-200 {
    background-color: #334155 !important;
}

/* Shadows */
html.dark .shadow-sm,
html.dark .shadow-xl,
html.dark .shadow-lg,
html.dark .shadow-2xl {
    --tw-shadow-color: rgba(0, 0, 0, 0.3);
}

/* Badges / Pills */
html.dark .bg-green-100 { background-color: rgba(34, 197, 94, 0.15) !important; }
html.dark .bg-red-100 { background-color: rgba(239, 68, 68, 0.15) !important; }
html.dark .bg-indigo-100 { background-color: rgba(99, 102, 241, 0.15) !important; }
html.dark .bg-purple-100 { background-color: rgba(168, 85, 247, 0.15) !important; }
html.dark .bg-yellow-100 { background-color: rgba(245, 158, 11, 0.15) !important; }
html.dark .bg-blue-100 { background-color: rgba(59, 130, 246, 0.15) !important; }
html.dark .bg-gray-100.text-gray-600 { background-color: rgba(100, 116, 139, 0.15) !important; }
html.dark .bg-gray-100.text-gray-500 { background-color: rgba(100, 116, 139, 0.15) !important; }

/* Action Backgrounds */
html.dark .bg-red-50 { background-color: rgba(239, 68, 68, 0.1) !important; }
html.dark .bg-green-50 { background-color: rgba(34, 197, 94, 0.1) !important; }
html.dark .bg-blue-50 { background-color: rgba(59, 130, 246, 0.1) !important; }
html.dark .bg-yellow-50 { background-color: rgba(245, 158, 11, 0.1) !important; }

/* Borders for colored elements */
html.dark .border-red-200 { border-color: rgba(239, 68, 68, 0.3) !important; }
html.dark .border-green-200 { border-color: rgba(34, 197, 94, 0.3) !important; }

/* Hover States */
html.dark .hover\:bg-gray-50:hover { background-color: #334155 !important; }
html.dark .hover\:bg-gray-100:hover { background-color: #334155 !important; }
html.dark .hover\:bg-red-50:hover { background-color: rgba(239, 68, 68, 0.15) !important; }

/* Scrollbar - Dark */
html.dark ::-webkit-scrollbar-track { background: #1e293b; }
html.dark ::-webkit-scrollbar-thumb { background: #475569; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Modals */
html.dark .bg-gray-900\/50 { background-color: rgba(0, 0, 0, 0.6) !important; }

/* Nav hover overrides */
html.dark .hover\:text-red-600:hover { color: #f87171 !important; }
html.dark .hover\:text-yellow-500:hover { color: #eab308 !important; }
html.dark .hover\:text-gray-600:hover { color: #e2e8f0 !important; }

/* Checkboxes */
html.dark input[type="checkbox"] {
    background-color: #0f172a !important;
    border-color: #475569 !important;
}

/* Radio buttons */
html.dark input[type="radio"] {
    background-color: #0f172a !important;
    border-color: #475569 !important;
}

/* Theme transition */
html.transitioning,
html.transitioning *,
html.transitioning *::before,
html.transitioning *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Attention check animation */
@keyframes pulse-attention {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#btn-attention-confirm {
    animation: pulse-attention 1.5s ease-in-out infinite;
}
