/* Quick Booking Popup */
.quick-booking-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.quick-booking-popup.hidden {
    opacity: 0;
    visibility: hidden;
}

.popup-content {
    background: linear-gradient(135deg, var(--color-primary) 0%, #FF8A65 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh; /* Giới hạn chiều cao */
    overflow-y: auto; /* Cho phép cuộn */
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: var(--color-text-secondary);
    margin: 20px;
}

.quick-booking-popup.hidden .popup-content {
    transform: translateY(30px);
}

.popup-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.close-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    z-index: 1002;
    border: 2px solid white;
}

.close-popup:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.popup-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
}

.popup-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.popup-header p {
    opacity: 0.8;
    font-size: 1rem;
}

.popup-form {
    position: relative;
    z-index: 1;
}

.popup-form-group {
    margin-bottom: 15px;
}

.popup-form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.popup-form-group label i {
    margin-right: 8px;
}

.popup-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    height: 46px;
    box-sizing: border-box;
}

.popup-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333333' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
    padding-right: 35px;
    height: 46px;
    box-sizing: border-box;
}

.popup-form-group input:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.popup-form-group select:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333333' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
}

.popup-form-row {
    display: flex;
    gap: 15px;
}

.popup-form-row .popup-form-group {
    flex: 1;
}

/* Popup CTA Buttons Container */
.popup-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.popup-submit {
    background-color: var(--color-secondary);
    color: var(--color-text-secondary);
    border: none;
    border-radius: 9999px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
    height: 50px;
    position: relative;
    overflow: hidden;
}

.popup-submit:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.btn-hotline-popup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2196F3;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    border: 2px solid transparent;
    width: 100%;
    justify-content: center;
}

.btn-hotline-popup:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.submit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s;
}

.popup-submit:hover .submit-icon {
    transform: translateX(3px);
    background-color: rgba(255, 255, 255, 0.3);
}

.popup-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.popup-footer a {
    color: white;
    font-weight: 600;
    text-decoration: none;
}

/* Branch info in popup */
.branch-info-popup {
    margin-top: 15px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: left;
}

.branch-item {
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 1;
    color: white;
}

.branch-item:last-child {
    margin-bottom: 0;
}

.branch-item strong {
    color: white;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 3px 6px;
    border-radius: 4px;
    margin-right: 5px;
    display: inline-block;
    font-size: 0.9rem;
}

/* Textarea styles for notes */
.popup-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}

.popup-form-group textarea:focus {
    outline: none;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Success Booking Popup */
.success-booking-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s ease;
}

.success-booking-popup.hidden {
    opacity: 0;
    visibility: hidden;
}

.success-popup-content {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    color: white;
    text-align: center;
    overflow: hidden;
}

.success-booking-popup.hidden .success-popup-content {
    transform: translateY(30px) scale(0.95);
}

.success-popup-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.success-popup-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.success-popup-content > p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.success-details {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
    position: relative;
    z-index: 1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 1rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.detail-item span {
    flex: 1;
}

.detail-item strong {
    color: white;
    font-weight: 700;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    position: relative;
    z-index: 1;
}

.success-actions .btn {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.success-actions .btn-primary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.success-actions .btn-primary:hover {
    background-color: white;
    color: #4CAF50;
    border-color: white;
    transform: translateY(-2px);
}

.success-actions .btn-secondary {
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.success-actions .btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .popup-form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .popup-form-row .popup-form-group {
        flex: none;
    }
    
    /* Full width for date/time inputs on mobile */
    #popupDate, #popupTime, #date, #time {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Force full width for date/time input containers */
    .popup-form-row .popup-form-group {
        width: 100%;
        min-width: 100%;
    }
    
    /* Additional mobile-specific fixes for date/time inputs */
    input[type="date"], input[type="time"] {
        width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box;
        padding: 12px 15px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    .popup-header {
        margin-bottom: 20px;
    }
    
    .popup-header h3 {
        font-size: 1.5rem;
    }
    
    .popup-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .btn-hotline-popup {
        font-size: 1rem;
        padding: 12px 20px;
        margin-top: 15px;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .popup-cta-buttons {
        gap: 12px;
        margin-top: 15px;
    }
    
    .popup-submit {
        height: 48px;
        font-size: 0.95rem;
    }
    
    /* Responsive styles for success popup */
    .success-popup-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .success-popup-content h3 {
        font-size: 1.7rem;
    }
    
    .success-popup-content > p {
        font-size: 1rem;
    }
    
    .success-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .success-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .detail-item {
        font-size: 0.95rem;
    }
}

/* Safari-specific fixes */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .popup-form-group select {
            background-color: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(0, 0, 0, 0.1);
            height: 46px; /* Đảm bảo chiều cao đồng nhất */
            box-sizing: border-box;
            font-size: 1rem;
            line-height: 1.5;
            padding-top: 10px;
            padding-bottom: 10px;
            text-indent: 3px; /* Điều chỉnh vị trí text */
        }
        
        .popup-form-group select:focus {
            border-color: var(--color-primary);
        }
        
        /* Đảm bảo kích thước đồng nhất giữa input và select */
        .popup-form-group input {
            height: 46px;
            box-sizing: border-box;
        }
        
        /* Điều chỉnh cụ thể cho Safari */
        #popupGuests {
            font-size: 1rem !important;
            padding-left: 12px !important;
            padding-right: 35px !important;
        }
    }
}