/* Date Badge Styles for Trip Form Enhancer */

.date-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #007bff;
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 500;
    line-height: 1;
    z-index: 10;
    pointer-events: none;
}

.date-badge--today {
    background: #28a745;
}

.date-badge--depart {
    background: #ffc107;
    color: #212529;
}

/* Calendar cell positioning for badges */
.calendar-cell {
    position: relative;
}

.calendar-cell .date-badge {
    top: 4px;
    right: 4px;
}

/* Date picker modal styling */
.date-modal .calendar-day {
    position: relative;
}

.date-modal .calendar-day.today::after {
    content: 'Bugün';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #28a745;
    color: white;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
    line-height: 1;
}

.date-modal .calendar-day.selected-depart::after {
    content: 'Gidiş';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ffc107;
    color: #212529;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
    line-height: 1;
}

/* Enhanced date input styling */
.form-input.date-input {
    cursor: pointer;
    background-color: #fff;
    position: relative;
}

.form-input.date-input:hover {
    background-color: #f8f9fa;
}

.form-input.date-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Loading state for selects */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

.form-select.loading {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23999'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m6 1.5 0 3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 12px;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error state styling */
.form-select.error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.form-group.error .form-select {
    border-color: #dc3545;
}

.form-group.error::after {
    content: 'Yüklenirken hata oluştu';
    position: absolute;
    bottom: -18px;
    left: 0;
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
}

/* Success state */
.form-select.success {
    border-color: #28a745;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .date-badge {
        font-size: 7px;
        padding: 1px 3px;
        border-radius: 1px;
    }
    
    .date-modal .calendar-day::after {
        font-size: 7px;
        padding: 1px 2px;
    }
}

/* Accessibility improvements */
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.date-input[readonly]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .date-badge {
        border: 1px solid currentColor;
        font-weight: 700;
    }
    
    .date-badge--today {
        background: #000;
        color: #fff;
    }
    
    .date-badge--depart {
        background: #fff;
        color: #000;
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .form-select.loading {
        animation: none;
    }
    
    .form-select.loading::after {
        content: '...';
        position: absolute;
        right: 0.75rem;
        color: #999;
    }
}
