/**
 * Custom styles for Rubei Teamverwaltung
 */

/* Tab styling */
.tab-btn {
    @apply px-3 py-2 text-sm font-medium text-gray-500 border-b-2 border-transparent hover:text-gray-700 hover:border-gray-300;
}

.tab-btn.active {
    @apply text-blue-600 border-blue-500;
}

/* Calendar styling */
.calendar-day {
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background-color: #f3f4f6;
}

/* Day colors */
.day-yellow { 
    background-color: #fef3c7; 
} /* Feiertag */

.day-blue { 
    background-color: #dbeafe; 
} /* Urlaub */

.day-red { 
    background-color: #fee2e2; 
} /* Krank */

.day-purple { 
    background-color: #e9d5ff; 
} /* Kein Entgelt */

.day-gray { 
    background-color: #f3f4f6; 
} /* Weekend/Birou */

.day-green { 
    background-color: #d1fae5; 
} /* Local */

.day-orange { 
    background-color: #fed7aa; 
} /* Deplasări */

/* Modal styling */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Form styling */
.form-input {
    @apply mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-select {
    @apply mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

.form-textarea {
    @apply mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500;
}

/* Button styling */
.btn-primary {
    @apply bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500;
}

.btn-secondary {
    @apply bg-gray-300 text-gray-700 px-4 py-2 rounded-md hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500;
}

.btn-danger {
    @apply bg-red-600 text-white px-4 py-2 rounded-md hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500;
}

/* Card styling */
.card {
    @apply bg-white p-6 rounded-lg shadow-md border;
}

.card-header {
    @apply flex justify-between items-center mb-4;
}

.card-title {
    @apply text-lg font-semibold text-gray-900;
}

.card-content {
    @apply text-gray-600;
}

/* Notification styling */
.notification {
    @apply fixed top-4 right-4 p-4 rounded-md shadow-lg z-50;
}

.notification-success {
    @apply bg-green-500 text-white;
}

.notification-error {
    @apply bg-red-500 text-white;
}

/* Loading spinner */
.spinner {
    @apply inline-block w-4 h-4 border-2 border-gray-300 border-t-blue-600 rounded-full animate-spin;
}

/* Responsive design */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
    }
    
    .card {
        @apply p-4;
    }
    
    .tab-btn {
        @apply px-2 py-1 text-xs;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .calendar-day {
        min-height: auto;
        page-break-inside: avoid;
    }
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Status indicators */
.status-indicator {
    @apply inline-block w-2 h-2 rounded-full;
}

.status-active {
    @apply bg-green-500;
}

.status-inactive {
    @apply bg-gray-400;
}

.status-warning {
    @apply bg-yellow-500;
}

.status-error {
    @apply bg-red-500;
}

/* Tooltip */
.tooltip {
    @apply relative;
}

.tooltip:hover .tooltip-text {
    @apply visible opacity-100;
}

.tooltip-text {
    @apply invisible absolute z-10 px-2 py-1 text-xs text-white bg-gray-900 rounded opacity-0 transition-opacity duration-300;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
}

.tooltip-text::after {
    content: "";
    @apply absolute top-full left-1/2 transform -translate-x-1/2;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

/* Data table styling */
.data-table {
    @apply min-w-full divide-y divide-gray-200;
}

.data-table thead {
    @apply bg-gray-50;
}

.data-table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.data-table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.data-table tbody tr {
    @apply bg-white hover:bg-gray-50;
}

.data-table tbody tr:nth-child(even) {
    @apply bg-gray-50;
}

/* Form validation */
.form-error {
    @apply text-red-600 text-sm mt-1;
}

.form-success {
    @apply text-green-600 text-sm mt-1;
}

.input-error {
    @apply border-red-500 focus:ring-red-500 focus:border-red-500;
}

.input-success {
    @apply border-green-500 focus:ring-green-500 focus:border-green-500;
}

/* Loading states */
.loading {
    @apply opacity-50 pointer-events-none;
}

.loading::after {
    content: "";
    @apply absolute inset-0 bg-white bg-opacity-75 flex items-center justify-center;
}

.loading::before {
    content: "";
    @apply w-6 h-6 border-2 border-gray-300 border-t-blue-600 rounded-full animate-spin;
}

/* Responsive grid */
.grid-responsive {
    @apply grid grid-cols-1 gap-4;
}

@media (min-width: 640px) {
    .grid-responsive {
        @apply grid-cols-2;
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        @apply grid-cols-3;
    }
}

@media (min-width: 1280px) {
    .grid-responsive {
        @apply grid-cols-4;
    }
}

/* Custom focus styles */
.focus-ring:focus {
    @apply outline-none ring-2 ring-offset-2 ring-blue-500;
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .card {
        @apply bg-gray-800 border-gray-700;
    }
    
    .dark-mode .form-input {
        @apply bg-gray-800 border-gray-600 text-white;
    }
}
