/* MTD Quizzes — Quiz UI */

.mtdq-wrap {
    width: 100%;
    font-family: 'Nunito', 'Fredoka One', sans-serif;
}

/* Loading */
.mtdq-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}
.mtdq-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #dde8f5;
    border-top-color: #59b89a;
    border-radius: 50%;
    animation: mtdqSpin 0.7s linear infinite;
}
@keyframes mtdqSpin {
    to { transform: rotate(360deg); }
}

/* Progress bar — sits inside .mtdq-question-wrap at the top */
.mtdq-progress-bar-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #dde8f5;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.mtdq-progress-counter {
    position: absolute;
    top: 12px;
    right: 24px;
    display: flex;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}
.mtdq-counter-correct { color: #2e9e6e; }
.mtdq-counter-wrong   { color: #c94040; }

.mtdq-progress-bar {
    height: 100%;
    background: #59b89a;
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

/* Question wrap — card shared by start, quiz and result screens */
.mtdq-question-wrap {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #e0eaf4;
    border-radius: 12px;
    padding: 28px 24px 22px;
    box-shadow: 0 4px 18px rgba(93, 163, 218, 0.08);
    min-height: 397px;
    transition: min-height 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

/* Start screen — vult de volledige hoogte van de card en centreert verticaal */
.mtdq-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    flex: 1;
    margin-top: auto;
    margin-bottom: auto;
}

.mtdq-start-title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 2.0rem !important;
    color: #000000 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.2 !important;
}

.mtdq-start-stars {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.mtdq-start-star {
    font-size: 36px;
    line-height: 1;
    color: #c8d9e8;
}

.mtdq-start-star--on {
    color: #FFE066;
    filter: drop-shadow(0 1px 3px rgba(255, 212, 59, 0.35));
}

.mtdq-start-desc {
    font-size: 0.95rem;
    color: #000000;
    line-height: 1.5;
    margin: 0;
    max-width: 500px;
}

.mtdq-start-btn {
    padding: 11px 36px;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
    background: #59b89a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.mtdq-start-btn:hover  { background: #4aa688; }
.mtdq-start-btn:active { transform: scale(0.97); }

/* Quiz area */
.mtdq-quiz-area {
    width: 100%;
    text-align: center;
}

.mtdq-question {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2a3a;
    line-height: 1.4;
    margin-bottom: 22px;
}

/* Input row */
.mtdq-input-row,
.mtdq-star2-inputs-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.mtdq-answer-input {
    flex: 1;
    max-width: 130px;
    padding: 10px 14px;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 700;
    color: #000000;
    background: #f4f8fc;
    border: 2px solid #dde8f5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}
.mtdq-answer-input::placeholder {
    color: #aaaaaa;
    opacity: 1;
}
.mtdq-answer-input::-webkit-outer-spin-button,
.mtdq-answer-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mtdq-answer-input:focus {
    border-color: #59b89a;
}
.mtdq-answer-input.is-correct {
    border-color: #59b89a;
    background: #edfaf5;
}
.mtdq-answer-input.is-wrong {
    border-color: #e05252;
    background: #fff0f0;
    animation: mtdqShake 0.35s ease;
}
@keyframes mtdqShake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-6px); }
    75%       { transform: translateX(6px); }
}

.mtdq-check-btn {
    padding: 0 15px;
    font-size: 1.3rem;
    align-self: stretch;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
    background: #59b89a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
.mtdq-check-btn:hover {
    background: #4aa688;
}
.mtdq-check-btn:active {
    transform: scale(0.97);
}
.mtdq-check-btn:disabled {
    background: #b8d8ce;
    cursor: not-allowed;
}

/* Feedback */
.mtdq-feedback {
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 1.4em;
    margin-top: 5px;
    transition: opacity 0.2s;
}
.mtdq-feedback.correct {
    color: #2e9e6e;
}
.mtdq-feedback.wrong {
    color: #c94040;
}

/* Result screen */
.mtdq-result {
    text-align: center;
    padding: 36px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    margin-bottom: auto;
}
.mtdq-result-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 12px;
}
.mtdq-result-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a2a3a;
    margin-bottom: 8px;
}
.mtdq-result-sub {
    font-size: 1rem;
    color: #5a7a8a;
    margin-bottom: 24px;
}

.mtdq-result.is-fail {
    padding-top: 0;
    padding-bottom: 0;
}

.mtdq-result.is-fail .mtdq-result-sub {
    color: #000000;
    margin-bottom: 16px;
}

.mtdq-result.is-fail .mtdq-result-icon {
    margin-top: -12px;
    margin-bottom: 16px;
    line-height: 0.8;
}

.mtdq-retry-btn {
    padding: 0 20px;
    height: 48px;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
    background: #59b89a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
.mtdq-retry-btn:hover {
    background: #4aa688;
}
.mtdq-retry-btn:active {
    transform: scale(0.97);
}

.mtdq-confetti-hint {
    padding: 0 20px;
    height: 48px;
    font-size: 1.3rem;
    font-family: inherit;
    font-weight: 700;
    color: #ffffff;
    background: #59b89a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    display: block;
    margin: 0 auto;
}
.mtdq-confetti-hint:hover {
    background: #4aa688;
}

/* Tip bij fout antwoord */
.mtdq-tip {
    display: none;
    margin-top: 14px;
    padding: 12px 16px;
    background: #fff8f0;
    border: 1.5px solid #f5c97a;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #7a4a00;
    text-align: left;
}
.mtdq-tip.is-visible {
    display: block;
    animation: mtdqTipFadeIn 0.4s ease;
}
@keyframes mtdqTipFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.mtdq-tip strong {
    display: block;
    margin-top: 4px;
    font-size: 1.05rem;
    color: #5a3500;
    letter-spacing: 0.02em;
}

/* Pass result */
.mtdq-result.is-pass {
    padding-top: 0;
    padding-bottom: 0;
}

.mtdq-result.is-pass .mtdq-result-title {
    color: #59b89a;
}

.mtdq-result.is-pass .mtdq-result-sub {
    color: #000000;
    margin-bottom: 16px;
}

.mtdq-result.is-pass .mtdq-result-icon {
    margin-top: -12px;
    margin-bottom: 16px;
    line-height: 0.8;
}

/* Fail result */
.mtdq-result.is-fail .mtdq-result-title {
    color: #c94040;
}
