/**
 * Booking Form - Base Styles
 * Contains: .booking-container, .booking-form, .form-section, .input-grid, .input-field
 */

/* Booking Container */
.booking-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
}

/* Intermediate breakpoint for smoother transition */
@media (max-width: 1200px) {
    .booking-container {
        max-width: 100%;
        padding: 0 1.5rem;
        gap: 2rem;
    }
}

/* Single column layout for tablets and mobile */
@media (max-width: 1024px) {
    .booking-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .booking-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
}

/* Form Styling */
.booking-form {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.form-section {
    margin-top: 2.5rem;
}

.form-section:first-of-type {
    margin-top: 0;
}

.section-heading {
    font-size: 1.45rem;
    font-weight: 700;
    color: #1a252f;
    margin-bottom: 0.35rem;
}

.section-intro {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
}

.input-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-grid.auto {
    grid-template-columns: repeat(3, 1fr);
}

.input-grid.two-col {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.input-grid.three-col {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.input-field label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a252f;
    margin-bottom: 0.35rem;
}

.input-field input,
.input-field select,
.input-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
    outline: none;
    border-color: #4a7ba7;
    box-shadow: 0 0 0 4px rgba(74, 123, 167, 0.12);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.98rem;
    color: #1f2937;
    margin-bottom: 1.25rem;
}

.checkbox-row input {
    width: auto;
    accent-color: #006db2;
}

.form-feedback {
    margin-bottom: 1.5rem;
    display: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}

.form-feedback.error {
    display: block;
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #b4231a;
}

.form-feedback.success {
    display: block;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #0b7043;
}

.form-feedback.info {
    display: block;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.section-title {
    font-size: 1.6rem;
    color: #4a7ba7;
    margin: 1.5rem 0 0.5rem;
    font-weight: bold;
}

.section-title:first-child {
    margin-top: 0;
}

.section-sub {
    color: #666;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* Service Type Dropdown */
.service-dropdown,
.size-dropdown,
.date-input,
.time-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
}

.service-dropdown:focus,
.size-dropdown:focus,
.date-input:focus,
.time-select:focus {
    outline: none;
    border-color: #006db2;
}

/* Grid Layouts */
.size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.size-grid label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #333;
}

.size-grid select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.size-grid select:focus {
    outline: none;
    border-color: #006db2;
}

/* Date & Time */
.datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.datetime-grid label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #333;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.contact-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 500;
    color: #333;
}

.contact-grid input,
.contact-grid select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.contact-grid input:focus,
.contact-grid select:focus {
    outline: none;
    border-color: #006db2;
}

/* Submit Button */
.form-actions {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.form-actions-desktop {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
}

.btn-submit {
    background: #28a745;
    color: #fff;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,167,69,0.3);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-submit.loading,
.btn-mobile-book.loading {
    position: relative;
    opacity: 0.85;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    transform: translateY(-50%);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
