/* Booking Popup Styles */
* {
    box-sizing: border-box;
}

/* Overlay */
.booking-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.booking-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Container Wrapper */
.booking-popup-container {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Inner scroll wrapper */
.booking-popup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    pointer-events: none;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.booking-popup-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #FF0066;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 100000;
    box-shadow: 0 2px 8px rgba(255, 0, 102, 0.3);
}

.booking-popup-close:hover {
    background: #e60059;
    transform: scale(1.1);
}

.booking-popup-close svg {
    stroke: #fff;
}

/* Steps */
.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeInStep 0.3s ease;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Typography */
.booking-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
    text-align: center;
}

.booking-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 30px 0;
    text-align: center;
    line-height: 1.5;
}

.booking-link {
    color: #FF0066;
    text-decoration: none;
    font-weight: 600;
}

.booking-link:hover {
    text-decoration: underline;
}

/* Form */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Groups */
.booking-input-group {
    position: relative;
}

.booking-input {
    width: 100%;
    padding: 10px 18px;
    font-size: 15px;
    border: 1px solid #1e1e1e;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.booking-input:focus {
    border-color: #FF0066;
    box-shadow: 0 0 0 3px rgba(255, 0, 102, 0.1);
}

.booking-payment-section  .booking-input.error {
    border-color: #FF0066;
}

.booking-input::placeholder {
    color: #999;
}

/* Phone Input with Country Code */
.booking-input-phone {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
}

.booking-input-phone .booking-dropdown-list.active {
    z-index: 10000 !important;
}

.booking-input-phone:has(.booking-dropdown-list.active) {
    z-index: 100;
}

/* Keep elements below behind dropdown when it's open */
.booking-input-phone ~ .booking-input-group {
    z-index: 1;
}

