/* Public test detail (/testler/{slug}): aligned with the home page design system. */

.mp-test-hero {
    position: relative;
    background: linear-gradient(140deg, #0f6b5f 0%, #0b5f55 52%, #0a564d 100%);
    color: var(--mp-surface-on-brand, #fff);
    padding: 48px 0 104px;
    overflow: hidden;
    isolation: isolate;
}

.mp-test-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(840px 520px at 70% 30%, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(720px 520px at 20% 20%, rgba(0, 0, 0, .14) 0%, rgba(0, 0, 0, 0) 58%);
}

.mp-test-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    font-weight: 800;
}

.mp-test-hero__title {
    margin: 0 0 14px;
    color: inherit;
    font-weight: 900;
    font-size: clamp(32px, 3.2vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.mp-test-hero__text {
    max-width: 720px;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: .9;
}

.mp-test-hero__text p {
    margin: 0 0 0.6rem;
    color: inherit;
}

.mp-test-hero__text p:last-child {
    margin-bottom: 0;
}

.mp-test-hero__text em,
.mp-test-hero__text i {
    opacity: .85;
}

.mp-test-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.mp-test-hero__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f6b5f;
    font-size: 0.82rem;
    font-weight: 800;
}

.mp-test-section {
    padding: 0 0 64px;
    background: #f5f7f9;
}

.mp-test-card {
    position: relative;
    max-width: 720px;
    margin: -72px auto 0;
    padding: 28px 28px 24px;
    border-radius: 16px;
    border: 1px solid #e8edf2;
    background: var(--mp-surface, #fff);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.mp-test-progress {
    margin-bottom: 22px;
}

.mp-test-progress__label {
    margin-bottom: 8px;
    color: #5e6278;
    font-size: 0.82rem;
    font-weight: 700;
}

.mp-test-progress__track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf2;
}

.mp-test-progress__bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #0f6b5f;
    transition: width 0.3s ease;
}

.mp-test-question {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.mp-test-question[hidden] {
    display: none;
}

.mp-test-question__title {
    float: none;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    color: #181c32;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
}

.mp-test-question__title p {
    margin: 0;
}

.mp-test-options {
    display: grid;
    gap: 10px;
}

.mp-test-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e1e6ec;
    background: #fff;
    color: #181c32;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mp-test-option:hover {
    border-color: rgba(15, 107, 95, 0.45);
    background: rgba(15, 107, 95, 0.03);
}

.mp-test-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mp-test-option__mark {
    position: relative;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #c4ccd6;
    background: #fff;
    transition: border-color 0.15s ease;
}

.mp-test-option__text {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.mp-test-option__text p {
    margin: 0;
}

.mp-test-option:has(.mp-test-option__input:checked) {
    border-color: #0f6b5f;
    background: rgba(15, 107, 95, 0.06);
    box-shadow: 0 0 0 1px #0f6b5f inset;
}

.mp-test-option__input:checked + .mp-test-option__mark {
    border-color: #0f6b5f;
}

.mp-test-option__input:checked + .mp-test-option__mark::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #0f6b5f;
}

.mp-test-option__input:focus-visible + .mp-test-option__mark {
    outline: 2px solid #0f6b5f;
    outline-offset: 2px;
}

.mp-test-card[aria-busy="true"] .mp-test-options {
    pointer-events: none;
}

.mp-test-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eef1f5;
}

.mp-test-nav__end {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-test-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mp-test-nav__btn[hidden] {
    display: none;
}

.mp-test-nav__btn--ghost {
    border-color: #e1e6ec;
    background: #fff;
    color: #181c32;
}

.mp-test-nav__btn--ghost:hover:not(:disabled) {
    border-color: rgba(15, 107, 95, 0.45);
    color: #0f6b5f;
}

.mp-test-nav__btn--link {
    background: transparent;
    color: #5e6278;
}

.mp-test-nav__btn--link:hover,
.mp-test-nav__btn--link:focus-visible {
    color: #0f6b5f;
}

.mp-test-nav__btn--primary {
    background: #0f6b5f;
    color: #fff;
}

.mp-test-nav__btn--primary:hover:not(:disabled),
.mp-test-nav__btn--primary:focus-visible {
    background: #0b5f55;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 107, 95, 0.25);
}

.mp-test-nav__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mp-test-loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.92);
}

.mp-test-loader[hidden] {
    display: none;
}

.mp-test-loader__brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.mp-test-loader__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(15, 107, 95, 0.14);
    border-top-color: #0f6b5f;
    border-right-color: rgba(19, 170, 101, 0.55);
    animation: mpTestLoaderSpin 0.95s linear infinite;
}

.mp-test-loader__icon {
    position: relative;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.mp-test-loader__text {
    color: #5e6278;
    font-size: 0.925rem;
    font-weight: 700;
}

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

.mp-test-leave-modal__text {
    color: #5e6278;
    font-size: 0.95rem;
    line-height: 1.55;
}

@media (max-width: 767.98px) {
    .mp-test-hero {
        padding: 36px 0 88px;
    }

    .mp-test-section {
        padding-bottom: 48px;
    }

    .mp-test-card {
        margin-top: -64px;
        padding: 20px 16px 18px;
    }

    .mp-test-question__title {
        font-size: 1.05rem;
    }

    .mp-test-option {
        padding: 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp-test-progress__bar,
    .mp-test-loader__ring {
        transition: none;
        animation-duration: 2.5s;
    }
}
