/**
 * Booking Calendar Plugin Styles
 * Professional styling for car rental booking calendar
 */

/* ============================================
   Booking Calendar Container
   ============================================ */

:root {
    /* Colors */
    --accent-color: rgb(240, 107, 16);
	--cal-light-color: #fff3e0;

}

.booking-calendar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    padding: 20px;
    background: #fff;
}

.booking-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.booking-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Date Inputs
   ============================================ */

.booking-date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pickup-date-input,
.dropoff-date-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.pickup-date-input:hover,
.dropoff-date-input:hover {
    border-color: var(--accent-color);
}

.pickup-date-input:focus,
.dropoff-date-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(45, 156, 219, 0.1);
}

.pickup-date-input::placeholder,
.dropoff-date-input::placeholder {
    color: #999;
}

.booking-date-input-wrapper::after {
    content: '\f073';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    color: #666;
    pointer-events: none;
    font-size: 16px;
}

/* ============================================
   Time Select Dropdowns
   ============================================ */

.pickup-time-select,
.dropoff-time-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.pickup-time-select:hover,
.dropoff-time-select:hover {
    border-color: var(--accent-color);
}

.pickup-time-select:focus,
.dropoff-time-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(45, 156, 219, 0.1);
}

/* ============================================
   Calendar Popup
   ============================================ */

.booking-calendar-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 320px;
    font-family: 'Open Sans', sans-serif;
}

/* ============================================
   Calendar Header
   ============================================ */

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.month-year {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.prev-month,
.next-month {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.prev-month:hover,
.next-month:hover {
    background: #f0f0f0;
    color: var(--accent-color);
}

.prev-month:active,
.next-month:active {
    transform: scale(0.95);
}

/* ============================================
   Calendar Grid
   ============================================ */

.calendar-grid {
    width: 100%;
    border-collapse: collapse;
}

.calendar-grid thead th {
    padding: 10px 5px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid tbody td {
    padding: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-grid tbody td:not(.disabled):not(.other-month):hover {
    background: var(--cal-light-color);
    color: var(--accent-color);
    transform: scale(1.05);
}

.calendar-grid tbody td.today {
    
    background: var(--cal-light-color);
    color: var(--accent-color);
    font-weight: 700;
}

.calendar-grid tbody td.today:hover {
    background: var(--cal-light-color);
}

.calendar-grid tbody td.selected {
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
}

.calendar-grid tbody td.selected:hover {
    background: #1976d2;
}

.calendar-grid tbody td.disabled {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

.calendar-grid tbody td.disabled:hover {
    transform: none;
}

.calendar-grid tbody td.other-month {
    color: #bbb;
    cursor: default;
}

.calendar-grid tbody td.other-month:hover {
    background: transparent;
    transform: none;
}

/* ============================================
   Responsive Design
   ============================================ */

@media screen and (max-width: 768px) {
    .booking-calendar-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .booking-field-group {
        width: 100%;
        min-width: auto;
    }
    
    .booking-calendar-popup {
        left: 50% !important;
        transform: translateX(-50%);
        min-width: 300px;
        max-width: 90vw;
    }
}

@media screen and (max-width: 480px) {
    .booking-calendar-popup {
        padding: 15px;
        min-width: 280px;
    }
    
    .calendar-grid tbody td {
        padding: 6px;
        font-size: 13px;
    }
    
    .month-year {
        font-size: 16px;
    }
}

/* ============================================
   Animation Classes
   ============================================ */

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

.booking-calendar-popup.animated {
    animation: fadeIn 0.2s ease;
}

/* ============================================
   Accessibility
   ============================================ */

.pickup-date-input:focus-visible,
.dropoff-date-input:focus-visible,
.pickup-time-select:focus-visible,
.dropoff-time-select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.prev-month:focus-visible,
.next-month:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.calendar-grid tbody td:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .booking-calendar-popup {
        display: none !important;
    }
}

/* ============================================
   RTL Support
   ============================================ */

.booking-calendar-popup.rtl {
    direction: rtl;
}

.booking-calendar-popup.rtl .calendar-header {
    direction: rtl;
}

.booking-calendar-popup.rtl .prev-month {
    order: 3;
}

.booking-calendar-popup.rtl .next-month {
    order: 1;
}

.booking-calendar-popup.rtl .month-year {
    order: 2;
}

.booking-calendar-popup.rtl .calendar-grid {
    direction: rtl;
}

.booking-calendar-popup.rtl .calendar-grid thead th,
.booking-calendar-popup.rtl .calendar-grid tbody td {
    text-align: center;
}
