/* Dark mode overrides for tables and text */

/* Dark mode styles */
[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #f8f9fa;
    --bs-table-striped-color: #f8f9fa;
    --bs-table-hover-color: #f8f9fa;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
}

/* Override text colors in dark mode */
[data-bs-theme="dark"] .table .text-dark,
[data-bs-theme="dark"] .table .text-gray-800,
[data-bs-theme="dark"] .table .text-gray-700,
[data-bs-theme="dark"] .table .text-gray-600 {
    color: #f8f9fa !important;
    opacity: 1 !important;
}

/* Light mode: make striped table rows more visible */
[data-bs-theme="light"] .table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #e5edf9 !important; /* darker light blue-gray */
    border-bottom-color: #c5d4f0 !important; /* subtle separator */
}

/* Override text-muted in dark mode */
[data-bs-theme="dark"] .table .text-muted {
    color: #adb5bd !important;
    opacity: 1 !important;
}

/* Dark mode table rows */
[data-bs-theme="dark"] .table > :not(caption) > * > * {
    color: #f8f9fa;
    border-bottom-color: #495057;
}

/* Dark mode table header */
[data-bs-theme="dark"] .table thead th {
    color: #f8f9fa;
    background-color: #2d333b;
    border-bottom-color: #495057;
}

/* Dark mode table hover effect */
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Form Validation */
/* Base styles for validation */
.valid.modified:not([type=checkbox]) {
    border-color: #198754 !important;
}

.invalid {
    border-color: #dc3545 !important;
}

.validation-message {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Dark mode overrides for validation */
[data-bs-theme="dark"] .invalid {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

[data-bs-theme="dark"] .validation-message {
    color: #ff6b6b;
}

/* Fix for pagination in dark mode */
[data-bs-theme="dark"] .page-link {
    background-color: #2d333b;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #2d333b;
    color: #6c757d;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Fix for form controls in dark mode */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2d333b;
    border-color: #495057;
    color: #f8f9fa;
}

/* Pagination active state styles */
.pagination .page-item.active .page-link, 
.page-item.active .page-link { 
    background-color: #1C6E62 !important; 
    border-color: #1C6E62 !important; 
    color: #FFFFFF !important; 
} 

.pagination .page-item.active .page-link:hover, 
.pagination .page-item.active .page-link:focus, 
.page-item.active .page-link:hover, 
.page-item.active .page-link:focus { 
    background-color: #1C6E62 !important; 
    border-color: #1C6E62 !important; 
    color: #FFFFFF !important; 
    box-shadow: none !important; 
} 

[data-bs-theme="dark"] .pagination .page-item.active .page-link, 
[data-bs-theme="dark"] .page-item.active .page-link { 
    background-color: #1C6E62 !important; 
    border-color: #1C6E62 !important; 
    color: #FFFFFF !important; 
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2d333b;
    border-color: #86b7fe;
    color: #f8f9fa;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Fix for dropdowns in dark mode */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2d333b;
    border-color: #495057;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #3a4046;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: #495057;
}

/* Page title colors for dark/light theme */
.page-title {
    color: var(--bs-heading-color) !important;
}

[data-bs-theme="dark"] .page-title {
    color: var(--bs-gray-100) !important;
}

/* Tavuk Saat (Chicken Clock) Styles */
.hen-clock {
    background-color: #1C6E62;
    color: #FFD166;
    padding: 0.55rem 0.9rem;
    border-radius: 0.6rem;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(28, 110, 98, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.hen-clock:hover {
    box-shadow: 0 4px 12px rgba(28, 110, 98, 0.5);
    transform: translateY(-1px);
}

.hen-clock svg {
    flex-shrink: 0;
}

.hen-clock [data-clock-text] {
    font-weight: 900;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.8px;
    color: #FFD166;
    font-size: 15px;
}

.hen-clock [data-clock-date] {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #FFD166;
    text-transform: capitalize;
}

/* Tavuk başı animasyonu */
.hen-head {
    transform-origin: 50% 60%;
    transition: transform 180ms ease-out;
}

/* Tavuk kanat animasyonu */
.hen-wing {
    transform-origin: 30% 50%;
    transition: transform 180ms ease-out;
}

/* Göz kırpma animasyonu */
.hen-eye {
    position: relative;
}

.hen-eye .eyelid {
    transform-origin: center;
    transition: transform 100ms ease-out;
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

/* Yumurta efekti */
.hen-egg {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    animation: egg 2s ease-out forwards;
    pointer-events: none;
}

@keyframes egg {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(25px) scale(0.6);
    }
}

/* Header title theming */
.brand-title {
    color: var(--bs-emphasis-color);
    transition: color 0.2s ease;
}

[data-bs-theme="dark"] .brand-title {
    color: #fff !important;
}

[data-bs-theme="light"] .brand-title {
    color: #0F172A !important;
}
