/* Business Assessment Wizard - Frontend Styles */

:root {
    --baw-primary: #4F46E5;
    --baw-secondary: #10B981;
    --baw-error: #EF4444;
    --baw-text: #1F2937;
    --baw-text-light: #6B7280;
    --baw-bg: #FFFFFF;
    --baw-bg-light: #F9FAFB;
    --baw-border: #E5E7EB;
    --baw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --baw-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Container */
.baw-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header */
.baw-header {
    text-align: center;
    margin-bottom: 2rem;
}

.baw-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--baw-text);
    margin-bottom: 0.5rem;
}

.baw-header p {
    font-size: 1.125rem;
    color: var(--baw-text-light);
}

/* Rules and Disclaimer */
.baw-rules,
.baw-disclaimer {
    background: var(--baw-bg-light);
    border-left: 4px solid var(--baw-primary);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.375rem;
}

.baw-rules h3,
.baw-disclaimer h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--baw-text);
}

.baw-rules p,
.baw-disclaimer p {
    font-size: 0.875rem;
    color: var(--baw-text-light);
    margin: 0;
    line-height: 1.5;
}

/* Progress Bar */
.baw-progress-container {
    margin-bottom: 2rem;
}

.baw-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--baw-bg-light);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.baw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--baw-primary), var(--baw-secondary));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.baw-progress-text {
    font-size: 0.875rem;
    color: var(--baw-text-light);
    text-align: center;
}

/* Step Container */
.baw-step {
    background: var(--baw-bg);
    border-radius: 0.5rem;
    box-shadow: var(--baw-shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    animation: baw-slide-in 0.3s ease;
}

@keyframes baw-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.baw-step.baw-fade-in {
    animation: baw-fade-in 0.3s ease;
}

@keyframes baw-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.baw-step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--baw-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.baw-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--baw-primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Question */
.baw-question {
    margin-bottom: 2rem;
}

.baw-question:last-child {
    margin-bottom: 0;
}

.baw-question-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--baw-text);
    margin-bottom: 0.75rem;
}

.baw-question-required {
    color: var(--baw-error);
}

.baw-question-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--baw-bg-light);
    color: var(--baw-text-light);
    border-radius: 9999px;
    font-size: 0.75rem;
    cursor: help;
    position: relative;
}

.baw-question-help:hover::after {
    content: attr(data-help);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--baw-text);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: normal;
    width: 250px;
    margin-bottom: 0.5rem;
    z-index: 10;
    box-shadow: var(--baw-shadow-lg);
}

/* Input Fields */
.baw-input,
.baw-textarea,
.baw-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--baw-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    color: var(--baw-text);
    transition: all 0.2s ease;
}

.baw-input:focus,
.baw-textarea:focus,
.baw-select:focus {
    outline: none;
    border-color: var(--baw-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.baw-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Radio and Checkbox Options */
.baw-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.baw-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--baw-border);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.baw-option:hover {
    border-color: var(--baw-primary);
    background: rgba(79, 70, 229, 0.02);
}

.baw-option input[type="radio"],
.baw-option input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--baw-primary);
    cursor: pointer;
}

.baw-option-label {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--baw-text);
    cursor: pointer;
}

.baw-option.baw-selected {
    border-color: var(--baw-primary);
    background: rgba(79, 70, 229, 0.05);
}

/* Validation */
.baw-question.baw-error .baw-input,
.baw-question.baw-error .baw-textarea,
.baw-question.baw-error .baw-select {
    border-color: var(--baw-error);
}

.baw-error-message {
    color: var(--baw-error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Buttons */
.baw-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.baw-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.baw-btn-primary {
    background: var(--baw-primary);
    color: white;
}

.baw-btn-primary:hover {
    background: #4338CA;
    transform: translateY(-1px);
    box-shadow: var(--baw-shadow-lg);
}

.baw-btn-secondary {
    background: var(--baw-bg-light);
    color: var(--baw-text);
    border: 2px solid var(--baw-border);
}

.baw-btn-secondary:hover {
    background: #E5E7EB;
}

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

.baw-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Scores Display */
.baw-scores {
    background: var(--baw-bg-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.baw-scores h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--baw-text);
    margin-bottom: 1rem;
}

.baw-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--baw-border);
}

.baw-score-item:last-child {
    border-bottom: none;
}

.baw-score-label {
    font-size: 0.9375rem;
    color: var(--baw-text-light);
}

.baw-score-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--baw-primary);
}

/* Completion Message */
.baw-completion {
    text-align: center;
    padding: 3rem 2rem;
}

.baw-completion-icon {
    width: 4rem;
    height: 4rem;
    background: var(--baw-secondary);
    color: white;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.baw-completion h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--baw-text);
    margin-bottom: 0.5rem;
}

.baw-completion p {
    font-size: 1.125rem;
    color: var(--baw-text-light);
}

/* Loading Spinner */
.baw-loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: baw-spin 0.6s linear infinite;
}

@keyframes baw-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 640px) {
    .baw-container {
        padding: 0 0.75rem;
    }
    
    .baw-step {
        padding: 1.5rem;
    }
    
    .baw-header h1 {
        font-size: 1.5rem;
    }
    
    .baw-header p {
        font-size: 1rem;
    }
    
    .baw-buttons {
        flex-direction: column-reverse;
    }
    
    .baw-btn {
        width: 100%;
        justify-content: center;
    }
    
    .baw-question-help:hover::after {
        width: 200px;
        font-size: 0.8125rem;
    }
}

/* Utility Classes */
.baw-hidden {
    display: none !important;
}

.baw-text-center {
    text-align: center;
}

.baw-mt-1 { margin-top: 0.5rem; }
.baw-mt-2 { margin-top: 1rem; }
.baw-mt-3 { margin-top: 1.5rem; }
.baw-mt-4 { margin-top: 2rem; }

.baw-mb-1 { margin-bottom: 0.5rem; }
.baw-mb-2 { margin-bottom: 1rem; }
.baw-mb-3 { margin-bottom: 1.5rem; }
.baw-mb-4 { margin-bottom: 2rem; }
