/* ADDED: Style to change the large script text "Massage Therapy Consultation" to orange */
.page-header h1 {
    color: var(--accent-orange);
}

/* --- Booking Grid Layout (Two Columns) --- */
.booking-grid {
    display: grid;
    grid-template-columns: 3fr 2fr; /* Consultation form wider than booking widget */
    gap: 40px;
    padding: 40px 0;
}

/* --- Consultation Form Styles --- */
.consultation-form-wrapper {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.consultation-form h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Input/Field Styles (Consultation Form) */
.form-line-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.form-line-group label {
    white-space: nowrap;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.form-line-group input[type="text"],
.form-line-group input[type="email"],
.form-line-group input[type="tel"] {
    flex-grow: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
    background: transparent;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    min-width: 0; 
}

/* Specific style for the phone number input to look like a line */
.form-line-group .phone-input-line {
    flex-grow: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 5px 0;
    background: transparent;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
}

.form-line-group input:focus {
    outline: none;
    border-bottom-color: var(--accent-orange);
}

/* Checkbox/Radio Styles (Consultation Form) */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 20px;
    margin-top: 15px;
    padding: 15px;
    background-color: var(--light);
    border-radius: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #333;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
    accent-color: var(--primary);
}

/* Checkbox style for the preference fields (where radio buttons were replaced) */
.form-line-group input[type="checkbox"] {
    margin-right: 5px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.signature-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.signature-section p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* --- Body Map Styles --- */
.body-map-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.body-map-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.body-map-container {
    max-width: 100%;
    height: auto;
    position: relative;
    display: inline-block; 
}

.body-map-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Booking Widget Placeholder/Form Styles --- */
.booking-widget-wrapper {
    padding: 30px;
    border-radius: 8px;
    background-color: #f8f8f8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.booking-widget-wrapper h2 {
    font-family: 'Playfair Display', serif;
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Booking Form Specific Styles */
#bookingForm .form-group {
    margin-bottom: 15px;
}
#bookingForm label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.95rem;
}
#bookingForm input[type="text"],
#bookingForm input[type="email"],
#bookingForm input[type="tel"],
#bookingForm input[type="date"],
#bookingForm select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--dark);
    background-color: var(--white);
    transition: border-color 0.3s;
    display: block; 
    box-sizing: border-box;
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none;
}
#bookingForm input:focus,
#bookingForm select:focus {
    outline: none;
    border-color: var(--primary);
}
#bookingForm .form-row {
    display: flex;
    gap: 15px;
}
#bookingForm .form-row .half-width {
    flex: 1;
}
#bookingForm .submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px 30px;
}
.booking-note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}


/* --- Modal/Popup Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

#successModal .modal-content,
#bookingSuccessModal .modal-content,
#bookingErrorModal .modal-content { 
    text-align: center; 
    max-width: 400px;
}

/* MODIFIED: Success Icon Style to match the requested image (subtle checkmark) */
#successModal .modal-content i,
#bookingSuccessModal .modal-content i { 
    font-size: 50px;
    color: #4CAF50; 
    margin-bottom: 15px;
    background-color: #e6ffe6; 
    border-radius: 50%;
    padding: 5px;
    line-height: 1;
    display: inline-block;
}

/* MODIFIED: Error Modal Icon Style (Red Stop Sign/Circle) */
#bookingErrorModal .modal-content i {
    font-size: 50px;
    color: #dc3545 !important; 
    margin-bottom: 15px;
    background-color: #f8d7da; 
    border-radius: 50%;
    padding: 5px;
    line-height: 1;
    display: inline-block;
}

#successModal .modal-content h2,
#bookingSuccessModal .modal-content h2,
#bookingErrorModal .modal-content h2 { 
    margin-top: 0;
    color: #333;
    font-size: 1.8rem; 
}

#successModal .modal-content p,
#bookingSuccessModal .modal-content p,
#bookingErrorModal .modal-content p { 
    margin-bottom: 20px; 
    line-height: 1.4;
}

