/* ============================================================
   MARRAKECH BOOKING WIZARD — Brand-Aligned Styles
   Design System: Deep Blue #1A2B49 + Vibrant Orange #FF5533
   ============================================================ */

/* Modal Background */
.mbw-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 43, 73, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mbw-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.mbw-modal-content {
    background: #FFFFFF;
    margin: auto;
    padding: 36px 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mbw-modal.open .mbw-modal-content {
    transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.mbw-modal-content::-webkit-scrollbar {
    width: 5px;
}
.mbw-modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.mbw-modal-content::-webkit-scrollbar-thumb {
    background: rgba(26, 43, 73, 0.15);
    border-radius: 10px;
}

/* Close Button */
.mbw-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #6B7280;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mbw-close-btn:hover {
    color: #1A2B49;
    background: #F5F5F5;
}

/* Header */
.mbw-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.mbw-modal-header h2 {
    margin: 0 0 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1A2B49;
}

.mbw-modal-header p {
    margin: 0;
    color: #FF5533;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

/* Progress Bar */
.mbw-wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
}

.mbw-wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #F5F5F5;
    z-index: 1;
}

.mbw-step-indicator {
    background: #FFFFFF;
    padding: 6px 12px;
    border-radius: 9999px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    border: 2px solid #F5F5F5;
    z-index: 2;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mbw-step-indicator.active {
    border-color: #1A2B49;
    color: #1A2B49;
}

.mbw-step-indicator.completed {
    background: linear-gradient(135deg, #FF5533, #FF7849);
    border-color: #FF5533;
    color: #FFFFFF;
}

/* Wizard Body */
.mbw-wizard-body {
    flex-grow: 1;
}

.mbw-step {
    display: none;
    animation: mbwFadeIn 0.4s ease;
}

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

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

/* Form Elements */
.mbw-form-group {
    margin-bottom: 18px;
}

.mbw-form-group label {
    display: block;
    margin-bottom: 7px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #1A2B49;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mbw-form-group input,
.mbw-form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #1A2B49;
    box-sizing: border-box;
    transition: all 0.2s;
    background: #FAFAFA;
}

.mbw-form-group input:focus,
.mbw-form-group textarea:focus {
    outline: none;
    border-color: #FF5533;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 85, 51, 0.08);
}

.mbw-form-group input::placeholder,
.mbw-form-group textarea::placeholder {
    color: #9CA3AF;
}

/* Participants */
.mbw-participants {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #F3F4F6;
}

.mbw-participant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.mbw-participant-row:last-child {
    margin-bottom: 0;
}

.mbw-participant-row label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1A2B49;
    display: block;
    margin-bottom: 2px;
}

.mbw-participant-row small {
    color: #FF5533;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 13px;
}

.mbw-qty-controls {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    overflow: hidden;
}

.mbw-qty-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: #1A2B49;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-weight: 600;
}

.mbw-qty-btn:hover {
    background: #F5F5F5;
    color: #FF5533;
}

.mbw-qty-controls input {
    width: 40px;
    text-align: center;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #1A2B49;
    pointer-events: none;
    -moz-appearance: textfield;
    background: transparent;
    padding: 0;
}

.mbw-qty-controls input::-webkit-inner-spin-button,
.mbw-qty-controls input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Total Display */
.mbw-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
    color: #1A2B49;
}

.mbw-total-display span:last-child {
    color: #FF5533;
    font-size: 22px;
}

/* Buttons */
.mbw-btn-group {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.mbw-btn-next,
.mbw-btn-submit,
.mbw-btn-close-final {
    background: linear-gradient(135deg, #FF5533, #FF7849);
    color: #FFFFFF;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 85, 51, 0.2);
}

.mbw-btn-next:hover,
.mbw-btn-submit:hover,
.mbw-btn-close-final:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 85, 51, 0.3);
}

.mbw-btn-prev {
    background: transparent;
    color: #1A2B49;
    border: 1px solid #E5E7EB;
    padding: 14px 24px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 50%;
}

.mbw-btn-prev:hover {
    background: #F5F5F5;
    border-color: #D1D5DB;
}

.mbw-btn-group .mbw-btn-next,
.mbw-btn-group .mbw-btn-submit {
    width: 50%;
}

/* Payment Summary */
.mbw-payment-summary {
    background: linear-gradient(135deg, rgba(26, 43, 73, 0.03), rgba(26, 43, 73, 0.06));
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(26, 43, 73, 0.08);
}

.mbw-payment-summary h4 {
    margin-top: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(26, 43, 73, 0.08);
    padding-bottom: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1A2B49;
}

.mbw-payment-summary p {
    margin: 6px 0;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #374151;
}

.mbw-highlight-total {
    color: #FF5533;
    font-weight: 700;
    font-size: 18px;
}

/* Stripe Container */
.mbw-stripe-container {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FAFAFA;
}

#payment-message {
    color: #EF4444;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    padding: 8px;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 6px;
}

.hidden {
    display: none !important;
}

/* Success State */
.mbw-success-state {
    text-align: center;
    padding: 24px 0;
}

.mbw-success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10B981, #34D399);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.mbw-success-state h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #1A2B49;
}

.mbw-success-state p {
    color: #6B7280;
    font-size: 15px;
    margin-bottom: 16px;
}

.mbw-success-state p strong {
    color: #1A2B49;
}

/* Responsive */
@media (max-width: 520px) {
    .mbw-modal-content {
        padding: 24px 20px;
        border-radius: 12px;
        width: 95%;
    }

    .mbw-step-indicator {
        font-size: 10px;
        padding: 4px 8px;
    }

    .mbw-btn-group {
        flex-direction: column;
    }

    .mbw-btn-prev,
    .mbw-btn-group .mbw-btn-next,
    .mbw-btn-group .mbw-btn-submit {
        width: 100%;
    }
}
