/* Custom styles for Schützenfest Zeiterfassung */

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

[data-bs-theme="light"] .bg-dark {
    background-color: #f0f0f0 !important;
}

[data-bs-theme="light"] .navbar-dark {
    background-color: #0b5ed7 !important;
}

[data-bs-theme="light"] .text-muted {
    color: #555 !important;
}

[data-bs-theme="light"] .time-grid-header,
[data-bs-theme="light"] .time-grid-label {
    background-color: #dee2e6;
    color: #333;
}

[data-bs-theme="light"] .time-grid-cell {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Logo styles */
.navbar-logo {
    height: 50px;
    width: auto;
    border-radius: 5px;
    margin-bottom: 4px;
}

.navbar-brand {
    margin-right: 3rem;
}

/* Navigation styles */
.nav-link.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--bs-primary);
    border-radius: 2px;
}

/* Utility classes */
.checkin-btn {
    min-height: 80px;
    font-size: 1.5rem;
    font-weight: bold;
}

.staff-status {
    border-left-width: 5px !important;
    border-left-style: solid !important;
}

/* Animation for check-in/check-out button */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Time grid styles */
.time-grid {
    display: grid;
    grid-template-columns: 100px repeat(24, 1fr);
    gap: 2px;
    overflow-x: auto;
}

.time-grid-header {
    background-color: var(--bs-secondary);
    padding: 8px 4px;
    text-align: center;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-grid-row {
    display: contents;
}

.time-grid-cell {
    background-color: var(--bs-dark);
    padding: 8px 4px;
    min-height: 40px;
    text-align: center;
}

.time-grid-label {
    background-color: var(--bs-secondary);
    padding: 8px;
    font-weight: bold;
    position: sticky;
    left: 0;
    z-index: 5;
    color: #000000 !important; /* Setzt Textfarbe auf Schwarz für Bereichsbezeichnungen */
}

.time-entry-block {
    position: relative;
    height: 30px;
    margin: 2px 0;
    border-radius: 4px;
    padding: 2px 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

/* Color for active staff */
.currently-active {
    background-color: var(--bs-success);
    animation: pulse 2s infinite;
}

/* Styling für Mitarbeiter-Badges im Kalender */
.staff-badge {
    display: inline-block;
    margin: 0 2px;
    padding: 2px 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    color: #000000 !important; /* Setzt Textfarbe auf Schwarz für Mitarbeiter-Badges */
}

.schedule-badge {
    display: inline-block;
    padding: 5px;
    margin-bottom: 2px;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    color: #000000 !important; /* Setzt Textfarbe auf Schwarz für alle Zeitplanbadges */
}

/* Styling für Mitarbeiterauswahl */
.text-decoration-line-through {
    text-decoration: line-through !important;
}

select option[class*="text-decoration-line-through"] {
    color: #FF0000 !important;
    background-color: #fff0f0 !important;
    font-style: italic !important;
}

select option.unavailable {
    color: #FF0000 !important;
    text-decoration: line-through !important;
    background-color: #fff0f0 !important;
}

/* Modal Fixes */
.modal-backdrop {
    opacity: 0.5 !important;
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

.modal-dialog {
    margin: 1.75rem auto;
    pointer-events: all;
}

.modal-content {
    pointer-events: all;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .time-grid {
        grid-template-columns: 80px repeat(24, 70px);
    }
}
