/**
 * Design Decision Tree Styles
 */

/* Page Layout */
.design-tree-page {
    min-height: 100vh;
    padding: 8rem 6% 4rem;
}

.tree-container {
    max-width: 900px;
    margin: 0 auto;
}

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

.tree-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tree-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Indicator */
.progress-indicator {
    margin-bottom: 3rem;
    position: relative;
}

.progress-bar-fill {
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Question Container */
.question-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.question {
    animation: slideIn 0.4s ease-out;
}

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

.question h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.question-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Answer Options */
.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.answer-option:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.answer-option:hover::before {
    transform: scaleY(1);
}

.answer-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.answer-option.selected::before {
    transform: scaleY(1);
}

.answer-option h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.answer-option .icon {
    font-size: 1.5rem;
}

.answer-option p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-left: 2.25rem;
}

/* Multi-select checkbox style */
.answer-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.answer-option .checkbox-indicator {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.answer-option.selected .checkbox-indicator {
    background: var(--primary);
    border-color: var(--primary);
}

.answer-option.selected .checkbox-indicator::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Navigation Buttons */
.tree-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 10;
}

.tree-navigation .btn-secondary,
.tree-navigation .btn-primary {
    flex: 0 0 auto;
    cursor: pointer;
    pointer-events: auto;
}

.tree-navigation .btn-primary {
    margin-left: auto;
}

/* Results Container */
.results-container {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

/* Recommendations Grid */
.recommendations-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.recommendation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    animation: slideUp 0.5s ease-out;
    animation-fill-mode: both;
}

.recommendation-card:nth-child(1) { animation-delay: 0.1s; }
.recommendation-card:nth-child(2) { animation-delay: 0.2s; }
.recommendation-card:nth-child(3) { animation-delay: 0.3s; }
.recommendation-card:nth-child(4) { animation-delay: 0.4s; }
.recommendation-card:nth-child(5) { animation-delay: 0.5s; }

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

.recommendation-card .card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recommendation-card .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.recommendation-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.recommendation-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.recommendation-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.recommendation-card li::before {
    content: '→';
    color: var(--primary);
    font-weight: bold;
    flex-shrink: 0;
}

.recommendation-highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 2px solid var(--primary);
}

/* Next Steps Section */
.next-steps-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
}

.next-steps-section h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .design-tree-page {
        padding: 6rem 4% 3rem;
    }

    .question-container {
        padding: 2rem 1.5rem;
        min-height: 350px;
    }

    .question h2 {
        font-size: 1.5rem;
    }

    .answer-option {
        padding: 1.25rem;
    }

    .answer-option p {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .tree-navigation {
        flex-direction: column;
    }

    .tree-navigation .btn-primary {
        margin-left: 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .next-steps-section {
        padding: 2rem 1.5rem;
    }

    .recommendation-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tree-header h1 {
        font-size: 1.75rem;
    }

    .tree-header p {
        font-size: 1rem;
    }

    .answer-option h3 {
        font-size: 1rem;
    }

    .answer-option .icon {
        font-size: 1.25rem;
    }
}
