/* Book Your Appointment Today - Modal */
.appointment-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}
.appointment-modal-overlay.is-open {
    display: flex !important;
}
.appointment-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 920px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.appointment-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 22px;
    line-height: 1;
    color: #5d3a15;
    cursor: pointer;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.appointment-modal-close:hover {
    background: #754a11;
    color: #fff;
    border-color: #754a11;
    transform: rotate(90deg);
}
.appointment-modal-content {
    margin: 0;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}
.appointment-modal-content section {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

/* Get in Touch Column - Redesigned */
.appointment-modal-content .get-in-touch-col {
    width: 100%;
    margin-bottom: 0;
    display: block;
    background: linear-gradient(145deg, #8b5a2b 0%, #5d3a15 100%);
    position: relative;
}
.appointment-modal-content .get-in-touch-col::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.appointment-modal-content .get-in-touch-article {
    padding: 30px 25px;
    position: relative;
    z-index: 1;
}

/* Contact Card Header */
.appointment-modal-content .contact-card-header {
    text-align: center;
    margin-bottom: 20px;
}
.appointment-modal-content .contact-icon-wrap {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.appointment-modal-content .contact-icon-wrap img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}
.appointment-modal-content .contact-card-header h4 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Phone Links */
.appointment-modal-content .contact-phone-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.appointment-modal-content .phone-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
}
.appointment-modal-content .phone-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.3);
}
.appointment-modal-content .phone-link i {
    font-size: 1rem;
    opacity: 0.9;
}

/* Emergency Badge */
.appointment-modal-content .emergency-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.35);
    color: #a8f0c4;
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 22px;
    backdrop-filter: blur(5px);
}
.appointment-modal-content .pulse-dot {
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* Features List */
.appointment-modal-content .features-list {
    list-style: none;
    margin: 0;
    padding: 20px 0 0;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.appointment-modal-content .features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.95);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
}
.appointment-modal-content .features-list li:last-child {
    margin-bottom: 0;
}
.appointment-modal-content .check-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3), rgba(46, 204, 113, 0.15));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #a8f0c4;
    font-weight: 700;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Book Appointment Column */
.appointment-modal-content .book-appoinment-col {
    width: 100%;
    float: none;
    padding: 0;
    background: #fff;
}

/* Enhanced Form Styling */
.enhanced-form {
    padding: 0 !important;
}
.enhanced-form .form-header {
    background: linear-gradient(135deg, #faf8f5 0%, #fff 100%);
    padding: 28px 30px 22px;
    border-bottom: 2px solid #f0e9e0;
    text-align: center;
    position: relative;
}
.enhanced-form .form-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8b5a2b, #5d3a15);
    border-radius: 2px;
}
.enhanced-form .form-header h2 {
    font-size: 1.6rem;
    color: #5d3a15;
    margin: 0 0 8px 0;
    font-weight: 700;
}
.enhanced-form .form-header p {
    color: #888;
    font-size: 0.95rem;
    margin: 0;
}
.enhanced-form .form-body {
    padding: 28px 30px 30px;
    background: #fff;
}
.enhanced-form .form-row {
    margin-bottom: 20px;
}
.enhanced-form .form-row.two-col {
    display: flex;
    gap: 18px;
}
.enhanced-form .form-row.two-col .form-group {
    flex: 1;
}
.enhanced-form .form-group {
    position: relative;
}
.enhanced-form .form-group label {
    display: flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: #5d3a15;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.enhanced-form .form-group label i {
    color: #8b5a2b;
    margin-right: 8px;
    width: 18px;
    font-size: 0.95rem;
}
.enhanced-form .form-control,
.enhanced-form input.form-control,
.enhanced-form select.form-control,
.enhanced-form textarea.form-control,
.enhanced-form input[type="text"].form-control,
.enhanced-form input[type="tel"].form-control,
.enhanced-form input[type="email"].form-control,
.enhanced-form input[type="date"].form-control,
.enhanced-form input[type="time"].form-control {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e8e0d5 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    color: #333 !important;
    background: #fefefe !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    height: auto !important;
    line-height: 1.4 !important;
}
.enhanced-form .form-control:hover,
.enhanced-form input.form-control:hover,
.enhanced-form select.form-control:hover {
    border-color: #d4c4b0 !important;
}
.enhanced-form .form-control:focus,
.enhanced-form input.form-control:focus,
.enhanced-form select.form-control:focus {
    outline: none !important;
    border-color: #8b5a2b !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(139, 90, 43, 0.1), 0 2px 8px rgba(0,0,0,0.05) !important;
}
.enhanced-form .form-control::placeholder,
.enhanced-form input.form-control::placeholder {
    color: #aaa !important;
}
.enhanced-form select.form-control {
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #fefefe !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5a2b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 44px !important;
}
.enhanced-form select.form-control option {
    color: #333 !important;
    background: #fff !important;
    padding: 12px !important;
}
.enhanced-form select.form-control:invalid,
.enhanced-form select.form-control option[value=""] {
    color: #aaa !important;
}

