/**
 * VietVed Booking Forms - Calendar Styles
 * Date picker popup - полностью соответствует оригиналу
 */

/* Date Input Wrapper */
.vietved-booking-form .vbf-date-input-wrapper {
    position: relative;
}

/* Calendar Popup */
.vietved-booking-form .vbf-calendar-popup {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    padding: 16px;
    margin-bottom: 8px;
    max-width: 100%;
    overflow: hidden;
}

.vietved-booking-form .vbf-calendar-popup.show {
    display: block;
}

/* Calendar Header */
.vietved-booking-form .vbf-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.vietved-booking-form .vbf-calendar-nav {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: var(--vietved-primary);
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vietved-booking-form .vbf-calendar-nav:hover {
    background: #f3f4f6;
}

.vietved-booking-form .vbf-calendar-title {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    flex: 1;
    text-align: center;
}

/* Calendar Grid */
.vietved-booking-form .vbf-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    max-width: 100%;
}

.vietved-booking-form .vbf-calendar-day-header {
    text-align: center;
    font-size: 12px;
    color: var(--vietved-muted);
    padding: 8px 2px;
    font-weight: 500;
}

.vietved-booking-form .vbf-calendar-day {
    text-align: center;
    padding: 8px 2px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: keep-all;
}

.vietved-booking-form .vbf-calendar-day:hover {
    background: #f3f4f6;
}

.vietved-booking-form .vbf-calendar-day.other-month {
    color: #d1d5db;
}

.vietved-booking-form .vbf-calendar-day.today {
    background: #F0F7FF;
    color: #0077ff;
    font-weight: 600;
}

.vietved-booking-form .vbf-calendar-day.selected {
    background: var(--vietved-primary);
    color: #fff;
    font-weight: 600;
}

.vietved-booking-form .vbf-calendar-day.in-range {
    background: #dbeafe;
    color: var(--vietved-primary);
}

.vietved-booking-form .vbf-calendar-day.range-start,
.vietved-booking-form .vbf-calendar-day.range-end {
    background: var(--vietved-primary);
    color: #fff;
    font-weight: 600;
}

.vietved-booking-form .vbf-calendar-day.past {
    color: #d1d5db;
    cursor: not-allowed;
}

.vietved-booking-form .vbf-calendar-day.past:hover {
    background: none;
}

/* Holiday */
.vietved-booking-form .vbf-calendar-day.holiday {
    background: #f59e0b;
    color: #fff;
    font-weight: 600;
    position: relative;
}

.vietved-booking-form .vbf-calendar-day.holiday:hover {
    background: #d97706;
}

/* Disabled holiday (cannot be booked) */
.vietved-booking-form .vbf-calendar-day.holiday.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.vietved-booking-form .vbf-calendar-day.holiday.disabled:hover {
    background: #f59e0b;
}

.vietved-booking-form .vbf-calendar-day.holiday.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #fff;
    transform: translateY(-50%) rotate(-15deg);
}

.vietved-booking-form .vbf-calendar-day.holiday.range-start,
.vietved-booking-form .vbf-calendar-day.holiday.range-end {
    background: var(--vietved-primary);
    color: #fff;
}

.vietved-booking-form .vbf-calendar-day.holiday.in-range {
    background: #dbeafe;
    color: var(--vietved-primary);
}

.vietved-booking-form .vbf-calendar-day.holiday.today {
    background: #dc2626;
    color: #fff;
    font-weight: 600;
}

/* High Season */
.vietved-booking-form .vbf-calendar-day.high-season {
    background: #FEF3C7;
    color: #92400e;
    font-weight: 500;
}

.vietved-booking-form .vbf-calendar-day.high-season:hover {
    background: #fde68a;
}

.vietved-booking-form .vbf-calendar-day.high-season.holiday {
    background: #f59e0b;
    color: #fff;
    font-weight: 600;
}

.vietved-booking-form .vbf-calendar-day.high-season.today {
    background: #dc2626;
    color: #fff;
    font-weight: 600;
}

