/* MTE Multistep Booking Form */
.mte-multistep {
    position: relative;
    width: 100%;
}

/* Progress Indicator */
.mte-booking-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.mte-booking-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--mte-border, #eaeaea);
    z-index: 1;
    transform: translateY(-50%);
}

.mte-step-indicator {
    position: relative;
    z-index: 2;
    background: var(--mte-surface, #fff);
    color: var(--mte-text-muted, #999);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.mte-step-indicator span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mte-surface, #fff);
    border: 2px solid var(--mte-border, #eaeaea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.mte-step-indicator.active {
    color: var(--mte-primary, #ff5a5f);
}

.mte-step-indicator.active span {
    border-color: var(--mte-primary, #ff5a5f);
    background: var(--mte-primary, #ff5a5f);
    color: #fff;
}

.mte-step-indicator.completed span {
    border-color: var(--mte-text-muted, #999);
    color: transparent;
    background: var(--mte-text-muted, #999) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center center / 16px;
}

/* Step Wrappers & Animations */
.mte-booking-steps-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.mte-booking-step {
    display: none;
    opacity: 0;
}

.mte-booking-step.active {
    display: block;
    opacity: 1;
}

/* Entering Animation */
.mte-anim-enter {
    animation: mteFadeInUp 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;
}

/* Exiting Animation */
.mte-anim-leave {
    animation: mteFadeOut 0.2s ease forwards;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

@keyframes mteFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mteFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
    .mte-anim-enter {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .mte-anim-leave {
        animation: none;
        opacity: 0;
        display: none;
    }
}

/* Action Buttons & States */
.mte-step-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.mte-step-actions .mte-btn {
    flex: 1;
    transition: all 0.2s ease;
}

.mte-step-actions .mte-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--mte-shadow-soft, 0 4px 12px rgba(0, 0, 0, 0.1));
}

.mte-step-actions .mte-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}

.mte-step-actions .mte-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mte-btn-secondary {
    background: transparent;
    border: 1px solid var(--mte-border, #ddd);
    color: var(--mte-text-body, #333);
}

.mte-btn-secondary:hover:not(:disabled) {
    background: var(--mte-surface-hover, #f9f9f9);
}

/* Loading Spinner on Buttons */
.mte-btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.mte-btn-loading::after {
    content: '';
    position: absolute;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mteSpin 0.8s linear infinite;
}

@keyframes mteSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.mte-error-msg {
    color: var(--mte-primary, #ff5a5f);
    font-size: 13px;
    margin-top: 5px;
    min-height: 18px;
    transition: opacity 0.2s ease;
}

.mte-input-error {
    border-color: var(--mte-primary, #ff5a5f) !important;
}

.mte-shake {
    animation: mteShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes mteShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mte-shake {
        animation: none;
    }
}

/* Saved Date Pill */
.mte-saved-badge {
    display: inline-block;
    background: #e6f4ea;
    color: #1e8e3e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    visibility: hidden;
}

.mte-saved-badge.active {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

/* Stepper UI */
.mte-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--mte-border, #ddd);
    border-radius: var(--mte-radius, 8px);
    overflow: hidden;
    height: 44px;
}

.mte-stepper-btn {
    flex: 0 0 44px;
    height: 100%;
    border: none;
    background: var(--mte-surface-hover, #f7f7f7);
    color: var(--mte-text-heading, #111);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mte-stepper-btn:hover:not(:disabled) {
    background: #eaeaea;
}

.mte-stepper-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mte-stepper-val {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--mte-text-heading, #111);
    user-select: none;
}

/* Premium Booking Summary Card (Step 3) */
.mte-booking-summary-card {
    background: var(--mte-surface, #f9fafb);
    border: 1px solid var(--mte-border, #e5e7eb);
    border-radius: var(--mte-radius, 8px);
    padding: 16px;
    margin-bottom: 20px;
}

.mte-bsc-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--mte-text-heading, #111827);
    font-family: var(--mte-font-heading, inherit) !important;
}

.mte-bsc-guests {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mte-border, #e5e7eb);
    margin-bottom: 12px;
}

.mte-bsc-guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--mte-text-body, #4b5563);
}

.mte-bsc-guest-row span i {
    color: var(--mte-text-muted, #9ca3af);
    margin-right: 4px;
    font-size: 14px;
    vertical-align: middle;
}

.mte-bsc-total-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mte-lt-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--mte-text-muted, #6b7280);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.mte-lt-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--mte-primary, #ff5a5f);
    margin: 0;
    line-height: 1;
}

.mte-lt-type {
    display: block;
    color: var(--mte-text-muted, #9ca3af);
    font-size: 11px;
    margin-top: 4px;
}

.mte-bsc-deposit {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--mte-border, #e5e7eb);
}

/* Badges */
.mte-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 13px;
}

.mte-badges span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* Premium Payment Selection Cards */
.mte-payment-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.mte-pm-card {
    display: block;
    border: 2px solid var(--mte-border, #e5e7eb);
    border-radius: var(--mte-radius, 8px);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--mte-surface, #fff);
    position: relative;
}

.mte-pm-card:hover {
    border-color: #d1d5db;
}

.mte-pm-card.active {
    border-color: var(--mte-primary, #ff5a5f);
    background: rgba(var(--mte-primary-rgb, 255, 90, 95), 0.04);
}

.mte-pm-card.active::before {
    content: '✓';
    position: absolute;
    top: 14px;
    right: 16px;
    color: var(--mte-primary, #ff5a5f);
    font-weight: 800;
    font-size: 16px;
}

.mte-pm-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mte-pm-radio {
    display: none;
    /* Hide native radio, use the styled card */
}

.mte-pm-icon {
    width: 24px;
    color: var(--mte-text-muted, #9ca3af);
    flex-shrink: 0;
    margin-top: 2px;
}

.mte-pm-card.active .mte-pm-icon {
    color: var(--mte-primary, #ff5a5f);
}

.mte-pm-details {
    flex: 1;
    min-width: 0;
    /* Important for flex-child text truncation */
    padding-right: 20px;
    /* Space for checkmark */
}

.mte-pm-name {
    display: block;
    font-weight: 700;
    color: var(--mte-text-heading, #111827);
    font-size: 14px;
    margin-bottom: 2px;
}

.mte-pm-desc {
    display: block;
    font-size: 13px;
    color: var(--mte-text-muted, #6b7280);
    line-height: 1.4;
    white-space: normal;
    /* Allow wrapping */
}

.mte-pm-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
    display: block;
    color: var(--mte-text-heading, #111827);
}

.mte-pm-instructions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--mte-border, #e5e7eb);
    font-size: 13px;
    color: var(--mte-text-body, #4b5563);
    line-height: 1.5;
}

.mte-pm-desc {
    display: block;
    color: var(--mte-text-muted, #777);
    font-size: 13px;
    line-height: 1.4;
}

.mte-pm-instructions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--mte-border, #eaeaea);
    font-size: 13px;
    color: var(--mte-text-body, #444);
    line-height: 1.5;
    animation: mteFadeIn 0.3s ease;
}

/* Live Pricing Block */
.mte-live-total-wrapper {
    background: var(--mte-surface-hover, #f9f9f9);
    border-radius: var(--mte-radius, 12px);
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--mte-border, #eaeaea);
}

.mte-lt-label {
    display: block;
    font-size: 14px;
    color: var(--mte-text-muted, #777);
    margin-bottom: 5px;
}

.mte-lt-amount {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--mte-text-heading, #111);
}

.mte-lt-type {
    display: block;
    color: var(--mte-text-muted, #888);
    margin-top: 5px;
}

.mte-br-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--mte-border, #ddd);
}

.mte-br-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--mte-text-muted, #666);
    margin-bottom: 4px;
}

.mte-br-val {
    font-size: 16px;
    font-weight: 700;
}

.mte-text-primary {
    color: var(--mte-primary, #ff5a5f);
}

.mte-text-secondary {
    color: var(--mte-text-heading, #333);
}

/* Mobile Sticky CTA */
.mte-mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--mte-surface, #fff);
    border-top: 1px solid var(--mte-border, #eaeaea);
    padding: 15px 20px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    z-index: 999;
}

@media (max-width: 767px) {

    /* Hide the primary step 1 next button on mobile in favor of sticky */
    .mte-booking-step[data-step="1"] .mte-next-btn {
        display: none;
    }

    .mte-mobile-sticky-cta.active {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    .mte-msc-price {
        display: flex;
        flex-direction: column;
    }

    .mte-msc-label {
        font-size: 12px;
        color: var(--mte-text-muted, #777);
        font-weight: 600;
        text-transform: uppercase;
    }

    .mte-msc-amount {
        font-size: 18px;
        font-weight: 700;
        color: var(--mte-text-heading, #111);
    }

    .mte-msc-btn {
        flex: 1;
        max-width: 150px;
        margin: 0;
    }
}