/* ── Custom Styled Angebotsfinder - Consolidated & Clean ── */

.wh-quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    text-align: center;
}

.wh-quiz-step {
    display: none;
}

.wh-quiz-step.active {
    display: block !important;
}

.wh-quiz-headline {
    font-family: var(--e-global-typography-primary-font-family, 'Cinzel', serif);
    color: var(--e-global-color-text-primary, #2d3b2a);
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.wh-quiz-sub {
    font-family: var(--e-global-typography-secondary-font-family, serif);
    font-style: italic;
    color: var(--e-global-color-text-muted, #7c8a74);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.wh-quiz-pills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
}

/* 1. BUTTON HOVER / ACTIVE STYLING (matching the screenshot exactly) */
.wh-quiz-pill {
    background: transparent !important;
    border: 1px solid var(--e-global-color-text-muted, #c2c9bc) !important;
    color: var(--e-global-color-text-primary, #2d3b2a) !important;
    padding: 12px 25px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Hover-state (like "Selbstzweifel" on screenshot): solid border & clear shadow */
.wh-quiz-pill:hover, .wh-quiz-pill:focus {
    border-color: #2d3b2a !important;
    background: rgba(45, 59, 42, 0.02) !important;
    box-shadow: 0 4px 15px rgba(45, 59, 42, 0.08) !important;
    transform: translateY(-1px) !important;
    color: #2d3b2a !important;
}

/* Active/selected-state (like "alles zu viel" on screenshot): olive/gold, white text */
.wh-quiz-pill.selected {
    background-color: #b1b98b !important;
    color: #ffffff !important;
    border-color: #b1b98b !important;
    box-shadow: 0 4px 15px rgba(177, 185, 139, 0.3) !important;
    transform: translateY(-1px) !important;
}

.wh-quiz-pill.selected::after {
    content: " ✓" !important;
    font-size: .9em !important;
    margin-left: .25em !important;
}

/* 2. SECOND PHASE: EXACT 3x2 RASTER STYLING */
.wh-quiz-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 50px !important;
    align-items: stretch !important; /* Ensures grid children match parent height */
}

@media (max-width: 768px) {
    .wh-quiz-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .wh-quiz-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

.wh-quiz-card {
    background: #fff !important;
    border: 1px solid var(--e-global-color-text-muted, #c2c9bc) !important;
    border-radius: 12px !important;
    padding: 30px 20px !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    outline: none !important;
    box-shadow: none !important;
    min-height: 180px !important; /* Fixed minimum height to make cards equal size */
    height: 100% !important; /* Stretches inside the grid */
    box-sizing: border-box !important;
}

/* Card Hover */
.wh-quiz-card:hover, .wh-quiz-card:focus {
    border-color: #2d3b2a !important;
    background: rgba(45, 59, 42, 0.02) !important;
    box-shadow: 0 6px 15px rgba(45, 59, 42, 0.08) !important;
    transform: translateY(-2px) !important;
}

/* Card Selected (Olive background, white text and inverted icon) */
.wh-quiz-card.selected {
    background-color: #b1b98b !important;
    border-color: #b1b98b !important;
    box-shadow: 0 6px 15px rgba(177, 185, 139, 0.3) !important;
    transform: translateY(-2px) !important;
}

.wh-quiz-card.selected .wh-quiz-card-title {
    color: #ffffff !important;
}

.wh-quiz-card.selected .wh-quiz-card-icon img {
    filter: brightness(0) invert(1) !important;
}

.wh-quiz-card-icon {
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wh-quiz-card-icon img {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
}

.wh-quiz-card-title {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    color: var(--e-global-color-text-primary, #2d3b2a) !important;
    text-align: center !important;
}

/* 3. FINAL PAGE (RESULT): WooCommerce Cards and clean template wrap (strip outer borders/boxes) */
.wh-quiz-result-render {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Remove default extra borders/containers on the matched template container */
.wh-quiz-result-render > div {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Buttons */
.wh-quiz-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.wh-quiz-btn {
    background: #3d422b !important;
    color: #fff !important;
    border: none !important;
    padding: 15px 40px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.wh-quiz-btn:hover:not(:disabled) {
    opacity: 0.9 !important;
}

.wh-quiz-btn:disabled {
    background: #e0e0e0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

.wh-quiz-back-btn, .wh-quiz-restart-btn {
    background: transparent !important;
    border: 1px solid var(--e-global-color-text-muted, #c2c9bc) !important;
    color: var(--e-global-color-text-primary, #2d3b2a) !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.wh-quiz-back-btn:hover, .wh-quiz-restart-btn:hover {
    background: rgba(0,0,0,0.02) !important;
}

.wh-quiz-footer-text {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--e-global-color-text-muted, #7c8a74);
    margin-top: 40px;
}

/* Spinner */
.wh-quiz-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.wh-quiz-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #c2c9bc;
    border-bottom-color: #2d3b2a;
    border-radius: 50%;
    animation: whRotation 1s linear infinite;
}

@keyframes whRotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
