/* Quiz App Premium Styling */
.mazda-quiz-container {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 40px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.mazda-quiz-container * {
    box-sizing: border-box;
}

/* Transitions */
.mazda-quiz-step {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading State */
.mazda-quiz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
}

.mazda-quiz-loading p {
    margin-top: 20px;
    color: #666;
    font-weight: 500;
}

/* Welcome Screen */
.mq-welcome-title {
    font-size: 2.5rem;
    color: #2271b1;
    margin-bottom: 10px;
    font-weight: 800;
    text-align: center;
}

.mq-welcome-desc {
    text-align: center;
    color: #363636;
    margin-bottom: 30px;
    font-size: 1.4rem;
}

.mq-welcome-count {
    color: #555;
    font-size: 13px;
    text-align: center;
    margin-bottom: 20px;
}

.mq-form-group {
    margin-bottom: 20px;
}

.mq-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.mq-field-note {
    margin-top: 8px;
    font-size: var(--mq-input-note-font-size, 14px);
    line-height: 1.5;
    color: #5f6472;
}

.mq-error-msg {
    display: none;
    margin: 14px 0 4px;
    padding: 12px 14px;
    border-left: 4px solid #d63638;
    border-radius: 10px;
    background: #fcf0f1;
    color: #a61b1b;
    font-size: 0.95rem;
    font-weight: 600;
}

.mq-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5ee;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.mq-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.1);
}

/* Progress Bar */
.mq-progress-container {
    margin-bottom: 40px;
}

.mq-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mq-progress-bar-bg {
    height: 8px;
    background: #f0f2f7;
    border-radius: 4px;
    overflow: hidden;
}

.mq-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #3399ff);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Section */
.mq-question-text {
    font-size: 2.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    line-height: 1.4;
}

.mq-question-text p,
.mq-question-text ul,
.mq-question-text ol {
    margin: 0 0 12px;
}

.mq-question-text p:last-child,
.mq-question-text ul:last-child,
.mq-question-text ol:last-child {
    margin-bottom: 0;
}

/* Options */
.mq-options-list {
    display: grid;
    gap: 15px;
    margin-bottom: 35px;
}

.mq-location-selectors,
.mq-location-manual {
    display: grid;
    gap: 14px;
}

.mazda-quiz-container .select2-container {
    width: 100% !important;
}

.mazda-quiz-container .select2-container .select2-selection--single {
    min-height: 56px;
    border-radius: 12px;
    border: 2px solid #e1e5ee;
    display: flex;
    align-items: center;
}

.mazda-quiz-container .select2-container .select2-selection__rendered {
    line-height: 52px;
    padding-left: 18px;
    color: #333;
}

.mazda-quiz-container .select2-container .select2-selection__arrow {
    height: 52px;
}

.mq-option-item {
    position: relative;
    cursor: pointer;
}

.mq-option-item input {
    position: absolute;
    opacity: 0;
}

.mq-option-label {
    display: block;
    padding: 18px 25px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-weight: 500;
    transition: all 0.25s ease;
    color: #4a5568;
    position: relative;
    padding-right: 58px;
}

.mq-option-item:hover .mq-option-label {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.mq-option-item input:checked + .mq-option-label {
    background: linear-gradient(135deg, #0057b8 0%, #3f97ff 100%);
    border: 2px solid #0057b8;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.16), 0 12px 26px rgba(0, 87, 184, 0.22);
    transform: translateY(-1px);
}

.mq-option-item input:checked + .mq-option-label,
.mq-option-item input:checked + .mq-option-label * {
    color: #ffffff;
}

.mq-option-item input:checked + .mq-option-label::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0057b8;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.95), 0 0 0 8px rgba(0, 87, 184, 0.2);
    transform: translateY(-50%);
}

.mq-option-item:hover input:checked + .mq-option-label {
    border-color: #00418a;
    box-shadow: 0 0 0 4px rgba(0, 87, 184, 0.2), 0 14px 28px rgba(0, 87, 184, 0.26);
}

/* Navigation */
.mq-nav-btns {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

.mq-btn {
    padding: 18px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mq-btn-primary {
    background: #2271b1;
    color: white;
}

.mq-btn-primary:hover {
    background: #1a5a8e;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(34, 113, 177, 0.3);
}

.mq-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.mq-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.mq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Screen */
.mq-results-card {
    text-align: center;
    padding: 20px 0;
}

.mq-results-heading {
    margin: 0 0 24px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
}

.mq-results-message {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.mq-results-actions {
    margin-top: 24px;
}

.mq-results-restart {
    margin: 18px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.mq-results-restart a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mq-results-restart a:hover {
    color: #111827;
}

.mq-score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2271b1, #00d2ff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    box-shadow: 0 10px 25px rgba(0,210,255,0.3);
}

.mq-score-val {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}

.mq-score-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 5px;
}

.mq-certificate-wrap {
    background: #fdf2f2;
    border: 2px dashed #fecaca;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.mq-certificate-wrap h3 {
    margin-top: 0;
    color: #991b1b;
}

/* Animations */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .mazda-quiz-container {
        padding: 25px;
        margin: 20px 10px;
    }
    .mq-progress-container {
        margin-bottom: 24px;
    }
    .mq-welcome-title {
        font-size: 1.8rem;
    }
    .mq-question-text {
        font-size: var(--mq-mobile-question-font-size, 32px);
        line-height: 1.25;
        margin-bottom: 22px;
    }
    .mq-option-label {
        font-size: var(--mq-mobile-answer-font-size, 16px);
        line-height: 1.45;
        padding: 14px 44px 14px 16px;
    }
    .mq-option-item input:checked + .mq-option-label::after {
        right: 16px;
        width: 14px;
        height: 14px;
    }
    .mq-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    .mq-nav-btns {
        flex-direction: column-reverse;
    }
}
