/* ============================================
   BlogQuiz - Interactive Quiz/Configurator
   Brand: #DB1221, Fonts: Poppins, PT Serif
   ============================================ */

.bq-quiz-wrapper {
    margin: 30px 0;
}

.bq-quiz {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    max-width: 720px;
    margin: 0 auto;
}

/* Header */
.bq-header {
    background: #DB1221;
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bq-title {
    font-family: 'PT Serif', serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.bq-progress {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 16px;
}

.bq-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.3s ease, transform 0.3s ease;
}

.bq-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.bq-dot.done {
    background: rgba(255, 255, 255, 0.75);
}

/* Body */
.bq-body {
    padding: 28px 24px 24px;
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

/* Steps */
.bq-step {
    display: none;
    animation: bqSlideIn 0.4s ease forwards;
}

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

@keyframes bqSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bqSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-40px);
    }
}

.bq-step.leaving {
    display: block;
    animation: bqSlideOut 0.3s ease forwards;
}

/* Step counter */
.bq-step-counter {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Question */
.bq-question {
    font-family: 'PT Serif', serif;
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
    line-height: 1.4;
}

/* Answer cards */
.bq-answers {
    display: grid;
    gap: 12px;
}

.bq-answer {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    position: relative;
    user-select: none;
}

.bq-answer:hover {
    border-color: #DB1221;
    background: #fff;
    box-shadow: 0 2px 8px rgba(219, 18, 33, 0.1);
}

.bq-answer.selected {
    border-color: #DB1221;
    background: #fff5f5;
    box-shadow: 0 2px 12px rgba(219, 18, 33, 0.15);
}

.bq-answer-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    color: #666;
    font-weight: 700;
    font-size: 14px;
    margin-right: 14px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.bq-answer.selected .bq-answer-letter {
    background: #DB1221;
    color: #fff;
}

.bq-answer-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

.bq-answer-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #DB1221;
    flex-shrink: 0;
    margin-left: 10px;
}

.bq-answer.selected .bq-answer-check {
    opacity: 1;
}

/* Navigation buttons */
.bq-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
}

.bq-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.bq-btn-next {
    background: #DB1221;
    color: #fff;
    margin-left: auto;
}

.bq-btn-next:hover {
    background: #b50e1b;
    box-shadow: 0 4px 12px rgba(219, 18, 33, 0.3);
}

.bq-btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.bq-btn-back {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.bq-btn-back:hover {
    background: #f5f5f5;
    color: #333;
}

.bq-btn-result {
    background: #DB1221;
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 17px;
    margin-top: 24px;
}

.bq-btn-result:hover {
    background: #b50e1b;
    box-shadow: 0 4px 16px rgba(219, 18, 33, 0.3);
}

.bq-btn-result:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Result screen */
.bq-result {
    display: none;
    animation: bqSlideIn 0.5s ease forwards;
}

.bq-result.active {
    display: block;
}

.bq-result-header {
    text-align: center;
    margin-bottom: 24px;
}

.bq-result-icon {
    width: 64px;
    height: 64px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.bq-result-icon svg {
    width: 32px;
    height: 32px;
    color: #2e7d32;
}

.bq-result-title {
    font-family: 'PT Serif', serif;
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
}

.bq-result-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* Recommended products inside quiz result */
.bq-products-label {
    font-family: 'PT Serif', serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.bq-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.bq-products .bp-card.bp-card-grid {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.bq-products-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* Restart button */
.bq-restart {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.bq-btn-restart {
    background: transparent;
    color: #DB1221;
    border: 2px solid #DB1221;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bq-btn-restart:hover {
    background: #DB1221;
    color: #fff;
}

/* No result fallback */
.bq-no-result {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
    .bq-quiz {
        border-radius: 8px;
        margin: 0 -10px;
    }

    .bq-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bq-title {
        font-size: 17px;
    }

    .bq-progress {
        margin-left: 0;
    }

    .bq-body {
        padding: 20px 18px 18px;
    }

    .bq-question {
        font-size: 18px;
    }

    .bq-answer {
        padding: 14px 14px;
    }

    .bq-answer-text {
        font-size: 14px;
    }

    .bq-result-title {
        font-size: 20px;
    }

    .bq-products {
        grid-template-columns: 1fr;
    }

    .bq-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .bq-btn-result {
        padding: 14px 18px;
        font-size: 15px;
    }
}
