.basm-quiz {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
}

.basm-quiz-header {
    text-align: center;
    margin-bottom: 30px;
}

.basm-quiz-header h2 {
    font-size: 28px;
    color: var(--basm-primary, #2563eb);
    margin-bottom: 8px;
}

.basm-quiz-header p {
    color: #6b7280;
    font-size: 16px;
}

.basm-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin: 20px 0 15px;
    overflow: hidden;
}

.basm-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--basm-primary, #2563eb), var(--basm-accent, #3b82f6));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.basm-steps-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.basm-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #e5e7eb;
    color: #9ca3af;
    transition: all 0.3s;
}

.basm-step-dot.active {
    background: var(--basm-primary, #2563eb);
    color: #fff;
}

.basm-step-dot.completed {
    background: var(--basm-accent, #3b82f6);
    color: #fff;
}

.basm-step {
    display: none;
    animation: basmFadeIn 0.4s ease;
}

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

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

.basm-step h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #1f2937;
}

.basm-step h3 small {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}

.basm-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.basm-options-grid.vertical {
    grid-template-columns: 1fr;
}

.basm-option-card {
    cursor: pointer;
    display: block;
}

.basm-option-card input {
    display: none;
}

.basm-option-content {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.25s;
    background: #fff;
}

.basm-option-content.horizontal {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.basm-option-card input:checked + .basm-option-content {
    border-color: var(--basm-primary, #2563eb);
    background: rgba(37, 99, 235, 0.04);
    box-shadow: 0 0 0 1px var(--basm-primary, #2563eb);
}

.basm-option-card:hover .basm-option-content {
    border-color: var(--basm-accent, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.basm-option-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.basm-option-content.horizontal .basm-option-icon {
    font-size: 28px;
    margin-bottom: 0;
}

.basm-option-label {
    font-weight: 600;
    font-size: 16px;
    display: block;
    color: #1f2937;
}

.basm-option-content small {
    font-size: 13px;
    color: #6b7280;
    display: block;
    margin-top: 4px;
}

.basm-form-group {
    margin-bottom: 24px;
}

.basm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    font-size: 15px;
}

.basm-form-group textarea,
.basm-form-group input[type="text"],
.basm-form-group input[type="email"],
.basm-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.basm-form-group textarea:focus,
.basm-form-group input:focus {
    border-color: var(--basm-primary, #2563eb);
    outline: none;
}

.basm-range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.basm-range-container input[type="range"] {
    flex: 1;
    accent-color: var(--basm-primary, #2563eb);
    height: 6px;
}

.basm-range-value {
    font-weight: 700;
    font-size: 18px;
    color: var(--basm-primary, #2563eb);
    min-width: 60px;
    text-align: right;
}

.basm-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.basm-pill {
    cursor: pointer;
}

.basm-pill input {
    display: none;
}

.basm-pill {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: #fff;
    color: #4b5563;
}

.basm-pill:has(input:checked) {
    border-color: var(--basm-primary, #2563eb);
    background: var(--basm-primary, #2563eb);
    color: #fff;
}

.basm-pill:hover {
    border-color: var(--basm-accent, #3b82f6);
}

.basm-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.basm-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.basm-btn-primary {
    background: var(--basm-primary, #2563eb);
    color: #fff;
}

.basm-btn-primary:hover {
    background: var(--basm-secondary, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.basm-btn-accent {
    background: var(--basm-accent, #3b82f6);
    color: #fff;
}

.basm-btn-accent:hover {
    opacity: 0.9;
}

.basm-btn-outline {
    background: transparent;
    color: var(--basm-primary, #2563eb);
    border: 2px solid var(--basm-primary, #2563eb);
}

.basm-btn-outline:hover {
    background: rgba(37, 99, 235, 0.04);
}

.basm-loading {
    text-align: center;
    padding: 60px 20px;
}

.basm-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--basm-primary, #2563eb);
    border-radius: 50%;
    animation: basmSpin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes basmSpin {
    to { transform: rotate(360deg); }
}

.basm-summary-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.08));
    border-left: 4px solid var(--basm-primary, #2563eb);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.basm-recommendation-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.basm-recommendation-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.basm-recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.basm-recommendation-header h4 {
    font-size: 18px;
    color: #1f2937;
    margin: 0;
}

.basm-priority-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.basm-priority-high { background: #fef2f2; color: #dc2626; }
.basm-priority-medium { background: #fffbeb; color: #d97706; }
.basm-priority-low { background: #f0fdf4; color: #16a34a; }

.basm-recommendation-reason {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.basm-recommendation-price {
    font-weight: 600;
    color: var(--basm-primary, #2563eb);
    font-size: 15px;
}

.basm-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.basm-contact-form {
    margin-top: 30px;
    padding: 25px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.basm-step-desc {
    color: #6b7280;
    font-size: 15px;
    margin: -8px 0 24px;
    line-height: 1.6;
}

.basm-required {
    color: #dc2626;
    font-weight: 700;
}

.basm-optional {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
}

.basm-privacy-note {
    font-size: 13px;
    color: #6b7280;
    margin-top: 20px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #d1d5db;
}

.basm-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.basm-step-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.basm-contact-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1f2937;
}

#basm-contact-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

#basm-contact-message.success {
    background: #f0fdf4;
    color: #16a34a;
}

#basm-contact-message.error {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 640px) {
    .basm-quiz {
        padding: 20px 15px;
    }

    .basm-options-grid {
        grid-template-columns: 1fr;
    }

    .basm-actions {
        flex-direction: column;
    }

    .basm-btn {
        width: 100%;
        justify-content: center;
    }
}

@media print {
    .basm-nav,
    .basm-actions,
    .basm-contact-form,
    .basm-quiz-header {
        display: none !important;
    }

    .basm-quiz {
        max-width: 100%;
        padding: 0;
    }

    .basm-recommendation-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
