/* Custom styles for Silica Cron */

/* Theme transition */
html,
body,
.card,
.modal-content,
.dropdown-menu,
.form-control,
.form-select,
.table {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Light theme (default) */
.navbar-nav .nav-link.active {
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

/* Dark theme styles */
.theme-dark {
    --bs-body-bg: #121212;
    --bs-body-color: #ffffff;
    --bs-secondary-bg: #1e1e1e;
    --bs-tertiary-bg: #2d2d2d;
}

.theme-dark body {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .navbar-dark {
    --bs-navbar-color: rgba(255, 255, 255, 0.9);
    --bs-navbar-hover-color: rgba(255, 255, 255, 1);
    --bs-navbar-active-color: rgba(255, 255, 255, 1);
    --bs-navbar-brand-color: rgba(255, 255, 255, 0.9);
    --bs-navbar-brand-hover-color: rgba(255, 255, 255, 1);
}

.theme-dark .card {
    background-color: var(--bs-secondary-bg) !important;
    border-color: #404040 !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .card-header {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: #404040 !important;
}

.theme-dark .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--bs-body-color);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    --bs-table-border-color: #404040;
    color: var(--bs-body-color) !important;
}

.theme-dark .table th,
.theme-dark .table td {
    color: var(--bs-body-color) !important;
    border-color: #404040 !important;
}

.theme-dark .table thead th {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-tertiary-bg) !important;
    border-color: #404040 !important;
}

.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > td,
.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .table-hover > tbody > tr:hover > td,
.theme-dark .table-hover > tbody > tr:hover > th {
    background-color: rgba(255, 255, 255, 0.075) !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .modal-content {
    background-color: var(--bs-secondary-bg) !important;
    border-color: #404040 !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .modal-header {
    border-color: #404040 !important;
}

.theme-dark .modal-footer {
    border-color: #404040 !important;
}

.theme-dark .form-control {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: #404040 !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .form-control:focus {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: #0d6efd !important;
    color: var(--bs-body-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.theme-dark .form-select {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: #404040 !important;
    color: var(--bs-body-color) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

.theme-dark .bg-light {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #f5c2c7 !important;
}

.theme-dark .bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.2) !important;
    color: #a3cfbb !important;
}

.theme-dark .bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.2) !important;
    color: #9eeaf9 !important;
}

.theme-dark .bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffda6a !important;
}

.theme-dark .bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.2) !important;
    color: #9ec5fe !important;
}

.theme-dark .text-muted {
    color: #adb5bd !important;
}

/* Ensure all text elements are visible in dark mode */
.theme-dark small,
.theme-dark .small {
    color: #adb5bd !important;
}

.theme-dark strong,
.theme-dark b {
    color: var(--bs-body-color) !important;
}

.theme-dark code {
    background-color: var(--bs-tertiary-bg) !important;
    color: #f8f9fa !important;
    border: 1px solid #404040 !important;
}

.theme-dark pre {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid #404040 !important;
}

.theme-dark .btn-link {
    color: #9ec5fe !important;
}

.theme-dark .btn-link:hover,
.theme-dark .btn-link:focus {
    color: #cfe2ff !important;
}

.theme-dark .alert {
    border-color: #404040 !important;
}

.theme-dark .alert-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
    border-color: rgba(13, 202, 240, 0.3) !important;
    color: #9eeaf9 !important;
}

.theme-dark .alert-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
    border-color: rgba(25, 135, 84, 0.3) !important;
    color: #a3cfbb !important;
}

.theme-dark .alert-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: #f5c2c7 !important;
}

.theme-dark .dropdown-menu {
    background-color: var(--bs-secondary-bg) !important;
    border-color: #404040 !important;
}

.theme-dark .dropdown-item {
    color: var(--bs-body-color) !important;
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

.theme-dark .dropdown-item.active {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

/* Ensure proper contrast for badges in dark mode */
.theme-dark .badge {
    color: #ffffff !important;
}

.theme-dark .badge.bg-secondary {
    background-color: #6c757d !important;
}