/* ── Smart Quiz Frontend ─────────────────────────────────── */

.sq-quiz-container {
    --sq-accent:   #6C63FF;
    --sq-btn-bg:   #6C63FF;
    --sq-btn-text: #ffffff;
    --sq-radius:   12px;

    max-width: 680px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fff;
    border-radius: var(--sq-radius);
    box-shadow: 0 4px 32px rgba(0,0,0,.10);
    overflow: hidden;
}

/* Progress */
.sq-progress-wrap {
    background: #f5f5f7;
    padding: 16px 24px 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.sq-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 99px;
    overflow: hidden;
}
.sq-progress-fill {
    height: 100%;
    background: var(--sq-accent);
    border-radius: 99px;
    transition: width .4s ease;
}
.sq-progress-text { font-size: 13px; color: #888; white-space: nowrap; }
.sq-step-current  { color: var(--sq-accent); font-weight: 700; }

/* Title */
.sq-quiz-title {
    margin: 0;
    padding: 20px 28px 0;
    font-size: 20px;
    color: #1d2327;
}

/* Questions */
.sq-questions { padding: 20px 28px 8px; }

.sq-question-text {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 18px;
    line-height: 1.4;
}

/* Answers */
.sq-answers { display: flex; flex-direction: column; gap: 10px; }

.sq-answer-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
.sq-answer-option:hover { border-color: var(--sq-accent); background: color-mix(in srgb, var(--sq-accent) 6%, #fff); }
.sq-answer-option input { display: none; }
.sq-answer-option.sq-selected {
    border-color: var(--sq-accent);
    background: color-mix(in srgb, var(--sq-accent) 10%, #fff);
}
.sq-answer-label { font-size: 15px; color: #333; }

/* Text answer */
.sq-answer-text {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color .2s;
    box-sizing: border-box;
    resize: vertical;
}
.sq-answer-text:focus { outline: none; border-color: var(--sq-accent); }

/* Contact step */
.sq-contact-hint { color: #888; font-size: 14px; margin: -8px 0 18px; }

.sq-contact-fields { display: flex; flex-direction: column; gap: 14px; }
.sq-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.sq-required { color: #e74c3c; }
.sq-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color .2s;
    box-sizing: border-box;
}
.sq-input:focus { outline: none; border-color: var(--sq-accent); }

/* Validation */
.sq-validation-msg {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fdecea;
    border-radius: 6px;
}

/* Navigation */
.sq-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px 24px;
}

.sq-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}
.sq-btn-prev {
    background: #f0f0f3;
    color: #555;
}
.sq-btn-prev:hover { background: #e5e5e8; }

.sq-btn-next {
    background: var(--sq-btn-bg);
    color: var(--sq-btn-text);
    margin-left: auto;
}
.sq-btn-next:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.sq-btn-next:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Success */
.sq-success {
    text-align: center;
    padding: 48px 28px;
}
.sq-success-icon { font-size: 56px; margin-bottom: 16px; }
.sq-success-message { font-size: 20px; font-weight: 600; color: #1d2327; margin-bottom: 12px; }
.sq-score-display { font-size: 15px; color: #666; }

/* Privacy checkbox */
.sq-privacy-wrap {
    margin-top: 16px;
}
.sq-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}
.sq-privacy-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--sq-accent);
    cursor: pointer;
}
.sq-privacy-label a {
    color: var(--sq-accent);
    text-decoration: underline;
}
.sq-privacy-label a:hover {
    text-decoration: none;
}

@media (max-width: 600px) {
    .sq-quiz-container { border-radius: 0; margin: 0; }
    .sq-questions, .sq-navigation { padding-left: 16px; padding-right: 16px; }
    .sq-quiz-title { padding-left: 16px; padding-right: 16px; }
}