.modal-close-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

/* --- GDPR Checkbox and Link Style --- */
.gdpr-group {
    display: flex;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px; 
    font-size: 14px;
    position: relative; 
}

.gdpr-group label::before {
    content: '*';
    color: red;
    margin-right: 4px;
    font-weight: bold;
}

.gdpr-group input[type="checkbox"] {
    display: none;
}

.gdpr-group label::after {
    content: '';
    display: inline-block;
    width: 18px; 
    height: 18px; 
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
    background-color: var(--light); 
    transition: all 0.2s;
    line-height: 18px;
    text-align: center;
    font-family: 'Font Awesome 5 Free'; 
    font-weight: 900;
}

.gdpr-group input[type="checkbox"]:checked + label::after {
    content: "\f00c"; 
    color: #4CAF50; 
    border-color: #4CAF50;
}

.gdpr-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gdpr-group label a {
    color: #000; 
    text-decoration: none;
    font-weight: 700; 
    cursor: pointer;
    margin-left: 4px; 
}

.gdpr-group label a:hover {
    text-decoration: underline;
}


/* --- Mobile Responsiveness (FIXED) --- */
@media (max-width: 992px) {
    /* FIX: Two columns to one column */
    .booking-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    
    .booking-widget-wrapper {
        position: static; 
        order: -1; 
    }
    
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    
    /* FIX: Ensure consultation form lines stack correctly */
    .form-line-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .form-line-group label {
        margin-bottom: 0;
        white-space: normal; 
        width: 100%; 
    }
    .form-line-group input[type="text"],
    .form-line-group input[type="email"],
    .form-line-group input[type="tel"],
    .form-line-group .phone-input-line {
        width: 100%;
        flex-basis: 100%; 
    }
    .form-line-group input[type="text"][style*="max-width"],
    .form-line-group input[type="tel"][style*="max-width"] {
        max-width: 100% !important;
    }
    
    /* FIX: Booking Form Mobile Adjustments (CRITICAL FIX) */
    #bookingForm .form-row {
        flex-direction: column;
        gap: 0;
    }
    #bookingForm .form-row .half-width {
        width: 100%;
    }
    #bookingForm .form-group {
        margin-bottom: 15px; 
    }
    
    /* Ensure booking form labels and inputs stack correctly */
    #bookingForm label {
        display: block; 
        width: 100%;
        margin-bottom: 5px; 
    }
    #bookingForm input[type="text"],
    #bookingForm input[type="email"],
    #bookingForm input[type="tel"],
    #bookingForm input[type="date"], /* Dátum mező is 100% széles legyen */
    #bookingForm select {
        width: 100% !important; /* Biztosítjuk a 100% szélességet */
        display: block; 
    }
    
    /* Fix for radio/checkbox groups that should remain inline if space allows (Consultation Form) */
    .form-line-group:has(.radio-group),
    .form-line-group:has(input[type="checkbox"]) {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .form-line-group:has(.radio-group) label:first-child,
    .form-line-group:has(input[type="checkbox"]) label:first-child {
        width: auto; 
        flex-basis: 100%; 
        margin-bottom: 5px;
    }
    .form-line-group:has(.radio-group) label,
    .form-line-group:has(input[type="checkbox"]) label {
        width: auto;
    }
}

@media (max-width: 576px) {
    .checkbox-grid {
        grid-template-columns: 1fr; 
    }
    .consultation-form-wrapper {
        padding: 20px;
    }
    
    /* Ensure radio/checkbox groups are readable */
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    /* Fix for radio/checkbox group labels in the single column layout */
    .form-line-group:has(.radio-group),
    .form-line-group:has(input[type="checkbox"]) {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-line-group:has(.radio-group) label:first-child,
    .form-line-group:has(input[type="checkbox"]) label:first-child {
        flex-basis: auto;
    }
}