/*
 * Booking Widget CSS
 * Version: 1.0.2
 * Description: Styles for the Booking Widget WordPress plugin
 */

/* Scope styles to booking widget only to avoid conflicts */
.booking-container * {
    box-sizing: border-box;
}

.booking-container {
    width: 100%;
    max-width: 1500px;
    display: flex;
    justify-content: center;
}

#destination {
    color: #7c7c7c !important;
}

.booking-widget {
    background: var(--widget-bg, #ffffff);
    backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 20px 50px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
    position: relative;
}

.form-group:last-child {
    flex: 0 0 auto;
    min-width: 200px;
}

/* Hide combined date field on desktop */
.form-group.mobile-combined-dates {
    display: none;
}

/* Custom DatePicker Styles - Inspired by One&Only Resorts */
.custom-datepicker {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 24px;
    animation: datepickerFadeIn 0.3s ease-out;
    display: none;
    width: 100%;
}

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

.custom-datepicker.show {
    display: block;
}

/* Datepicker Header */
.datepicker-header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.datepicker-title {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 1.5rem;
    letter-spacing: .25rem;
    color: #000000;
	text-align: center;
	text-transform: uppercase;
}

.datepicker-subtitle {
    font-size: 14px;
    color: #262626;
    margin-top: 2px;
    text-align: center;
}

.datepicker-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.month-head{
    text-transform: uppercase;
    font-family: "Times New Roman", Times, serif !important;
    font-size: 1.5rem;
    letter-spacing: .25rem;
}

.nav-btn {
    background: #ffffff;
    border: 1px solid var(--button-color, #d7a02a);
    border-radius: ;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--button-color, #d7a02a);;
    font-size: 20px;
}

.nav-btn:hover {
    background: var(--button-color, #d7a02a);
    border-color: var(--button-color, #d7a02a);
    color: #ffffff;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dual Month Layout */
.datepicker-months {
    display: flex;
    gap: 24px;
    padding: 10px 70px;
}

.datepicker-month {
    flex: 1;
}

.month-header {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #d7a02a33;
    color: #262626;
    border-radius: 0;
    font-size: 16px;
    font-weight: 400;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.calendar-weekday {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8fafc;
    border-radius: 0;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    background: #f5f5f5;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
}

.calendar-day:hover:not(.disabled):not(.outside-month) {
    /*background: #f1f5f9;*/
    background: rgba(215, 160, 42, .5);
    border-color: var(--button-color, #d7a02a);
    color: white;
}

.calendar-day.today {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-weight: 600;
}

.calendar-day.selected {
    background: var(--button-color, #d7a02a);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(215, 160, 42, 0.3);
}

.calendar-day.in-range {
    background: rgba(215, 160, 42, 0.15);
    color: #1a202c;
    border-color: rgba(215, 160, 42, 0.3);
}

.calendar-day.range-start,
.calendar-day.range-end {
    background: var(--button-color, #d7a02a);
    color: white;
    font-weight: 600;
    position: relative;
}

.calendar-day.range-start::after {
    content: 'Check-in';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--button-color, #d7a02a);
    font-weight: 600;
    white-space: nowrap;
}

.calendar-day.range-end::after {
    content: 'Check-out';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--button-color, #d7a02a);
    font-weight: 600;
    white-space: nowrap;
}

.calendar-day.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    background: #f8fafc;
}

.calendar-day.outside-month {
    color: #94a3b8;
    opacity: 0.4;
}

.calendar-day.weekend {
    color: #ef4444;
}

.calendar-day.weekend.selected,
.calendar-day.weekend.range-start,
.calendar-day.weekend.range-end {
    color: white;
}

/* Price Display - Hidden */
.day-price {
    display: none;
}

/* Availability Status - Hidden */
.calendar-day.available::before,
.calendar-day.limited::before,
.calendar-day.unavailable::before {
    display: none;
}

/* Legend - Hidden */
.datepicker-legend {
    display: none;
}

/* Selected Date Info */
.selected-info {
    background: #f8fafc;
    border-radius: 0;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #4a5568;
}

.selected-dates {
    font-weight: 600;
    color: var(--button-color, #d7a02a);
}

.date-range-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border-radius: 0;
    padding: 12px;
    margin-top: 16px;
    font-size: 14px;
    color: #4a5568;
}

.date-range-item {
    text-align: center;
    flex: 1;
}

.date-range-label {
    font-size: 12px;
    color: #262626;
    margin-top: 2px;
    text-align: center;
    margin-bottom: 4px;
}

.date-range-value {
    font-family: "Times New Roman", Times, serif !important;
    font-size: 1rem;
    letter-spacing: .25rem;
    color: var(--button-color, #d7a02a);
}

.date-range-separator {
    padding: 0 12px;
    color: #cbd5e0;
    font-weight: 600;
}

/* Responsive Design for Datepicker */
@media (max-width: 768px) {
    .custom-datepicker {
        width: 90vw;
        max-width: 400px;
        padding: 16px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        z-index: 9999;
        height: fit-content;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .custom-datepicker::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .datepicker-months {
        flex-direction: column;
        gap: 16px;
        padding: 0;
    }
    
    /* Hide the second month on mobile */
    .datepicker-month:nth-child(2) {
        display: none;
    }
    
    .datepicker-header {
        flex-direction: row;
        gap: 12px;
        text-align: center;
    }
    
    .calendar-day {
        min-height: 36px;
        font-size: 13px;
    }
    
    .day-price {
        font-size: 9px;
    }
}

.date-input,
.text-input,
.dropdown-input {
    padding: 15px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 0;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    outline: none;
    min-height: 52px;
    position: relative;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09375rem;
    text-transform: uppercase;
}

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

/* Modern calendar icon */
.date-input::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23d7a02a" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="3" ry="3" fill="%23f8f9fa" stroke="%23d7a02a"></rect><line x1="16" y1="2" x2="16" y2="6" stroke="%23d7a02a" stroke-width="2.5"></line><line x1="8" y1="2" x2="8" y2="6" stroke="%23d7a02a" stroke-width="2.5"></line><line x1="3" y1="10" x2="21" y2="10" stroke="%23d7a02a" stroke-width="1.5"></line><circle cx="8" cy="14" r="1" fill="%23d7a02a"></circle><circle cx="12" cy="14" r="1" fill="%23d7a02a"></circle><circle cx="16" cy="14" r="1" fill="%23d7a02a"></circle></svg>') no-repeat;
    background-size: 24px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    filter: none;
    border-radius: 0;
    transition: all 0.3s ease;
}

/* Focus states */
.date-input:focus,
.text-input:focus,
.dropdown-input:focus {
    border-color: var(--button-color, #d7a02a);
    box-shadow: 0 0 0 3px rgba(215, 160, 42, 0.15), 0 4px 12px rgba(215, 160, 42, 0.2);
    transform: translateY(-2px);
}

.text-input::placeholder {
    color: #9ca3af;
}

.dropdown-input {
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23d7a02a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>') no-repeat right 16px center;
    background-size: 20px;
    appearance: none;
    cursor: pointer;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09375rem;
}

/* Ensure dropdown options also inherit the correct font */
.dropdown-input option {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .09375rem;
    padding: 8px 12px;
}

.check-availability-btn {
    background: var(--button-color, #d7a02a);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 0;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .15625rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 52px;
    box-shadow: 0 8px 25px rgba(215, 160, 42, 0.3);
}

.check-availability-btn:hover {
    background: #c8901f;
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(215, 160, 42, 0.4);
}

.check-availability-btn:active {
    transform: translateY(0);
}

.check-availability-btn:focus {
    outline: 2px solid var(--button-color, #d7a02a);
    outline-offset: 2px;
}

.check-availability-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-widget {
        padding: 20px;
        border-radius: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .form-group {
        min-width: 100%;
        width: 100%;
    }
    
    /* Hide individual date fields on mobile */
    .form-group.mobile-hide {
        display: none;
    }
    
    /* Show combined date field on mobile */
    .form-group.mobile-combined-dates {
        display: block;
    }
    
    .check-availability-btn {
        width: 100%;
        padding: 18px;
        font-size: 16px;
    }
    
    /* Fix date input on mobile */
    .date-input {
        width: 100%;
        padding-right: 16px !important;
        background-position: right 12px center !important;
    }
}

@media (max-width: 480px) {
    .booking-container {
/*         padding: 10px; */
    }
    
    .booking-widget {
        padding: 15px;
        border-radius: 0;
    }
    
    .date-input,
    .text-input,
    .dropdown-input {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .check-availability-btn {
        padding: 16px;
        font-size: 15px;
    }
}

/* Animation for better UX */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Promo code success styling */
.promo-success {
    color: #10b981;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

/* Form interaction animations */
.form-group {
    transition: transform 0.2s ease;
}

/* Valid promo code styling */
.text-input.valid-promo {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Invalid promo code styling */
.text-input.invalid-promo {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Calendar icons for date inputs */
.date-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23d7a02a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 20px 20px !important;
    padding-right: 45px !important;
    cursor: pointer !important;
}

/* WordPress specific adjustments */
.booking-container * {
    font-family: 'Arial', sans serif;
}

/* Ensure proper styling in WordPress themes */
.booking-container .form-group input,
.booking-container .form-group select,
.booking-container .form-group button {
    box-shadow: initial;
    border-radius: 0 !important;
}

/* Override theme button styles */
.booking-container .check-availability-btn {
    background: var(--button-color, #d7a02a) !important;
    border: none !important;
    text-decoration: none !important;
}
