/* ============================================
   BIM Booking Wizard – Instagram-Style Modal
   ============================================ */

/* --- Overlay & Modal Container --- */
.bw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 16px;
}

.bw-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bw-modal {
    background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 28px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(14, 165, 233, 0.08);
    transform: translateY(30px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bw-overlay.active .bw-modal {
    transform: translateY(0) scale(1);
}

/* Custom scrollbar */
.bw-modal::-webkit-scrollbar {
    width: 4px;
}
.bw-modal::-webkit-scrollbar-track {
    background: transparent;
}
.bw-modal::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.2);
    border-radius: 10px;
}

/* --- Close Button --- */
.bw-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    line-height: 1;
}
.bw-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

/* --- Header / Progress --- */
.bw-header {
    padding: 28px 30px 0;
    text-align: center;
}

.bw-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 0 20px;
}

.bw-progress-step {
    display: flex;
    align-items: center;
    gap: 0;
}

.bw-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    flex-shrink: 0;
}

.bw-progress-dot.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
    transform: scale(1.1);
}

.bw-progress-dot.done {
    background: linear-gradient(135deg, #5cba3c 0%, #4ade80 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(92, 186, 60, 0.3);
}

.bw-progress-line {
    width: 60px;
    height: 3px;
    background: #e2e8f0;
    border-radius: 3px;
    transition: background 0.4s ease;
    flex-shrink: 0;
}

.bw-progress-line.done {
    background: linear-gradient(90deg, #5cba3c, #4ade80);
}

.bw-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.bw-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* --- Step Content Area --- */
.bw-body {
    padding: 24px 30px 30px;
    position: relative;
    min-height: 280px;
}

.bw-step {
    display: none;
    animation: bwSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bw-step.active {
    display: block;
}

@keyframes bwSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bwSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

.bw-step.exit {
    animation: bwSlideOut 0.25s ease forwards;
}

/* --- Step 1: Category Cards --- */
.bw-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bw-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.bw-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.04) 0%, rgba(92, 186, 60, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.bw-card:hover {
    border-color: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.12);
}

.bw-card:hover::before {
    opacity: 1;
}

.bw-card:active {
    transform: translateY(-1px) scale(0.98);
}

.bw-card.selected {
    border-color: #5cba3c;
    background: linear-gradient(135deg, rgba(92, 186, 60, 0.06) 0%, rgba(92, 186, 60, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(92, 186, 60, 0.15), 0 8px 20px rgba(92, 186, 60, 0.1);
}

.bw-card-emoji {
    font-size: 2.4rem;
    margin-bottom: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.bw-card:hover .bw-card-emoji {
    transform: scale(1.15);
}

.bw-card-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    margin: 0 0 4px;
}

.bw-card-desc {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

/* --- Step 2: Option Cards --- */
.bw-option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bw-option {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bw-option:hover {
    border-color: #0ea5e9;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

.bw-option.selected {
    border-color: #5cba3c;
    background: linear-gradient(135deg, rgba(92, 186, 60, 0.06) 0%, rgba(92, 186, 60, 0.02) 100%);
    box-shadow: 0 0 0 3px rgba(92, 186, 60, 0.15);
}

.bw-option-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bw-option-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bw-option.selected .bw-option-check {
    background: linear-gradient(135deg, #5cba3c 0%, #4ade80 100%);
    border-color: #5cba3c;
    box-shadow: 0 2px 8px rgba(92, 186, 60, 0.3);
}

.bw-option.selected .bw-option-check::after {
    content: '✓';
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.bw-option-name {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f172a;
}

.bw-option-price {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #5cba3c;
    white-space: nowrap;
}

/* --- Step 3: Contact Form --- */
.bw-form-group {
    margin-bottom: 16px;
}

.bw-form-group label {
    display: block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.bw-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1rem;
    color: #0f172a;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.bw-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.bw-input::placeholder {
    color: #94a3b8;
}

/* Contact method selector */
.bw-contact-methods {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.bw-contact-method {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, sans-serif;
}

.bw-contact-method:hover {
    border-color: #0ea5e9;
}

.bw-contact-method.selected {
    border-color: #5cba3c;
    background: rgba(92, 186, 60, 0.06);
    box-shadow: 0 0 0 3px rgba(92, 186, 60, 0.12);
}

.bw-contact-method-icon {
    font-size: 1.4rem;
    margin-bottom: 4px;
    display: block;
}

.bw-contact-method-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

/* --- Buttons --- */
.bw-footer {
    padding: 0 30px 28px;
    display: flex;
    gap: 10px;
}

.bw-btn-back {
    padding: 14px 22px;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.bw-btn-back:hover {
    border-color: #94a3b8;
    color: #334155;
}

.bw-btn-next {
    flex: 1;
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #5cba3c 0%, #4ade80 100%);
    color: #fff;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(92, 186, 60, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bw-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(92, 186, 60, 0.35);
}

.bw-btn-next:active {
    transform: translateY(0);
}

.bw-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bw-btn-next.submit-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.bw-btn-next.submit-btn:hover {
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.35);
}

/* --- Success Screen --- */
.bw-success {
    text-align: center;
    padding: 20px 0;
}

.bw-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #5cba3c 0%, #4ade80 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 10px 30px rgba(92, 186, 60, 0.3);
    animation: bwSuccessPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bwSuccessPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.bw-success-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}

.bw-success-text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.6;
}

.bw-summary {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.bw-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
}

.bw-summary-row:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.bw-summary-label {
    color: #64748b;
    font-weight: 500;
}

.bw-summary-value {
    color: #0f172a;
    font-weight: 700;
}

.bw-btn-close-success {
    margin-top: 24px;
    padding: 14px 40px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

.bw-btn-close-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.3);
}

/* --- Mobile Responsive --- */
@media (max-width: 600px) {
    .bw-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .bw-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    .bw-overlay.active .bw-modal {
        transform: translateY(0);
    }

    .bw-header {
        padding: 22px 20px 0;
    }

    .bw-body {
        padding: 20px 20px 24px;
        min-height: 240px;
    }

    .bw-footer {
        padding: 0 20px 24px;
    }

    .bw-title {
        font-size: 1.25rem;
    }

    .bw-card-grid {
        gap: 10px;
    }

    .bw-card {
        padding: 18px 12px;
        border-radius: 14px;
    }

    .bw-card-emoji {
        font-size: 2rem;
    }

    .bw-card-title {
        font-size: 0.85rem;
    }

    .bw-progress-line {
        width: 40px;
    }

    .bw-contact-methods {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .bw-contact-method {
        padding: 10px 6px;
    }

    .bw-contact-method-icon {
        font-size: 1.2rem;
    }

    .bw-contact-method-label {
        font-size: 0.7rem;
    }
}

/* Utility: body scroll lock */
body.bw-no-scroll {
    overflow: hidden !important;
}

/* --- File Upload Area --- */
.bw-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin-top: 6px;
}
.bw-upload-area:hover,
.bw-upload-area.drag-over {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.04);
}
.bw-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}
.bw-upload-text {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0 0 4px;
}
.bw-upload-link {
    color: #0ea5e9;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}
.bw-upload-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

/* --- File Preview Tiles --- */
.bw-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.bw-file-item {
    position: relative;
    width: 80px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 6px;
}
.bw-file-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    display: block;
    border-radius: 9px 9px 0 0;
}
.bw-file-icon {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: #e2e8f0;
}
.bw-file-name {
    font-size: 0.65rem;
    color: #475569;
    padding: 4px 4px 0;
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
}
.bw-file-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: none;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s;
}
.bw-file-remove:hover { background: #ef4444; }

/* --- Promo Banner --- */
.bw-promo-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 100%);
    border: 1.5px dashed #22c55e;
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 22px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bw-promo-badge {
    background: #22c55e;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2);
}

.bw-promo-banner p {
    font-size: 0.9rem;
    color: #15803d;
    margin: 0;
    line-height: 1.45;
    font-weight: 600;
}

.bw-promo-banner p strong {
    font-weight: 800;
}

