@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;500;700&display=swap');

/* --- CORE ARCHITECTURE --- */
.app-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: 'Comfortaa', system-ui, sans-serif;
    text-align: center;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.app-container *, 
.app-container *::before, 
.app-container *::after { 
    box-sizing: border-box; 
}

.app-container h1 {
    font-size: 2.4rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a202c;
    margin: 0 0 10px 0;
}

.app-container .step-subtitle {
    font-size: 1.2rem;
    color: #4a5568;
    margin: 0 auto 30px auto;
    max-width: 750px;
}

#progress-text {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #718096;
}

/* --- STEPS 1 & 2: INPUT SELECTION GRID --- */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Base style for clickable selection cards */
.selection-card {
    background: #ffffff;
    border: 3px solid #cbd5e0;
    border-radius: 20px;
    padding: 20px; 
    width: 240px; 
    min-height: 360px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.selection-card h3 {
    margin: 0 0 12px 0; 
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    height: 3rem; 
    overflow: hidden;
}

.selection-card .card-image {
    width: 100%; 
    height: 160px; 
    background: #ffffff;
    overflow: hidden; 
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-card .card-image img {
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain;
}

.selection-card .card-desc {
    margin: 0; 
    font-size: 0.95rem; 
    color: #4a5568;
    line-height: 1.4;
}

/* Active Toggle State */
.selection-card.selected {
    border-color: #1a365d;
    box-shadow: 0 8px 16px rgba(26, 54, 93, 0.12);
    transform: translateY(-4px);
    background-color: #f7fafc;
}

/* --- STEP 3: EXCLUSIVE ROW LAYOUT --- */
.recommendations-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}

.tool-row-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    padding: 16px 24px;
    background: #ffffff;
    border: 3px solid #cbd5e0;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tool-row-card .row-image-area {
    width: 65px;
    height: 65px;
    min-width: 65px;
    max-width: 65px;
    margin-right: 24px;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-row-card .row-image-area img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.tool-row-card .row-text-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex-grow: 1;
    min-width: 0;
}

.tool-row-card .row-text-area h3 {
    margin: 0 0 4px 0;
    font-size: 1.25rem;
    color: #2d3748;
    line-height: 1.2;
}

.tool-row-card .row-text-area .card-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
}

.tool-row-card .select-indicator-bubble {
    width: 32px;
    height: 32px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e0;
    font-weight: 700;
    font-size: 1.1rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Step 3 Selection Interaction States */
.tool-row-card.selected {
    background-color: #ebf8ff;
    border-color: #2b6cb0;
}
.tool-row-card.selected .select-indicator-bubble {
    border-color: #2b6cb0;
    background-color: #2b6cb0;
    color: #ffffff;
}

/* --- NAVIGATION BUTTONS & INTERFACES --- */
.button-container { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 30px; 
}
.next-btn, .prev-btn, .submit-btn { 
    padding: 16px 40px; 
    font-size: 1.15rem; 
    font-weight: 700; 
    border-radius: 30px; 
    cursor: pointer; 
    border: none; 
    font-family: inherit;
    transition: background 0.15s ease;
}
.prev-btn { background: #e2e8f0; color: #4a5568; }
.prev-btn:hover { background: #cbd5e0; }
.next-btn { background: #4a5568; color: white; }
.next-btn:hover { background: #2d3748; }
.submit-btn { background: #2b6cb0; color: white; }
.submit-btn:hover { background: #1a365d; }

.tab-toggle-btn.active-tab {
    background: #b7791f;
    color: white;
    box-shadow: 0 4px 10px rgba(183, 121, 31, 0.2);
}

/* Clean Core Visibility Control */
.hidden { 
    display: none !important; 
}