/* ============================================
   Online Booking Form - Main Stylesheet
   ============================================ */

/* Container & Section */
.booking-section {
    padding: 80px 0;
    background: #f9fafb;
    width: 100%;
}

.booking-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.booking-section__header {
    margin-bottom: 2.5rem;
}

.booking-section__title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    color: #1f2937;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.booking-section__subtitle {
    color: #6b7280;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Form Card */
.booking-form {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Required Fields Legend */
.form-legend {
    background: #f3f4f6;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #3b82f6;
}

.form-legend__text {
    margin: 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.form-legend__asterisk {
    color: #dc2626;
    font-weight: 700;
    font-size: 1.1rem;
    margin-right: 0.25rem;
}

/* Form Row - Two Column Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

/* Form Group */
.form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.form-group__label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.form-group__hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Input Fields */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

/* Select dropdown with custom arrow */
.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Textarea */
.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Error & Valid States */
.form-input--error,
.form-select--error,
.form-textarea--error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input--valid,
.form-select--valid,
.form-textarea--valid {
    border-color: #059669 !important;
}

/* Also support jQuery Validation default classes for compatibility */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input.valid,
.form-select.valid,
.form-textarea.valid {
    border-color: #059669 !important;
}

/* Validation Messages */
.form-error-message {
    display: block;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.fieldset-error fieldset {
    border-color: #dc2626 !important;
}
.radio-group {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
    margin-bottom: 1.75rem;
}

.radio-group__legend {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0;
    width: auto;
}

.radio-group__options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Radio Labels */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.625rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #374151;
}

.radio-label:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

/* Hide native radio but keep accessible */
.radio-label input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Custom radio circle */
.radio-label__circle {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 0.625rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Checked state */
.radio-label input[type="radio"]:checked + .radio-label__circle {
    border-color: #3b82f6 !important;
    background: #3b82f6 !important;
}

.radio-label input[type="radio"]:checked + .radio-label__circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white !important;
    border-radius: 50%;
}

/* Focus state for accessibility */
.radio-label input[type="radio"]:focus + .radio-label__circle {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Error state */
.radio-label.error {
    border-color: #dc2626 !important;
}

/* Error for radio group fieldset */
.radio-group.fieldset-error {
    border-color: #dc2626 !important;
}

/* Error & Valid States */
.form-input--error,
.form-select--error,
.form-textarea--error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input--valid,
.form-select--valid,
.form-textarea--valid {
    border-color: #059669 !important;
}

/* Also support jQuery Validation default classes for compatibility */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.form-input.valid,
.form-select.valid,
.form-textarea.valid {
    border-color: #059669 !important;
}

/* Validation Messages */
.form-error-message {
    display: block;
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.fieldset-error fieldset {
    border-color: #dc2626 !important;
}

/* Submit Button */
.form-actions {
    margin-top: 2.5rem;
    text-align: left;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.2);
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

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

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

.btn-submit__text {
    display: inline;
}

.btn-submit__loader {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit__spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Validation Success Animation */
@keyframes validPulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.2); }
    70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.form-input.valid,
.form-select.valid,
.form-textarea.valid {
    animation: validPulse 0.5s ease-out;
}

/* Summary Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal.is--visible {
    display: flex;
}

.modal__content {
    background: white;
    border-radius: 12px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal__header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal__title {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.modal__subtitle {
    margin: 0;
    color: #6b7280;
}

.modal__body {
    padding: 2rem;
}

/* Summary Sections */
.summary-section {
    margin-bottom: 1.5rem;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-section__title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

.summary-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item__label {
    font-weight: 600;
    color: #374151;
    width: 220px;
    flex-shrink: 0;
}

.summary-item__value {
    color: #1f2937;
}

.modal__footer {
    padding: 1rem 2rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Summary Sections */
.summary-section {
    margin-bottom: 1.5rem;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-section__title {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

.summary-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item__label {
    font-weight: 600;
    color: #374151;
    width: 220px;
    flex-shrink: 0;
}

.summary-item__value {
    color: #1f2937;
}

/* Modal Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

.btn--secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn--secondary:hover {
    background: #e5e7eb;
}

.btn--primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.2);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Thank You Message */
.thank-you-message {
    background: white;
    border-radius: 12px;
    padding: 4rem 2.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-top: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

.thank-you-message__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.thank-you-message__title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.thank-you-message__text {
    color: #6b7280;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

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

/* Hide form when thank you message is shown */
.booking-form.is--hidden {
    display: none;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .booking-section {
        padding: 40px 0;
    }

    .booking-form {
        padding: 1.5rem;
    }

    .booking-section__title {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .radio-group__options {
        flex-direction: column;
    }

    .radio-label {
        width: 100%;
    }

    .summary-item {
        flex-direction: column;
    }

    .summary-item__label {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .modal__footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .booking-form {
        padding: 1rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .btn-submit {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }

    .radio-label {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
