/**
 * Author: Muhammad Arshad Thaheem | arshadthaheem.com
 * Version: 1.0.0
 */

.quizfubu-quiz-wrapper {
    max-width: 700px;
    margin: 0 auto;
    font-size: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 32px;
    box-sizing: border-box;
    /* Prevents container breakdown on older viewports */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media screen and (max-width: 480px) {
    .quizfubu-quiz-wrapper {
        padding: 16px;
        border-radius: 12px;
        margin: 10px;
    }
}

.quizfubu-main-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 20px;
    color: inherit;
    /* Prevents giant long quiz titles from overflowing */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-progress-container {
    margin-bottom: 24px;
}

.quizfubu-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.quizfubu-upper-label {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
}

.quizfubu-step-counter {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    display: block;
}

.quizfubu-progress-track {
    width: 100%;
    height: 6px;
    background: #ebebeb;
    border-radius: 20px;
    overflow: hidden;
}

.quizfubu-progress-bar {
    height: 100%;
    background: #2271b1;
    width: 0%;
    transition: width 0.4s ease;
}

.quizfubu-question-number {
    font-size: 11px;
    font-weight: 700;
    color: #c5a47e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.quizfubu-question-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.3;
    color: inherit;
    /* Safely wraps exceptionally long question sentences */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.quizfubu-option-card {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    gap: 14px;
    /* Forces content to live inside card bound limits on small mobile sizes */
    box-sizing: border-box;
    width: 100%;
    min-width: 0; 
}

.quizfubu-option-card:hover {
    border-color: #2271b1;
    background-color: #f7fbff;
}

.quizfubu-option-card.selected {
    border-color: #2271b1;
    background-color: #eef4fb;
    border-width: 2px;
}

.quizfubu-label-circle {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #333;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Ensures circle badge never squashes into an oval on long text rows */
}

.quizfubu-option-card.selected .quizfubu-label-circle {
    background: #2271b1;
    color: #fff;
}

.quizfubu-option-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: inherit;
    /* Fixes option answers bleeding out horizontally */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
    flex-grow: 1;
}

.quizfubu-next-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
    font-family: inherit;
    margin-top: 10px;
    box-sizing: border-box;
}

.quizfubu-next-btn:disabled {
    background: #e0e0e0;
    color: #a1a1a1;
    cursor: not-allowed;
}

.quizfubu-next-btn:not(:disabled):hover {
    opacity: 0.88;
}

.quizfubu-results-screen {
    display: none;
}

.quizfubu-result-card-main {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
}

.quizfubu-result-title {
    font-size: 32px !important;
    font-weight: 900 !important;
    margin: 0 0 16px !important;
    color: inherit !important;
    font-family: inherit !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-result-badge-display {
    background: #2271b1;
    color: #fff;
    padding: 4px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 14px;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

.quizfubu-result-message {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-score-display {
    font-size: 64px;
    font-weight: 900;
    color: #2271b1;
    line-height: 1;
    display: block;
}

.quizfubu-score-label {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 4px 0 16px;
    display: block;
}

.quizfubu-score-track {
    background: #eee;
    height: 25px;
    border-radius: 6px;
    overflow: hidden;
    max-width: 60%;
    margin: 0 auto;
}

.quizfubu-result-progress-bar {
    background: #2271b1;
    height: 100%;
    width: 0%;
    transition: width 0.8s ease;
}

.quizfubu-analysis-section {
    margin: 24px 0;
}

.quizfubu-analysis-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 16px;
    color: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-cards-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quizfubu-insight-card {
    background: #fffdf7;
    border: 1px solid #f0ede4;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-align: left;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.quizfubu-insight-card-emoji {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}

.quizfubu-insight-card-body {
    min-width: 0;
    flex-grow: 1;
}

.quizfubu-insight-card-body h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-insight-card-body p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quizfubu-lead-form-area {
    margin-top: 24px;
}

.quizfubu-retake-link {
    display: block;
    text-align: center;
    margin: 24px 0 0;
    text-decoration: underline;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
}

@media ( max-width: 600px ) {
    .quizfubu-main-title     { font-size: 22px; }
    .quizfubu-question-title { font-size: 18px; }
    .quizfubu-score-display  { font-size: 48px; }
    .quizfubu-option-card    { padding: 12px 14px; }
    .quizfubu-result-card-main { padding: 20px; }
    /* Scales down the score graph bar layout nicely on mobile displays */
    .quizfubu-score-track { max-width: 85%; }
}