/* Custom styles for the application */
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.focus-visible\:outline-none:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus-visible\:ring-1:focus-visible {
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.hover\:bg-background-light:hover {
    background-color: rgb(246 247 248);
}

.dark .hover\:bg-background-light:hover {
    background-color: rgb(17 24 39);
}

.hover\:bg-background-dark\/80:hover {
    background-color: rgb(17 24 39 / 0.8);
}

.dark .hover\:bg-background-dark\/80:hover {
    background-color: rgb(246 247 248 / 0.8);
}

.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;
}

/* ============================================
   SIDEBAR STYLES
   ============================================ */

/* === SIDEBAR BASE === */
.sidebar {
    will-change: width;
}

/* === COLLAPSED STATE === */
.sidebar.collapsed {
    width: 4.5rem !important;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .sidebar-indicator {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Completely hide section label including its spacing */
.sidebar.collapsed .sidebar-section-label {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
    width: 2.25rem !important;
    height: 2.25rem !important;
}

.sidebar.collapsed .sidebar-logo .material-symbols-outlined {
    font-size: 1.25rem !important;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.sidebar.collapsed .sidebar-avatar {
    width: 2.25rem !important;
    height: 2.25rem !important;
}

/* Ensure all icons are centered and same size in collapsed state */
.sidebar.collapsed .sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
}

/* === MOBILE STATE === */
.sidebar.show {
    transform: translateX(0) !important;
}

/* === TRANSITIONS === */
.sidebar-text,
.sidebar-indicator {
    transition: opacity 0.3s ease, width 0.3s ease;
}

/* Section label transitions instantly */
.sidebar-section-label {
    transition: none;
}

.sidebar-item {
    transition: all 0.2s ease;
}

/* === TOOLTIPS === */
.sidebar-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease;
}

.dark .sidebar-tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === SCROLLBAR === */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.dark .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
}

.dark .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.7);
}

/* === ACTIVE INDICATOR === */
.sidebar-item:hover {
    transform: translateX(2px);
}

.sidebar.collapsed .sidebar-item:hover {
    transform: translateX(0);
}

/* === THEME TOGGLE SWITCH === */
.sidebar-theme-toggle-wrapper {
    display: block;
}

.sidebar.collapsed .sidebar-theme-toggle-wrapper {
    display: none;
}

.theme-toggle-switch {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
}

.theme-toggle-track {
    position: relative;
    width: 3.5rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #f9d7db 0%, #f9d7db 100%);
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0 0.1875rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .theme-toggle-track {
    background: linear-gradient(135deg, #7a1419 0%, #5a0f13 100%);
}

.theme-toggle-track.dark-mode {
    background: linear-gradient(135deg, #7a1419 0%, #5a0f13 100%);
}

.theme-icon {
    font-size: 0.875rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform-origin: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dd1f26;
    filter: drop-shadow(0 1px 2px rgba(221, 31, 38, 0.5));
}

/* Dark mode icon color */
.theme-toggle-track.dark-mode .theme-icon {
    color: #f9d7db;
    filter: drop-shadow(0 1px 2px rgba(249, 215, 219, 0.5));
}

.theme-toggle-thumb {
    position: absolute;
    left: 0.1875rem;
    width: 1.375rem;
    height: 1.375rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark .theme-toggle-thumb {
    background: rgba(255, 255, 255, 0.9);
}

.theme-toggle-track.dark-mode .theme-toggle-thumb {
    transform: translateX(1.75rem);
    background: rgba(255, 255, 255, 0.9);
}

/* Hover effects */
.theme-toggle-switch:hover .theme-toggle-track {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(221, 31, 38, 0.1);
    transform: scale(1.02);
}

.theme-toggle-switch:hover .theme-toggle-thumb {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Active/Click effect */
.theme-toggle-switch:active .theme-toggle-track {
    transform: scale(0.98);
}

.theme-toggle-switch:active .theme-toggle-thumb {
    width: 1.5rem;
}

/* Focus state */
.theme-toggle-switch:focus .theme-toggle-track {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(221, 31, 38, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 1023px) {
    .sidebar {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .dark .sidebar {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
}

/* ============================================
   AUTH PAGES STYLES
   ============================================ */

/* Background image for auth pages */
.auth-background {
    background-image: url('/images/login-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Custom input focus styles */
.auth-input:focus {
    border-color: #dd1f26 !important;
    box-shadow: 0 0 0 2px rgba(221, 31, 38, 0.1) !important;
}

/* OTP Input focus styles */
.otp-input:focus {
    border-color: #dd1f26 !important;
    box-shadow: 0 0 0 2px rgba(221, 31, 38, 0.1) !important;
}