/* Booking form base styles (moved from the template so they load in the page head). */
.iti {
    width: 100%;
}

.iti__flag-container {
    height: 48px;
}

.iti__selected-flag {
    height: 48px;
    background-color: var(--thb-field);
    border: 1px solid var(--thb-line);
    border-right: none;
    border-radius: var(--thb-radius);
    padding: 0 12px;
}

.iti__arrow {
    margin-left: 8px;
}

.iti input[type=tel] {
    height: 48px;
    border: 1px solid var(--thb-line);
    border-left: none;
    border-radius: var(--thb-radius);
    padding: 0 12px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.iti input[type=tel]:focus {
    outline: none;
}

.iti__country-list {
    z-index: 9999;
    max-height: 200px;
    border: 1px solid var(--thb-line);
    border-radius: var(--thb-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.iti__country {
    padding: 8px 12px;
}

.iti__country:hover {
    background-color: var(--thb-soft);
}

.iti__country.iti__highlight {
    background-color: var(--thb-accent);
    color: white;
}

/* Error state */
.iti.iti--error input[type=tel] {
    border-color: var(--thb-error);
}

.iti.iti--error .iti__selected-flag {
    border-color: var(--thb-error);
}

/* Valid state */
.iti.iti--valid input[type=tel] {
    border-color: var(--thb-ok);
}

.iti.iti--valid .iti__selected-flag {
    border-color: var(--thb-ok);
}

/* Cancellation Policy Modal Styles */
.ghl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ghl-modal.active {
    opacity: 1;
    visibility: visible;
}

.ghl-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.ghl-modal-content {
    position: relative;
    background: var(--thb-field);
    border-radius: var(--thb-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.ghl-modal.active .ghl-modal-content {
    transform: scale(1);
}

.ghl-modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--thb-line);
    padding-bottom: 16px;
    margin-bottom: 0;
}

.ghl-modal-header h3 {
    text-align: center;
    font-size: 16px;
    text-transform: capitalize;
    letter-spacing: 0.3rem;
    font-family: var(--thb-font-body);
    margin: 0;
    letter-spacing: 0px;
}

.ghl-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--thb-muted);
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: var(--thb-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ghl-modal-close:hover {
    color: var(--thb-ink);
    background-color: var(--thb-soft);
}

.ghl-modal-close svg {
    width: 20px;
    height: 20px;
}

.ghl-modal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 18px;
    color: var(--thb-ink);
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.ghl-modal-body p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--thb-ink);
    line-height: 1.5;
}

.ghl-modal-body p:last-child {
    margin-bottom: 0;
}

.ghl-modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--thb-line);
}

.ghl-modal-footer .ghl-button {
    min-width: 120px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ghl-modal {
        padding: 16px;
    }
    
    .ghl-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .ghl-modal-header,
    .ghl-modal-body,
    .ghl-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .ghl-modal-header h3 {
        font-size: 20px;
    }
    
    .ghl-modal-body {
        font-size: 14px;
        max-height: calc(90vh - 140px);
    }
}

/* Animation for modal entrance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Prevent body scroll when modal is open */
body.ghl-modal-open {
    overflow: hidden;
}

/* Highlight styles for cancellation policy */
.ghl-highlight-terms {
    background-color: rgba(231, 84, 128, 0.1);
    border: 2px solid var(--thb-accent);
    border-radius: var(--thb-radius);
    padding: 5px;
    margin-bottom: 10px !important;
    transition: all 0.3s ease;
}

.ghl-highlight-terms label {
    margin-bottom: 0 !important;
}

.ghl-pulse-animation {
    animation: ghl-pulse 1.5s infinite;
}

@keyframes ghl-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 84, 128, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 84, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 84, 128, 0);
    }
}

/* Enhanced button highlight for Book Your Table */
.ghl-button-highlight {
    animation: ghl-button-pulse 2s infinite;
    box-shadow: 0 0 20px rgba(231, 84, 128, 0.6);
}

@keyframes ghl-button-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(231, 84, 128, 0.6);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(231, 84, 128, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(231, 84, 128, 0.6);
    }
}