.booking-flag-icon {
    position: absolute;
    left: 14px;
    width: 28px;
    height: 21px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Custom Country Dropdown */
.booking-country-dropdown {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.booking-dropdown-toggle {
    cursor: pointer;
    padding: 6px 8px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 6;
}

.booking-dropdown-toggle::after {
    content: '▼';
    font-size: 9px;
    color: #999;
    margin-left: 2px;
    opacity: 0;
}

.booking-dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 280px;
    max-height: 280px;
    overflow-y: auto;
    list-style: none;
    padding: 8px 0;
    margin: 4px 0 0 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.booking-dropdown-list.active {
    display: block;
}

.booking-dropdown-list li {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-size: 13px;
    color: #333;
}

.booking-dropdown-list li:hover {
    background: #f5f5f5;
}

.booking-dropdown-list li:active {
    background: #efefef;
}

.booking-dropdown-list li img {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.booking-dropdown-list li span {
    font-size: 14px;
    color: #333;
}

.booking-country-prefix {
    position: relative;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    z-index: 1;
    pointer-events: none;
    min-width: 35px;
    white-space: nowrap;
    padding-left: 27px;
    transition: opacity 0.2s;
}

.booking-dropdown-list.active ~ .booking-country-prefix {
    opacity: 0;
    pointer-events: none;
}

.booking-input-phone .booking-input {
    width: 100%;
    padding-left: 68px;
}

.booking-input-phone .booking-input::placeholder {
    color: #999;
}

/* Input Labels */
.booking-input-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Buttons */
.booking-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.booking-btn-primary {
    background: #FF0066;
    color: #fff;
}

.booking-btn-primary:hover {
    background: #e60059;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 102, 0.3);
}

.booking-btn-primary:active {
    transform: translateY(0);
}

.booking-btn-social {
    background: #fff;
    color: #333;
    border: 1.5px solid #e0e0e0;
}

.booking-btn-social:hover {
    border-color: #ccc;
    background: #f9f9f9;
}

.booking-btn-facebook svg,
.booking-btn-google svg {
    flex-shrink: 0;
}

/* Divider */
.booking-divider {
    position: relative;
    text-align: center;
    margin: 8px 0;
}

.booking-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e0e0e0;
}

.booking-divider span {
    position: relative;
    display: inline-block;
    padding: 0 16px;
    background: #fff;
    color: #999;
    font-size: 13px;
}

/* Checkbox & Terms */
.booking-terms {
    margin-top: 1px;
}

.booking-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.booking-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Plan Selection Styles */
.booking-header-with-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.booking-header-with-dropdown .booking-title {
    margin: 0;
    text-align: left;
    font-size: 24px;
}

.booking-plan-selector {
    position: relative;
}

.booking-plan-dropdown {
    padding: 8px 32px 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #FF0066;
    border: 1.5px solid #FFE5F0;
    background: #FFF5F9 url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23FF0066' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    border-radius: 20px;
    cursor: pointer;
    outline: none;
    appearance: none;
}

.booking-plan-dropdown:hover {
    background-color: #FFE5F0;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23FF0066' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* Billing Type Radio */
.booking-billing-type {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 12px;
}

.booking-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
}

.booking-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #FF0066;
}

/* Staff Counter */
.booking-staff-counter {
    padding: 12px 0;
    margin-bottom: 12px;
}

.booking-label {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

.booking-counter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.booking-counter-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    color: #FF0066;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-counter-btn:hover {
    background: #FFE5F0;
}

.booking-counter-value {
    font-size: 16px;
    font-weight: 700;
    color: #FF0066;
    min-width: 24px;
    text-align: center;
}

/* Amount Section */
.booking-amount-section {
    padding: 12px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.booking-amount-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.booking-amount {
    font-size: 18px;
    font-weight: 700;
    color: #FF0066;
}

.booking-payment-date {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Payment Section */
.booking-payment-section {
    padding: 20px 0 0 0;
    border-top: 1px solid #f0f0f0;
}

.booking-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
}

/* Payment Row Layout */
.booking-payment-row {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

/* Row 1: Card Number + CVV */
.booking-payment-row:first-child {
    grid-template-columns: 2fr 1fr;
}

.booking-payment-card-number {
    grid-column: 1;
}

.booking-payment-cvv {
    grid-column: 2;
}

/* Row 2: Month + Year + Zip Code */
.booking-payment-row:last-child {
    grid-template-columns: 1fr 1fr 1fr;
}

.booking-payment-month {
    grid-column: 1;
}

.booking-payment-year {
    grid-column: 2;
}

.booking-payment-zip {
    grid-column: 3;
}

/* Legacy support */
.booking-card-inputs {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.booking-input-full {
    grid-column: 1;
}

.booking-input-small {
    grid-column: 2;
}

.booking-payment-section .booking-input {
    border: none;
    border-bottom: 2px solid #d0d0d0;
    border-radius: 0;
    padding: 10px 4px;
}

.booking-payment-section .booking-input:focus {
    border-bottom-color: #FF0066;
    box-shadow: none;
}

.booking-input-group {
    position: relative;
}

.booking-error-message {
    font-size: 12px;
    color: #FF0066;
    margin: 4px 0 0 0;
    display: none;
    position: relative;
    z-index: 2;
}

.booking-error-message.show {
    display: block;
}

/* Form Error Message (API errors) */
.booking-form-error {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    /* margin-bottom: 16px; */
    border-left: 4px solid #FF0066;
    line-height: 1.5;
}

.booking-zip-error {
    font-size: 12px;
    color: #FF0066;
    margin: 6px 0 0 0;
    display: none;
}

.booking-zip-error.show {
    display: block;
}

/* Success State */
.booking-success-icon {
    text-align: center;
    margin-bottom: 24px;
}

.booking-success-icon svg {
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .booking-popup-overlay {
        padding: 10px;
    }
    
    .booking-popup-container {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        /* overflow-y: auto; */
        margin: 0;
    }
}

@media (max-width: 576px) {
    .booking-popup-container {
        padding: 16px 10px;
        border-radius: 16px;
        margin: 0;
    }
    
    .booking-popup-close {
        top: -14px;
        right: -14px;
        width: 28px;
        height: 28px;
    }
    
    .booking-title {
        font-size: 24px;
        margin: 0 0 6px 0;
    }
    
    .booking-subtitle {
        font-size: 13px;
        margin: 0 0 16px 0;
    }
    
    /* Payment Rows on Mobile */
    .booking-payment-row:first-child {
        grid-template-columns: 2fr 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .booking-payment-row:last-child {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .booking-card-inputs {
        grid-template-columns: 2fr 1fr;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .booking-input-full {
        grid-column: 1;
    }
    
    .booking-input-small {
        grid-column: 2;
    }
    
    .booking-header-with-dropdown {
        flex-direction: row;
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }
    
    .booking-plan-dropdown {
        width: auto;
    }
    
    .booking-form {
        gap: 8px;
    }
    
    .booking-input {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .booking-billing-type {
        gap: 8px;
        padding: 2px 0;
        margin-bottom: 2px;
    }
    
    .booking-staff-counter {
        padding: 2px 0;
        margin-bottom: 2px;
    }
    
    .booking-amount-section {
        padding: 4px;
        margin-bottom: 4px;
    }
    
    .booking-payment-section {
        padding: 8px 0 0 0;
    }
    
    .booking-payment-section .booking-input {
        padding: 6px 2px;
        font-size: 14px;
    }
    
    .booking-section-title {
        font-size: 15px;
        margin: 0 0 10px 0;
    }
    
    .booking-divider {
        margin: 2px 0;
    }
    
    .booking-btn {
        padding: 10px 18px;
        font-size: 15px;
    }
}

/* Scrollbar Custom */
.booking-popup-container::-webkit-scrollbar {
    width: 6px;
}

.booking-popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.booking-popup-container::-webkit-scrollbar-thumb {
    background: #FF0066;
    border-radius: 10px;
}

.booking-popup-container::-webkit-scrollbar-thumb:hover {
    background: #e60059;
}

/* Review & Pay Now Step */
#stepPayNow .booking-title {
    margin-bottom: 6px;
}

#stepPayNow .booking-subtitle {
    margin-bottom: 16px;
}

#stepPayNow .booking-terms {
    margin-top: 12px;
    margin-bottom: 0;
}

.booking-review-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.booking-review-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.booking-review-heading {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
}

.booking-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e8e8e8;
    gap: 12px;
}

.booking-review-item:last-child {
    border-bottom: none;
}

.booking-review-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.booking-review-value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    text-align: right;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-review-total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 2px solid #FF0066 !important;
}

.booking-review-total .booking-review-label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.booking-review-total .booking-review-value {
    font-size: 16px;
    font-weight: 700;
    color: #FF0066;
}

/* Button Group */
.booking-button-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.booking-button-group .booking-btn {
    flex: 1;
}

.booking-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.booking-btn-secondary:hover {
    background: #e0e0e0;
}

/* Large Screens */
@media (min-width: 1024px) {
    .booking-popup-container,
    .booking-popup-container::before {
        min-height: 787px;
    }
    
    /* Increase height when error is displayed */
    .booking-popup-container.has-error,
    .booking-popup-container.has-error::before {
        min-height: 870px;
    }
}

/* Mobile Responsive for Review */
@media (max-width: 576px) {
    #stepPayNow .booking-title {
        margin-bottom: 4px;
    }
    
    #stepPayNow .booking-subtitle {
        margin-bottom: 12px;
    }
    
    #stepPayNow .booking-terms {
        margin-top: 8px;
    }
    
    .booking-review-container {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .booking-review-section {
        padding: 10px;
    }
    
    .booking-review-heading {
        font-size: 14px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }
    
    .booking-review-item {
        padding: 4px 0;
    }
    
    .booking-review-label,
    .booking-review-value {
        font-size: 13px;
    }
    
    .booking-review-total .booking-review-label {
        font-size: 14px;
    }
    
    .booking-review-total .booking-review-value {
        font-size: 15px;
    }
    
    .booking-button-group {
        gap: 8px;
        margin-top: 12px;
    }
}