/* Date and time input consistency */
.enhanced-form input[type="date"].form-control::-webkit-calendar-picker-indicator,
.enhanced-form input[type="time"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    padding: 4px;
    border-radius: 4px;
}
.enhanced-form input[type="date"].form-control::-webkit-calendar-picker-indicator:hover,
.enhanced-form input[type="time"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(139, 90, 43, 0.1);
}
.enhanced-form .error-msg {
    display: none;
    color: #e74c3c;
    font-size: 0.78rem;
    margin-top: 6px;
    padding-left: 4px;
    font-weight: 500;
}

/* Form Disclaimer */
.form-disclaimer {
    font-size: 0.82rem;
    color: #777;
    margin: 20px 0;
    line-height: 1.5;
    text-align: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f9f7f4 0%, #f5f2ed 100%);
    border-radius: 10px;
    border: 1px solid #ebe5dc;
}
.form-disclaimer i {
    color: #2ecc71;
    margin-right: 8px;
}

/* Submit Button Container */
.enhanced-form .submit-btn-wrap {
    text-align: center;
    margin-top: 5px;
}

/* Submit Button */
.enhanced-form .submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 50px;
    background: linear-gradient(135deg, #8b5a2b 0%, #5d3a15 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 25px rgba(93, 58, 21, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
    overflow: hidden;
}
.enhanced-form .submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.enhanced-form .submit-btn:hover::before {
    left: 100%;
}
.enhanced-form .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(93, 58, 21, 0.5);
    background: linear-gradient(135deg, #9a6530 0%, #6d4520 100%);
}
.enhanced-form .submit-btn i {
    transition: transform 0.3s ease;
    font-size: 0.95rem;
}
.enhanced-form .submit-btn:hover i {
    transform: translateX(5px);
}
.enhanced-form .submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(93, 58, 21, 0.4);
}