.vietved-booking-form .vbf-calendar-day.high-season.range-start,
.vietved-booking-form .vbf-calendar-day.high-season.range-end {
    background: var(--vietved-primary);
    color: #fff;
}

.vietved-booking-form .vbf-calendar-day.high-season.in-range {
    background: #dbeafe;
    color: var(--vietved-primary);
}

/* Unavailable dates */
.vietved-booking-form .vbf-calendar-day.unavailable {
    background: #fecaca;
    color: #991b1b;
    font-weight: 600;
    cursor: not-allowed;
    position: relative;
}

.vietved-booking-form .vbf-calendar-day.unavailable:hover {
    background: #fca5a5;
}

.vietved-booking-form .vbf-calendar-day.unavailable::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #991b1b;
    transform: translateY(-50%) rotate(-15deg);
}

/* On Request dates */
.vietved-booking-form .vbf-calendar-day.on-request {
    background: #fef3c7;
    color: #92400e;
    font-weight: 500;
}

.vietved-booking-form .vbf-calendar-day.on-request:hover {
    background: #fde68a;
}

.vietved-booking-form .vbf-calendar-day.on-request::before {
    content: '?';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: #92400e;
}

/* Other Price dates */
.vietved-booking-form .vbf-calendar-day.special-price {
    background: #d1fae5;
    color: #065f46;
    font-weight: 500;
}

.vietved-booking-form .vbf-calendar-day.special-price:hover {
    background: #a7f3d0;
}

.vietved-booking-form .vbf-calendar-day.special-price::before {
    content: '$';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    font-weight: bold;
    color: #065f46;
}

/* Calendar Holidays Info */
.vietved-booking-form .vbf-calendar-holidays {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.5;
}

/* Calendar Info Tip */
.vietved-booking-form .vbf-calendar-info-tip {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.vietved-booking-form .vbf-calendar-info-tip-text {
    color: #0c4a6e;
    font-size: 11px;
    line-height: 1.3;
    margin: 0;
}

/* High Season Info */
.vietved-booking-form .vbf-calendar-high-season-info {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.vietved-booking-form .vbf-calendar-high-season-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
    font-size: 12px;
}

.vietved-booking-form .vbf-calendar-high-season-text {
    color: #78350f;
    font-size: 12px;
    line-height: 1.4;
}

/* Calendar Holidays Title and Items */
.vietved-booking-form .vbf-calendar-holidays-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.vietved-booking-form .vbf-calendar-holiday-item {
    color: #6b7280;
    margin-bottom: 4px;
}

.vietved-booking-form .vbf-calendar-holiday-item strong {
    color: #f59e0b;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .vietved-booking-form .vbf-date-input-wrapper {
        position: relative;
    }

    .vietved-booking-form .vbf-calendar-popup {
        position: absolute !important;
        bottom: 100% !important;
        left: 5px !important;
        right: 5px !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        margin-bottom: 8px !important;
        padding: 15px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
        z-index: 1000 !important;
    }

    .vietved-booking-form .vbf-calendar-popup.show {
        display: block !important;
    }

    .vietved-booking-form .vbf-calendar-header {
        margin-bottom: 12px;
    }

    .vietved-booking-form .vbf-calendar-grid {
        gap: 3px;
    }

    .vietved-booking-form .vbf-calendar-day {
        font-size: 14px;
        min-height: 36px;
        padding: 8px 4px;
    }

    .vietved-booking-form .vbf-calendar-day-header {
        font-size: 12px;
        padding: 8px 4px;
    }

    .vietved-booking-form .vbf-calendar-nav {
        font-size: 18px;
        min-width: 36px;
        height: 36px;
        padding: 8px;
    }

    .vietved-booking-form .vbf-calendar-title {
        font-size: 16px;
    }
}

/* Calendar Tooltip */
.vietved-booking-form .vbf-calendar-tooltip {
    position: absolute;
    background: #1f2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vietved-booking-form .vbf-calendar-tooltip.show {
    opacity: 1;
}

.vietved-booking-form .vbf-calendar-tooltip::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1f2937;
}
