/* Waitlist Popup Styles */
.wt-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 20px;
    box-sizing: border-box;
    animation: wt-popup-fadein 0.3s ease-out;
}

.wt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.wt-close {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 10;
}

.wt-close .popup-close {
    font-size: 24px;
    color: #777E90;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 5px;
}

.wt-close .popup-close:hover {
    color: #fff;
}

.wt-header {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

.wt-header h2 {
    font-size: 32px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #fff;
}

.wt-header p {
    font-size: 16px;
    color: #777E90;
    margin: 0;
    line-height: 1.4;
}

.wt-wrapper {
    background: #23262F;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 30px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Hotel Info Section */
.wt-hotel-info {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wt-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
}

.wt-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wt-hotel-details {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wt-hotel-details .hotel_name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

/* Room context info */
.wt-room-info {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

.wt-room-info strong {
    color: #fff;
    font-weight: 400;
    font-style: normal;
    margin-right: 6px;
}

.room-name-highlight {
    color: #fff;
    font-weight: 500;
    font-style: normal;
}

/* Disclaimer Banner */
.wt-disclaimer {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.25);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
}

.wt-disclaimer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #ffc107;
}

/* Form Styling */
.wt-hotel-form-wrapper {
    width: 100%;
}

.wt-form-group {
    margin-bottom: 20px;
}

.wt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.wt-hotel-form input,
.wt-hotel-form select,
.wt-hotel-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #777E90;
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.wt-hotel-form input:focus,
.wt-hotel-form select:focus,
.wt-hotel-form textarea:focus {
    outline: none;
    border-color: #4FF6B1;
    background: rgba(255, 255, 255, 0.08);
}

.wt-hotel-form input::placeholder,
.wt-hotel-form textarea::placeholder {
    color: #777E90;
    opacity: 1;
}

.wt-hotel-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.wt-hotel-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777E90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

.wt-hotel-form select option {
    background: #23262F;
    color: #fff;
}

/* Layout helpers */
.wt-full {
    width: 100%;
}

.wt-half {
    width: calc(50% - 10px);
    float: left;
}

.wt-half.first-half {
    margin-right: 20px;
}

.wt-form-group::after {
    content: "";
    display: table;
    clear: both;
}

/* DatePicker overrides for dark theme inside waitlist modal */
.wt-popup .datepicker__input,
.wt-popup .datepicker__input[readonly] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid #777E90 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #fff !important;
    font-size: 16px !important;
    height: auto !important;
    -webkit-text-fill-color: #fff !important;
    cursor: pointer;
}

.wt-popup .datepicker__input:focus,
.wt-popup .datepicker__input:hover {
    border-color: #4FF6B1 !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.wt-popup .datepicker__input::placeholder {
    color: #777E90 !important;
    -webkit-text-fill-color: #777E90 !important;
}

/* Ensure datepicker calendar popups appear above the waitlist modal */
#wt-checkin-date-calendar,
#wt-checkout-date-calendar {
    z-index: 100002 !important;
}

/* Number input styling */
.wt-hotel-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.wt-hotel-form input[type="number"]::-webkit-outer-spin-button,
.wt-hotel-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Submit Button */
.wt-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #4FF6B1, #06D77B);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wt-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #06D77B, #4FF6B1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 246, 177, 0.3);
}

.wt-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state spinner */
.wt-submit-btn:disabled::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: wt-spinner 1s linear infinite;
    margin-left: 8px;
}

/* Error Messages */
.wt-errors {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
}

.wt-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wt-error:last-child {
    margin-bottom: 0;
}

/* Input field error styling */
.wt-form-group input.wt-error,
.wt-form-group textarea.wt-error,
.wt-form-group select.wt-error,
.wt-form-group .datepicker__input.wt-error {
    border: 2px solid #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

.wt-form-group input.wt-error:focus,
.wt-form-group textarea.wt-error:focus,
.wt-form-group select.wt-error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
}

.wt-form-group input:not(.wt-error):focus,
.wt-form-group textarea:not(.wt-error):focus,
.wt-form-group select:not(.wt-error):focus {
    border-color: #4FF6B1 !important;
    box-shadow: 0 0 0 3px rgba(79, 246, 177, 0.1) !important;
}

/* Success Message */
.wt-success-message {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
}

.wt-success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4FF6B1, #06D77B);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    color: #000;
    margin: 0 auto 20px;
}

.wt-success-message h3 {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #fff;
}

.wt-success-message p {
    font-size: 16px;
    color: #777E90;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.wt-success-close {
    background: transparent;
    border: 2px solid #4FF6B1;
    color: #4FF6B1;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-success-close:hover {
    background: #4FF6B1;
    color: #000;
}

/* Payment Section */
.wt-payment-section {
    background: rgba(79, 246, 177, 0.05);
    border: 1px solid rgba(79, 246, 177, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.wt-section-header {
    text-align: center;
    margin-bottom: 20px;
}

.wt-section-header h4 {
    color: #4FF6B1;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.wt-section-header p {
    color: #777E90;
    font-size: 14px;
    margin: 0;
}

/* Terms and Conditions Section */
.wt-terms-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.wt-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.wt-terms-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #4FF6B1;
    cursor: pointer;
}

.wt-terms-checkbox label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

.wt-terms-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    max-height: 120px;
    overflow-y: auto;
}

.wt-terms-text {
    color: #CCCCCC;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-custom {
    display: none;
}

/* Animations */
@keyframes wt-popup-fadein {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wt-spinner {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Skyflow Card Fields */
.wt-skyflow-field {
    margin-bottom: 16px;
    min-height: 70px;
}

.wt-skyflow-row-thirds {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.wt-skyflow-row-thirds .wt-skyflow-field {
    margin-bottom: 0;
    min-height: 62px;
}

.wt-skyflow-billing {
    margin-top: 8px;
}

.wt-skyflow-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    margin: 20px 0;
}

.wt-skyflow-billing-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
}

/* Skyflow iframe containers */
.wt-skyflow-field iframe {
    width: 100% !important;
    height: 90px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wt-wrapper {
        margin: 20px;
        padding: 30px 20px 20px;
        max-height: calc(100vh - 40px);
    }

    .wt-header h2 {
        font-size: 28px;
    }

    .wt-hotel-info {
        flex-direction: column;
        gap: 15px;
    }

    .wt-image {
        width: 100%;
        height: 120px;
    }

    .wt-half {
        width: 100%;
        float: none;
    }

    .wt-half.first-half {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .wt-payment-section,
    .wt-terms-section {
        padding: 15px;
        margin: 15px 0;
    }

    .wt-section-header h4 {
        font-size: 16px;
    }

    .wt-terms-content {
        max-height: 100px;
    }
}

@media (max-width: 480px) {
    .wt-popup {
        padding: 10px;
    }

    .wt-wrapper {
        border-radius: 16px;
        padding: 25px 15px 15px;
    }

    .wt-header h2 {
        font-size: 24px;
    }

    .wt-close {
        right: 15px;
        top: 15px;
    }

    .wt-skyflow-row-thirds {
        grid-template-columns: 1fr;
    }
}