/* Desktop Layout */
@media (min-width: 768px) {
    .appointment-modal-content .get-in-touch-col {
        width: 38%;
        float: left;
        margin-bottom: 0;
        min-height: 100%;
    }
    .appointment-modal-content .get-in-touch-article {
        padding: 40px 30px;
        min-height: 520px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .appointment-modal-content .book-appoinment-col {
        float: right;
        width: 62%;
        border-left: 1px solid #f0e9e0;
    }
    .appointment-modal-content .contact-phone-wrap {
        flex-direction: column;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    /* Full screen modal on mobile */
    .appointment-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .appointment-modal-box {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 24px 24px 0 0;
        animation: slideUp 0.3s ease-out;
    }
    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    /* Improved close button for mobile */
    .appointment-modal-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 24px;
        background: #fff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        border: none;
    }
    
    /* Better scrolling */
    .appointment-modal-content {
        max-height: 95vh;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reorder columns - Form first on mobile */
    .appointment-modal-content section {
        display: flex;
        flex-direction: column;
    }
    .appointment-modal-content .book-appoinment-col {
        order: 1;
    }
    .appointment-modal-content .get-in-touch-col {
        order: 2;
    }
    
    /* Compact info section on mobile */
    .appointment-modal-content .get-in-touch-col {
        background: linear-gradient(145deg, #8b5a2b 0%, #5d3a15 100%);
    }
    .appointment-modal-content .get-in-touch-article {
        padding: 25px 20px 20px;
    }
    .appointment-modal-content .contact-card-header {
        margin-bottom: 15px;
    }
    .appointment-modal-content .contact-icon-wrap {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    .appointment-modal-content .contact-icon-wrap img {
        width: 24px;
        height: 24px;
    }
    .appointment-modal-content .contact-card-header h4 {
        font-size: 1.15rem;
    }
    
    /* Horizontal phone links on mobile */
    .appointment-modal-content .contact-phone-wrap {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 15px;
    }
    .appointment-modal-content .phone-link {
        flex: 1;
        padding: 12px 14px;
        font-size: 0.9rem;
        justify-content: center;
    }
    .appointment-modal-content .phone-link i {
        font-size: 1.1rem;
    }
    .appointment-modal-content .phone-link span {
        display: none;
    }
    
    /* Compact emergency badge */
    .appointment-modal-content .emergency-badge {
        padding: 10px 14px;
        font-size: 0.82rem;
        margin-bottom: 15px;
    }
    
    /* Hide features list on mobile to save space */
    .appointment-modal-content .features-list {
        display: none;
    }
    
    /* Form improvements */
    .enhanced-form .form-header {
        padding: 22px 20px 18px;
        border-bottom-width: 1px;
    }
    .enhanced-form .form-header::after {
        width: 50px;
        height: 2px;
    }
    .enhanced-form .form-header h2 {
        font-size: 1.3rem;
    }
    .enhanced-form .form-header p {
        font-size: 0.88rem;
    }
    .enhanced-form .form-body {
        padding: 18px 20px 110px;
    }
    .enhanced-form .form-row {
        margin-bottom: 16px;
    }
    .enhanced-form .form-row.two-col {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Larger touch targets */
    .enhanced-form .form-group label {
        font-size: 0.92rem;
        margin-bottom: 8px;
    }
    .enhanced-form .form-control {
        padding: 15px 16px;
        font-size: 16px;
        border-radius: 12px;
        border-width: 2px;
    }
    
    /* Compact disclaimer */
    .form-disclaimer {
        font-size: 0.78rem;
        padding: 12px 14px;
        margin: 16px 0;
        border-radius: 8px;
    }
    
    /* Fixed submit button container at bottom */
    .enhanced-form .submit-btn-wrap {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 20px;
        background: linear-gradient(to top, #fff 80%, transparent);
        z-index: 100;
        text-align: center;
    }
    .enhanced-form .submit-btn {
        display: inline-flex;
        width: auto;
        min-width: 280px;
        max-width: 90%;
        padding: 16px 40px;
        border-radius: 50px;
        font-size: 1rem;
        box-shadow: 0 6px 25px rgba(93, 58, 21, 0.45);
        background: linear-gradient(135deg, #8b5a2b 0%, #5d3a15 100%);
        animation: buttonPulse 2s ease-in-out infinite;
    }
    @keyframes buttonPulse {
        0%, 100% { 
            box-shadow: 0 6px 25px rgba(93, 58, 21, 0.45);
        }
        50% { 
            box-shadow: 0 6px 35px rgba(93, 58, 21, 0.6);
        }
    }
    .enhanced-form .submit-btn::before {
        display: none;
    }
    .enhanced-form .submit-btn i {
        font-size: 1rem;
        animation: arrowBounce 1.5s ease-in-out infinite;
    }
    @keyframes arrowBounce {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(5px); }
    }
    .enhanced-form .submit-btn:active {
        transform: scale(0.96);
        animation: none;
        box-shadow: 0 4px 15px rgba(93, 58, 21, 0.5);
    }
    
    /* Add safe area padding for notched phones */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .enhanced-form .submit-btn-wrap {
            padding-bottom: calc(12px + env(safe-area-inset-bottom));
        }
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .appointment-modal-content .contact-phone-wrap {
        flex-direction: column;
    }
    .appointment-modal-content .phone-link span {
        display: inline;
    }
    .enhanced-form .form-header h2 {
        font-size: 1.2rem;
    }
    .enhanced-form .form-body {
        padding: 15px 16px 110px;
    }
    .enhanced-form .form-control {
        padding: 14px 14px;
    }
}
