/**
 * Booking Wizard CSS
 * Clean, minimal styling for the wizard interface
 * Converted to IN-PAGE pattern (matching event types wizard)
 */

/* ========================================
   WIZARD CONTAINER (IN-PAGE)
   ======================================== */

.booking-wizard-content {
    display: none;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* Only show wizard when parent bookings section is visible */
#bookings-section:not(.active) .booking-wizard-content,
#bookings-section:not(.active) .wizard-navigation {
    display: none !important;
    visibility: hidden !important;
}

.wizard-container {
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.wizard-container.wizard-fullscreen {
    max-width: 900px;
    margin: 0 auto;
}

/* Wizard Footer with Navigation - INSIDE step container */
#bookingWizardContent .wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 0 0;
    margin-top: 2rem;
    border-top: 1px solid var(--color-border);
}

#bookingWizardContent .wizard-footer .wizard-nav-left,
#bookingWizardContent .wizard-footer .wizard-nav-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Anthropic-style Wizard Buttons */
#bookingWizardContent .wizard-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid;
}

#bookingWizardContent .wizard-footer .btn-secondary {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

#bookingWizardContent .wizard-footer .btn-secondary:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-text-primary);
}

#bookingWizardContent .wizard-footer .btn-primary {
    background: #24292f;
    border-color: var(--color-text-primary);
    color: white;
}

#bookingWizardContent .wizard-footer .btn-primary:hover {
    background: #32383f;
    border-color: #32383f;
}

#bookingWizardContent .wizard-footer .btn-success {
    background: #1a7f37;
    border-color: #1a7f37;
    color: white;
}

#bookingWizardContent .wizard-footer .btn-success:hover {
    background: #2da44e;
    border-color: #2da44e;
}

#bookingWizardContent .wizard-footer .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#bookingWizardContent .wizard-footer .btn i {
    font-size: 12px;
}

/* ========================================
   PROGRESS BAR & STEP INDICATORS
   ======================================== */

.wizard-progress {
    background: transparent;
    border: none;
    padding: 0 0 0.5rem 0;
    position: relative;
}

/* Progress bar positioned at center of step circles (28px height, so 14px from top) */
.wizard-progress-bar {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
    border-radius: 1px;
    overflow: hidden;
    transform: translateY(-50%);
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000000 0%, #0860ca 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.wizard-steps-indicator {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
}

.wizard-step-indicator {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

/* Remove connecting lines from eventtype-wizard.css - using progress bar instead */
#bookingWizardContent .wizard-step-indicator::after {
    display: none !important;
}

.wizard-step-indicator:hover:not(.active) .step-circle {
    background: var(--color-surface-subtle);
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
    z-index: 1;
}

