/* LinguaPro Student Learning Plan / Teacher Questionnaire modal */
.lp-plan-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lp-plan-modal.is-open { display: flex; }
.lp-plan-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 24, 46, 0.58);
    backdrop-filter: blur(3px);
}
.lp-plan-dialog {
    position: relative;
    width: min(860px, 100%);
    max-height: 90vh;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 32, 74, 0.28), 0 8px 24px rgba(7, 94, 149, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.lp-plan-progress {
    padding: 14px 28px;
    background: linear-gradient(90deg, #f4fbfc 0%, #eefafa 55%, #eaf6fb 100%);
    border-bottom: 1px solid #dbeef2;
    font-weight: 700;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
    color: #075e95;
}
.lp-plan-stage {
    padding: 22px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    perspective: 1200px;
    background: radial-gradient(100% 120% at 100% 0%, #e9f8fb 0%, #f7fcfd 42%, #ffffff 76%);
}
.lp-plan-card {
    position: relative;
    min-width: 0;
    min-height: clamp(360px, 58vh, 500px);
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}
.lp-plan-card.is-flipping { transform: rotateY(180deg); }
.lp-plan-face {
    position: absolute;
    inset: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    backface-visibility: hidden;
    background: linear-gradient(155deg, #ffffff 0%, #fcffff 55%, #f3fbfb 100%);
    border-radius: 22px;
    box-shadow: inset 0 0 0 1px #e6f2f4;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #b9dde1 transparent;
}
.lp-plan-face::-webkit-scrollbar { width: 8px; }
.lp-plan-face::-webkit-scrollbar-track { background: transparent; }
.lp-plan-face::-webkit-scrollbar-thumb {
    background: #c4e3e6;
    border-radius: 999px;
}
.lp-plan-face--back { transform: rotateY(180deg); }

/* Two-column question card: content on the left, topic artwork on the right. */
.lp-plan-card-inner {
    --lp-accent: #0d9488;
    --lp-accent-2: #14b8a6;
    --lp-accent-soft: #e7f8f5;
    --lp-accent-pale: #f3fdfb;
    --lp-accent-shadow: rgba(13, 148, 136, 0.28);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
    align-items: start;
    gap: 30px;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    padding: 26px 28px 28px;
}
.lp-plan-theme--teal {
    --lp-accent: #0d9488;
    --lp-accent-2: #14b8a6;
    --lp-accent-soft: #e7f8f5;
    --lp-accent-pale: #f3fdfb;
    --lp-accent-shadow: rgba(13, 148, 136, 0.28);
}
.lp-plan-theme--cyan {
    --lp-accent: #00add5;
    --lp-accent-2: #5ce1e6;
    --lp-accent-soft: #e6f8fd;
    --lp-accent-pale: #f2fcff;
    --lp-accent-shadow: rgba(0, 173, 213, 0.28);
}
.lp-plan-theme--ocean {
    --lp-accent: #075e95;
    --lp-accent-2: #0879ff;
    --lp-accent-soft: #e8f2fb;
    --lp-accent-pale: #f4f9ff;
    --lp-accent-shadow: rgba(7, 94, 149, 0.28);
}
.lp-plan-theme--navy {
    --lp-accent: #00204a;
    --lp-accent-2: #075e95;
    --lp-accent-soft: #eaf0f8;
    --lp-accent-pale: #f6f8fc;
    --lp-accent-shadow: rgba(0, 32, 74, 0.28);
}
.lp-plan-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.lp-plan-question {
    font-size: clamp(1.3rem, 1.08rem + 0.45vw, 1.62rem);
    font-weight: 700;
    color: #00204a;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.lp-plan-question::after {
    content: "";
    display: block;
    width: 54px;
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lp-accent, #0d9488), var(--lp-accent-2, #14b8a6));
}
.lp-plan-desc {
    color: #53647c;
    font-size: 0.96rem;
    line-height: 1.55;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Every answer choice gets its own full-width row, on every screen size. */
.lp-plan-choices {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    width: 100%;
    min-width: 0;
}
.lp-plan-choices + .lp-plan-choices { margin-top: 12px; }
.lp-plan-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d7e9ed;
    background: rgba(255, 255, 255, 0.92);
    color: #00204a;
    border-radius: 14px;
    padding: 12px 15px;
    font-size: 0.95rem;
    line-height: 1.45;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.lp-plan-choice:hover {
    border-color: var(--lp-accent, #0d9488);
    background: #ffffff;
    box-shadow: 0 7px 18px -14px var(--lp-accent-shadow, rgba(13, 148, 136, 0.28));
}
.lp-plan-choice.is-selected,
.lp-plan-choice:has(.lp-plan-choice__input:checked) {
    background: linear-gradient(135deg, var(--lp-accent-soft, #e7f8f5), #ffffff 92%);
    border-color: var(--lp-accent, #0d9488);
    box-shadow: 0 9px 24px -20px var(--lp-accent-shadow, rgba(13, 148, 136, 0.28));
}
.lp-plan-choice__input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    border: 2px solid #bfdfe4;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.lp-plan-choice__input::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    transform: scale(0);
    transition: transform 0.14s ease;
}
.lp-plan-choice__input:checked {
    background: var(--lp-accent, #0d9488);
    border-color: var(--lp-accent, #0d9488);
    box-shadow: 0 0 0 4px var(--lp-accent-soft, #e7f8f5);
}
.lp-plan-choice__input:checked::before {
    transform: scale(1);
}
.lp-plan-choice__input:focus-visible {
    outline: 3px solid var(--lp-accent-soft, #e7f8f5);
    outline-offset: 2px;
}
.lp-plan-choice__text {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    text-align: left;
}
.lp-plan-extra {
    margin-top: 16px;
}
.lp-plan-extra select,
.lp-plan-extra input,
.lp-plan-extra textarea {
    box-sizing: border-box;
    max-width: 100%;
    color: #00204a;
    background: #ffffff;
}
.lp-plan-extra textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 12px;
    border: 1px solid #cfe6ea;
    padding: 10px;
}
.lp-plan-extra select:focus,
.lp-plan-extra input:focus,
.lp-plan-extra textarea:focus {
    outline: 2px solid var(--lp-accent, #0d9488);
    outline-offset: 1px;
    border-color: var(--lp-accent, #0d9488);
}

/* Artwork column: the actual LinguaPro LP favicon only. */
.lp-plan-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding-top: 4px;
}
.lp-plan-favicon {
    display: block;
    width: 128px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    filter: drop-shadow(0 16px 28px rgba(0, 32, 74, 0.18));
}

/* Full-size LinguaPro logo above the question. */
.lp-plan-card__brand {
    margin: 0 0 12px;
}
.lp-plan-logo {
    display: block;
    width: auto;
    height: 64px;
    max-width: 200px;
    object-fit: contain;
}

/* Teal footer accent and soft, modern controls. */
.lp-plan-footer {
    position: relative;
    padding: 18px 28px;
    border-top: 1px solid #dbeef2;
    background: linear-gradient(180deg, #ffffff 0%, #f5fcfc 100%);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.lp-plan-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 28px;
    right: 28px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0d9488 0%, #00add5 50%, #075e95 100%);
}
.lp-plan-btn {
    border: none;
    border-radius: 999px;
    padding: 11px 22px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.lp-plan-btn--primary {
    background: linear-gradient(135deg, #0d9488 0%, #00add5 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px -12px rgba(13, 148, 136, 0.55);
}
.lp-plan-btn--primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.lp-plan-btn--ghost {
    background: #eef8f8;
    color: #075e95;
    box-shadow: inset 0 0 0 1px #d8ecee;
}
.lp-plan-btn--ghost:hover { background: #e5f5f5; }
.lp-plan-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.lp-plan-btn:focus-visible {
    outline: 3px solid #5ce1e6;
    outline-offset: 2px;
}
.lp-plan-summary {
    padding: 28px;
}
.lp-plan-summary h3 {
    color: #00204a;
    margin: 0 0 14px;
    font-size: 1.35rem;
}
.lp-plan-summary ul { list-style: none; padding: 0; margin: 0 0 16px; }
.lp-plan-summary li {
    padding: 8px 0;
    border-bottom: 1px solid #eef6f7;
    color: #41536b;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.lp-plan-summary li strong { color: #00204a; }
.lp-plan-summary p { color: #5b6b80; line-height: 1.55; }

@media (max-width: 780px) {
    .lp-plan-card-inner {
        grid-template-columns: minmax(0, 1fr) 168px;
        gap: 22px;
        padding: 22px 22px 24px;
    }
    .lp-plan-favicon { width: 112px; }
    .lp-plan-logo { height: 52px; max-width: 180px; }
}
@media (max-width: 640px) {
    .lp-plan-dialog { border-radius: 22px; }
    .lp-plan-progress { padding: 13px 20px; }
    .lp-plan-stage { padding: 16px; }
    .lp-plan-card { min-height: clamp(340px, 56vh, 460px); }
    .lp-plan-card-inner {
        grid-template-columns: minmax(0, 1fr) 136px;
        gap: 18px;
        padding: 20px 18px 22px;
    }
    .lp-plan-visual { gap: 13px; }
    .lp-plan-favicon { width: 96px; }
    .lp-plan-logo { height: 48px; max-width: 160px; }
    .lp-plan-footer { padding: 16px 20px; }
    .lp-plan-footer::before { left: 20px; right: 20px; }
}
@media (max-width: 560px) {
    .lp-plan-card-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 18px 16px 20px;
    }
    .lp-plan-content { order: 2; }
    .lp-plan-visual {
        order: 1;
        position: static;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        padding: 0 2px 2px;
    }
    .lp-plan-visual__frame { display: none; }
    .lp-plan-favicon {
        order: 2;
        width: 72px;
    }
}
@media (max-width: 420px) {
    .lp-plan-dialog { max-height: 95vh; }
    .lp-plan-question { font-size: 1.22rem; }
    .lp-plan-desc { font-size: 0.92rem; }
    .lp-plan-choice {
        padding: 10px 12px;
        gap: 10px;
        font-size: 0.92rem;
    }
    .lp-plan-footer { padding: 14px 16px; }
    .lp-plan-footer::before { left: 16px; right: 16px; }
    .lp-plan-btn { padding: 10px 16px; font-size: 0.9rem; }
    .lp-plan-favicon { width: 64px; }
}
@media (max-width: 380px) {
    .lp-plan-choice {
        padding: 10px;
        gap: 8px;
        font-size: 0.9rem;
    }
    .lp-plan-choice__input {
        width: 17px;
        height: 17px;
    }
    .lp-plan-logo { height: 40px; max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-plan-card,
    .lp-plan-choice,
    .lp-plan-btn { transition: none; }
}
