/* Theme Switcher Styles */

/* Pulse animation for the theme button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(124, 77, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 16px rgba(124, 77, 255, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(124, 77, 255, 0.3);
    }
}

/* Light theme overrides */
html[data-bs-theme="light"] {
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
}

/* Animated theme button effects */
.theme-switch-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid #7c4dff !important;
    background-color: #7c4dff !important;
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    min-width: 90px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.theme-switch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    background-color: #6b42e0 !important;
}

.theme-switch-btn:active {
    transform: translateY(1px);
    background-color: #5e39c7 !important;
}

/* Theme icons */
.dark-theme-icon {
    color: #ffc107; /* yellow moon */
}

.light-theme-icon {
    color: #ffc107; /* yellow sun */
}

/* Style the theme switcher in nav */
#themeSwitcher.nav-link {
    color: #7c4dff;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: rgba(124, 77, 255, 0.1);
    margin-left: 0.5rem;
}

#themeSwitcher.nav-link:hover {
    background-color: rgba(124, 77, 255, 0.2);
    transform: translateY(-2px);
}

#themeSwitcher.nav-link:active {
    transform: translateY(1px);
}

html[data-bs-theme="light"] #themeSwitcher.nav-link {
    color: #6936F5;
    background-color: rgba(105, 54, 245, 0.1);
}

/* Light theme specific styles */
html[data-bs-theme="light"] {
    /* Global text color for light theme */
    --light-text-color: #212529;
}

/* Ensure all text elements have proper color in light mode */
html[data-bs-theme="light"] p,
html[data-bs-theme="light"] h1,
html[data-bs-theme="light"] h2,
html[data-bs-theme="light"] h3,
html[data-bs-theme="light"] h4,
html[data-bs-theme="light"] h5,
html[data-bs-theme="light"] h6,
html[data-bs-theme="light"] .card-title,
html[data-bs-theme="light"] .card-text,
html[data-bs-theme="light"] label,
html[data-bs-theme="light"] span:not(.badge):not([class*="btn-"]):not(.input-group-text),
html[data-bs-theme="light"] a:not(.btn),
html[data-bs-theme="light"] small,
html[data-bs-theme="light"] div.form-text,
html[data-bs-theme="light"] li,
html[data-bs-theme="light"] .list-group-item, 
html[data-bs-theme="light"] .dropdown-item,
html[data-bs-theme="light"] .dropdown-header,
html[data-bs-theme="light"] .toast-header,
html[data-bs-theme="light"] .toast-body,
html[data-bs-theme="light"] .modal-title,
html[data-bs-theme="light"] .modal-body,
html[data-bs-theme="light"] .table td,
html[data-bs-theme="light"] .form-check-label {
    color: var(--light-text-color) !important;
}

html[data-bs-theme="light"] .navbar {
    background-color: #f8f9fa !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

html[data-bs-theme="light"] .navbar-dark .navbar-brand,
html[data-bs-theme="light"] .navbar-dark .nav-link {
    color: #212529 !important;
}

html[data-bs-theme="light"] .navbar-dark .nav-link.active {
    color: #0d6efd !important;
    font-weight: 500;
}

html[data-bs-theme="light"] .footer {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Light theme card styles */
html[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="light"] .card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    color: var(--light-text-color) !important;
}

html[data-bs-theme="light"] .card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    color: var(--light-text-color) !important;
}

/* Light theme pricing plans */
html[data-bs-theme="light"] .pricing-plan-bg {
    background-color: #ffffff !important;
    color: var(--light-text-color) !important;
}

html[data-bs-theme="light"] .pricing-plan-bg .list-group-item.bg-dark {
    background-color: #ffffff !important;
    color: var(--light-text-color) !important; 
}

html[data-bs-theme="light"] .pricing-plan-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125) !important;
    color: var(--light-text-color) !important;
}

html[data-bs-theme="light"] .pricing-plan-card {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.125) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    color: var(--light-text-color) !important;
}

/* Apply text color to list items in pricing plans */
html[data-bs-theme="light"] .pricing-plan-card .list-group-item, 
html[data-bs-theme="light"] .feature-list li {
    color: var(--light-text-color) !important;
}

/* Ensure severity badges maintain colors regardless of theme */
html[data-bs-theme="light"] .badge.bg-danger,
html[data-bs-theme="light"] .badge.bg-high,
html[data-bs-theme="light"] .badge.bg-warning,
html[data-bs-theme="light"] .badge.bg-success,
html[data-bs-theme="light"] .badge.bg-primary {
    color: white !important;
}

/* Light theme table styles */
html[data-bs-theme="light"] .table {
    color: #212529;
}

html[data-bs-theme="light"] .table tbody td {
    color: #212529 !important;
}

html[data-bs-theme="light"] .table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #212529 !important;
}

/* Maintain proper text contrast in alerts */
html[data-bs-theme="light"] .alert-danger {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

html[data-bs-theme="light"] .alert-success {
    color: #155724 !important;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

html[data-bs-theme="light"] .alert-warning {
    color: #856404 !important;
    background-color: #fff3cd !important;
    border-color: #ffeeba !important;
}

html[data-bs-theme="light"] .alert-info {
    color: #0c5460 !important;
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
}