.wizard-step-indicator.active .step-circle {
    background: #1f2328;
    border-color: var(--color-text-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(31, 35, 40, 0.1);
}

.wizard-step-indicator.completed .step-circle {
    background: #cccccc;
    border-color: #000000;
    color: white;
}

.wizard-step-indicator.past .step-circle {
    border-color: #000000;
    color: #cccccc;
}

.step-label {
    font-size: 11px;
    color: var(--color-text-secondary);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

.wizard-step-indicator.active .step-label {
    color: #000000;
    font-weight: 600;
}

.wizard-step-indicator.completed .step-label,
.wizard-step-indicator.past .step-label {
    color: #cccccc;
}

.optional-badge {
    font-size: 10px;
    color: var(--color-text-secondary);
    background: var(--color-surface-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

/* ========================================
   STEP CONTENT
   ======================================== */

/* Booking wizard step container - override eventtype-wizard styles */
#bookingWizardContent .wizard-step-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
    max-height: none;
    min-height: auto;
}

#bookingWizardContent #wizardStepContent {
    flex: 1;
}

.wizard-step,
.wizard-step-body {
    overflow: visible;
}

.wizard-step-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.wizard-step-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wizard-step-header h2 i {
    color: #000000;
}

.step-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */


.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 13px;
    color: var(--color-text-primary);
}

.required-star {
    color: #cf222e;
}

.optional-label {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.form-control.is-invalid {
    border-color: #cf222e;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(207, 34, 46, 0.1);
}

.invalid-feedback {
    display: none;
    font-size: 12px;
    color: #cf222e;
    margin-top: 0.25rem;
}

.form-text {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

/* Input with prefix */
.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.input-with-prefix:focus-within {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

.input-prefix {
    background: var(--color-surface-subtle);
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    color: var(--color-text-secondary);
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
}

.input-with-prefix .form-control {
    border: none;
    box-shadow: none !important;
}

/* Checkboxes */
.form-group-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: var(--color-surface-subtle);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.15rem;
    cursor: pointer;
}

.checkbox-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-text strong {
    font-size: 14px;
    color: var(--color-text-primary);
}

.checkbox-text small {
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* ========================================
   HELP CARDS
   ======================================== */

.wizard-step-help {
    margin-top: 1.5rem;
}

.help-card {
    background: #ddf4ff;
    border: 1px solid #54aeff;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
}

.help-card i {
    color: #000000;
    font-size: 20px;
    flex-shrink: 0;
}

.help-content {
    flex: 1;
}

.help-content strong {
    display: block;
    font-size: 13px;
    color: #000000;
    margin-bottom: 0.25rem;
}

.help-content p {
    font-size: 13px;
    color: #000000;
    margin: 0;
}

/* ========================================
   NAVIGATION BAR (Legacy - now in header)
   ======================================== */

.wizard-navigation {
    display: none; /* Moved to wizard-header */
}

.wizard-navigation-legacy {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    bottom: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wizard-nav-left,
.wizard-nav-right {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .wizard-container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .wizard-step-container {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .wizard-steps-indicator {
        flex-wrap: wrap;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        bottom: 0;
        border-radius: 12px 12px 0 0;
    }
    
    .wizard-nav-left,
    .wizard-nav-right {
        width: 100%;
        flex-direction: column;
    }
    
    .wizard-nav-left button,
    .wizard-nav-right button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .wizard-step-header h2 {
        font-size: 20px;
    }
}

/* ========================================
   DYNAMIC BOOKING FIELDS (Step 4)
   ======================================== */

.booking-fields-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.booking-fields-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-fields-section .section-title i {
    color: #000000;
    font-size: 14px;
}

/* Required fields count badge */
.required-count {
    font-size: 12px;
    font-weight: 500;
    color: #cf222e;
    background: #ffebe9;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

/* Validation error banner */
.validation-error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #ffebe9;
    border: 1px solid #ff8182;
    border-radius: 6px;
    margin-bottom: 1rem;
    color: #cf222e;
    font-size: 14px;
    font-weight: 500;
}

.validation-error-banner i {
    font-size: 16px;
    flex-shrink: 0;
}

.booking-fields-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Required field styling */
.booking-field.required-field {
    position: relative;
}

.booking-field.required-field::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #cf222e;
    border-radius: 2px;
    opacity: 0.5;
}

.booking-field.is-invalid .form-control {
    border-color: #cf222e;
    background-color: #fffbfa;
}

.booking-field.is-invalid .form-control:focus {
    border-color: #cf222e;
    box-shadow: 0 0 0 3px rgba(207, 34, 46, 0.15);
}

.booking-field.is-invalid label {
    color: #cf222e;
}

/* Inline field error message */
.field-error-message {
    display: none;
    font-size: 12px;
    color: #cf222e;
    margin-top: 0.375rem;
    padding-left: 0.25rem;
}

.field-error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.375rem;
}

/* Shake animation for invalid fields */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* Warning help card (when required fields exist) */
.help-card-warning {
    background: #fff8c5;
    border-color: #d4a72c;
}

.help-card-warning i {
    color: #9a6700;
}

.help-card-warning .help-content strong {
    color: #9a6700;
}

.help-card-warning .help-content ul li {
    color: #735c0f;
}

/* Notes section with booking fields */
.notes-section.with-booking-fields {
    padding-top: 0;
}

.notes-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-section .section-title i {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Help card list styling */
.help-content ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.help-content ul li {
    font-size: 13px;
    color: #000000;
    margin-bottom: 0.25rem;
}

.help-content ul li:last-child {
    margin-bottom: 0;
}

/* ========================================
   UTILITIES
   ======================================== */

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 13px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 16px;
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
