/* ========================================
   Multi-Step Booking Form Styles
   ======================================== */

:root {
    --brand: #6B2737;
    --brand-rgb: 107, 39, 55;
}

/* Container and Layout */
.booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 200px);
}

/* Progress Bar */
.booking-progress {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.progress-container {
    margin: 0 auto;
    position: relative;
}

/* Progress bar background */
.progress-bar {
    position: absolute;
    top: 20px; /* centered under 40px circles */
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

/* Progress bar fill */
.progress-fill {
    height: 100%;
    background: var(--brand);
    width: 0%;
    transition: width 0.4s ease;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.progress-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    text-align: center;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

/* Remove old generic step-number styles */

.progress-step.active .step-number {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.12);
}

.progress-step.completed .step-number {
    background: #ffffff;
    color: var(--brand);
    border-color: var(--brand);
    border-width: 2px;
}

.step-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.progress-step.active .step-label {
    color: var(--brand);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #4b5563;
}

.booking-progress .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    color: #9ca3af;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    position: relative;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Form Container */
.booking-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

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

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 3rem;
}

.step-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1b1b18;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: #666;
    font-size: 1.125rem;
}

/* Service Cards */
.service-options {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-content {
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.service-card:hover .service-content {
    border-color: var(--brand);
    box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.12);
}

.service-card input[type="radio"]:checked ~ .service-content {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb), 0.05);
    box-shadow: 0 4px 16px rgba(var(--brand-rgb), 0.18);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--brand);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--brand);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1b1b18;
    margin-bottom: 0.5rem;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

.service-content > p {
    color: #666;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 14px;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: bold;
}

/* Form Grid and Groups */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 0.25rem;
    display: none;
}

.field-error.show {
    display: block;
}

.field-hint {
    color: #666;
    font-size: 12px;
    margin-top: 0.25rem;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: stretch; /* ensure items stretch to equal row height */
}

.checkbox-card {
    cursor: pointer;
    position: relative;
    display: flex;           /* allow inner content to fill height */
    flex-direction: column;
    height: 100%;            /* stretch to grid track height */
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-content {
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    font-size: 14px;
    align-items: flex-start;
    gap: 0.75rem;
    transition: all 0.3s ease;
    background: white;
    flex: 1 1 auto;          /* fill parent label height for equal card heights */
}

.checkbox-content svg {
    width: 20px;
    height: 20px;
    color: #666;
    transition: color 0.3s ease;
    flex: 0 0 auto;
    margin-top: 2px;
}

.checkbox-card:hover .checkbox-content {
    border-color: var(--brand);
}

.checkbox-card input[type="checkbox"]:checked ~ .checkbox-content {
    background: rgba(var(--brand-rgb), 0.05);
    border-color: var(--brand);
}

.checkbox-card input[type="checkbox"]:checked ~ .checkbox-content svg {
    color: var(--brand);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1b1b18;
    margin-bottom: 1rem;
}

/* Review Section */
.review-section {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.review-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
}

.review-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.review-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.review-content .review-item {
    margin-bottom: 0.5rem;
}

.review-content .review-label {
    font-weight: 600;
    color: #333;
    display: inline-block;
    min-width: 120px;
}

/* Terms Section */
.terms-section {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    width: 100%;
    gap: 1rem;
}

.btn-primary,
.btn-secondary,
.btn-submit {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: #456990;
    color: white;
    border: 2px solid #456990;
}

.btn-primary:hover {
    background: #3B5C83;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 105, 144, 0.3);
}

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.btn-submit {
    background: #456990;
    color: white;
    border: 2px solid #456990;
    margin-left: auto;
}

.btn-submit:hover {
    background: #3B5C83;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 105, 144, 0.3);
}

.form-navigation svg {
    width: 20px;
    height: 20px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 600px;
    margin: 4rem auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    color: var(--brand);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-message h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1b1b18;
    margin-bottom: 1rem;
}

.success-message p {
    color: #666;
    margin-bottom: 1rem;
}

.success-detail {
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
}

.success-message .btn-primary {
    text-decoration: none;
}

/* Error Messages */
.form-error {
    background: rgba(var(--brand-rgb), 0.06);
    border: 1px solid rgba(var(--brand-rgb), 0.35);
    color: var(--brand);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.form-error.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-progress {
        padding: 1.5rem 1rem;
    }
    .progress-steps {
        gap: 0;
    }
    .progress-bar {
        left: 15%;
        right: 15%;
        top: 12px;
    }
    .booking-progress .step-number {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }
    .booking-progress .progress-step .step-label {
        display: none;
    }

    .booking-progress .progress-step .step-label {
        display: none;
    }

    .service-options {
        flex-direction: column;
    }

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

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-submit {
        width: auto;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .step-header p {
        font-size: 1rem;
    }
    
    .progress-step .step-label {
        display: none;
    }
}

/* Info tooltip + fineprint for complex options */
.checkbox-content .label-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}
.checkbox-content .info-icon {
    margin-left: auto;
    color: #6b7280; /* gray-500 */
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 9999px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    cursor: default;
    position: relative;
    flex: 0 0 auto;
    align-self: flex-start;
}

.checkbox-content .info-icon:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.checkbox-content .info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    bottom: -6px;
    transform: translateY(100%);
    background: #111827; /* gray-900 */
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    width: 280px;
    max-width: min(280px, 70vw);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: opacity 0.2s ease;
    z-index: 10;
}

.checkbox-content .info-icon:hover::after {
    opacity: 1;
}

/* Section-level fineprint */
.section-fineprint {
    display: none;
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280; /* gray-500 */
}
.section-fineprint.show {
    display: block;
}
.section-fineprint .fineprint-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 6px;
}
.section-fineprint .info-badge {
    color: #6b7280; /* gray-500 */
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 9999px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex: 0 0 auto;
    margin-top: 2px;
}
