/* ============================================ */
/* CAR DETAILS PAGE STYLES */
/* ============================================ */

/* Calendar Container */
.calendar-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #475569;
    font-size: 18px;
}

.calendar-nav-btn:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.05);
}

.calendar-month-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 6px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    border: 2px solid transparent;
    user-select: none;
}

.calendar-day:hover:not(.empty):not(.past):not(.booked) {
    background: #eff6ff;
    border-color: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    z-index: 5;
}

.calendar-day.empty { cursor: default; pointer-events: none; }

.calendar-day.past {
    color: #cbd5e1;
    cursor: not-allowed;
    background: #f8fafc;
    pointer-events: none;
}

.calendar-day.booked {
    background: linear-gradient(135deg, #fecaca, #fca5a5) !important;
    color: #dc2626 !important;
    cursor: not-allowed !important;
    border-color: #ef4444 !important;
    font-weight: 700;
    pointer-events: none;
}

.calendar-day.booked::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
}

.calendar-day.available {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #86efac;
    font-weight: 600;
}

.calendar-day.available:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    border-color: #16a34a;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: white !important;
    border-color: #1d4ed8 !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    z-index: 10;
    font-weight: 700;
}

.calendar-day.in-range {
    background: #bfdbfe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
    font-weight: 600;
}

.calendar-today {
    font-weight: 800 !important;
    box-shadow: 0 0 0 3px #2563eb inset !important;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid;
}

.legend-color.available { background: #dcfce7; border-color: #86efac; }
.legend-color.booked { background: #fecaca; border-color: #ef4444; }
.legend-color.selected { background: #2563eb; border-color: #1d4ed8; }

/* Selected Dates Display */
.selected-dates-display {
    background: #eff6ff;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    border: 2px solid #bfdbfe;
    text-align: center;
}

/* Booked Ranges */
.booked-ranges { margin-top: 10px; max-height: 150px; overflow-y: auto; }

.booked-range-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #fef2f2;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    border-left: 3px solid #ef4444;
}

/* Location Options */
.location-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.location-option:hover { border-color: #2563eb; background: #f8fafc; }

.location-option.selected { border-color: #2563eb; background: #eff6ff; }

.location-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.location-option.selected .location-radio {
    border-color: #2563eb;
    background: #2563eb;
}

.location-option.selected .location-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Animations */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-down { animation: slideDown 0.3s ease forwards; }

/* Feature Tags */
.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 40px;
    font-size: 0.8rem;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.feature-tag:hover {
    background: #eff6ff;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.feature-tag i { font-size: 0.9rem; }

/* Pre-selected Banner */
.pre-selected-banner {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid #2563eb;
}

/* Loading Spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
    opacity: 0;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    visibility: visible;
    opacity: 1;
}

.loading-spinner-large {
    text-align: center;
    background: white;
    padding: 40px 50px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInScale 0.3s ease forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.loading-spinner-large .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #2563eb;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner-large .loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.loading-spinner-large .loading-subtext {
    font-size: 0.75rem;
    color: #64748b;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
    animation: progress 2s ease-out forwards;
}

@keyframes progress {
    0% { width: 0%; }
    30% { width: 30%; }
    60% { width: 60%; }
    100% { width: 100%; }
}

