/* CBT 1회차 이론 시뮬레이터 무료체험 레이어 */
.est-dialog {
    width: min(980px, calc(100vw - 32px));
    max-width: none;
    height: min(600px, calc(100vh - 32px));
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
}

.est-dialog::backdrop { background: rgba(25, 31, 40, .42); }
.est-dialog__panel, .est-dialog__frame { width: 100%; height: 100%; }
.est-dialog__frame { display: block; border: 0; background: transparent; }
.est-dialog-open { overflow: hidden; }

html:has(.trial-simulator-frame),
body.trial-simulator-frame { width: 100%; height: 100%; margin: 0; overflow: hidden; }

.trial-simulator-frame {
    color: #1f242b;
    background: transparent;
    font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
}

.trial-simulator-frame * { box-sizing: border-box; }

.trial-simulator-frame .est-frame {
    position: relative;
    height: 100%;
    padding: 22px 18px 18px;
    overflow: hidden;
    border: 3px solid #343a40;
    background: #f5f7fa;
    box-shadow: 0 14px 40px rgba(20, 27, 36, .22);
}

.trial-simulator-frame .est-header {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
}

.trial-simulator-frame .est-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.05em;
}

.trial-simulator-frame .est-header h1 span {
    display: inline-grid;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    place-items: center;
    border: 2px solid #23282e;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
}

.trial-simulator-frame .est-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    color: #7b8086;
    background: transparent;
    font-size: 34px;
    font-weight: 200;
    line-height: 1;
    cursor: pointer;
}

.trial-simulator-frame .est-filters {
    position: absolute;
    top: 16px;
    right: 62px;
    display: flex;
    gap: 7px;
}

.trial-simulator-frame .est-filters button {
    min-width: 72px;
    height: 37px;
    padding: 0 15px;
    border: 1px solid #ff6b00;
    border-radius: 9px;
    color: #ec6500;
    background: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.trial-simulator-frame .est-filters button.is-active {
    color: #fff;
    background: #ff6b00;
}

.trial-simulator-frame .est-trial-note {
    margin: 6px 0 10px;
    color: #6b727b;
    font-size: 12px;
}

.trial-simulator-frame .est-list {
    display: grid;
    height: calc(100% - 76px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 10px;
    overflow-y: auto;
    scrollbar-color: #a6aaae transparent;
    scrollbar-width: thin;
}

.trial-simulator-frame .est-card {
    display: grid;
    min-height: 112px;
    padding: 16px 18px;
    grid-template-columns: 46px minmax(0, 1fr) 125px;
    gap: 13px;
    align-items: center;
    border: 1px solid #d9dde2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(24, 32, 42, .12);
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.trial-simulator-frame .est-card:hover {
    border-color: #b9d5ff;
    box-shadow: 0 5px 14px rgba(33, 111, 222, .14);
    transform: translateY(-1px);
}

.trial-simulator-frame .est-card__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #1777ed;
    background: #eaf3ff;
    font-size: 25px;
    font-weight: 900;
}

.trial-simulator-frame .est-card__content { min-width: 0; }

.trial-simulator-frame .est-card h2 {
    margin: 0 0 5px;
    overflow: hidden;
    color: #0055bd;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trial-simulator-frame .est-card p {
    display: -webkit-box;
    max-height: 36px;
    margin: 0;
    overflow: hidden;
    color: #3e444b;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.trial-simulator-frame .est-card__actions {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.trial-simulator-frame .est-card__badges { display: flex; gap: 6px; }

.trial-simulator-frame .est-badge {
    max-width: 70px;
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    color: #333a42;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trial-simulator-frame .est-badge--primary {
    border-color: #e8f2ff;
    color: #0f6fe8;
    background: #eef6ff;
}

.trial-simulator-frame .est-card__start {
    padding: 4px 0;
    border: 0;
    color: #2385ef;
    background: transparent;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.trial-simulator-frame .est-card__start b {
    margin-left: 8px;
    color: #92979d;
    font-size: 22px;
    font-weight: 400;
    vertical-align: -2px;
}

.trial-simulator-frame .est-status {
    grid-column: 1 / -1;
    margin: auto;
    color: #6b727b;
    text-align: center;
}

.trial-simulator-frame .est-status--error { color: #bc3a3a; }

.trial-simulator-frame .est-player {
    position: absolute;
    z-index: 5;
    inset: 0;
    background: #fff;
}

.trial-simulator-frame .est-player[hidden] { display: none; }

.trial-simulator-frame .est-player__bar {
    display: grid;
    height: 52px;
    padding: 0 12px;
    grid-template-columns: 112px minmax(0, 1fr) 42px;
    align-items: center;
    border-bottom: 1px solid #dfe3e8;
    background: #f7f9fc;
}

.trial-simulator-frame .est-player__bar button {
    border: 0;
    color: #176fd3;
    background: transparent;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.trial-simulator-frame .est-player__bar button:last-child {
    color: #6d737a;
    font-size: 29px;
    font-weight: 300;
}

.trial-simulator-frame .est-player__bar strong {
    overflow: hidden;
    font-size: 16px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trial-simulator-frame .est-player iframe {
    display: block;
    width: 100%;
    height: calc(100% - 52px);
    border: 0;
    background: #fff;
}

@media (max-width: 760px) {
    .est-dialog { width: 100vw; height: 100dvh; }

    .trial-simulator-frame .est-frame {
        height: 100dvh;
        padding: 15px 12px calc(12px + env(safe-area-inset-bottom));
        border: 0;
    }

    .trial-simulator-frame .est-header h1 { font-size: 19px; }

    .trial-simulator-frame .est-filters {
        position: static;
        margin: 7px 0;
        overflow-x: auto;
    }

    .trial-simulator-frame .est-filters button { flex: 0 0 auto; min-width: 68px; }
    .trial-simulator-frame .est-trial-note { margin: 4px 0 8px; }

    .trial-simulator-frame .est-list {
        height: calc(100dvh - 132px);
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(112px, auto);
    }

    .trial-simulator-frame .est-card {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 14px;
    }

    .trial-simulator-frame .est-card__actions {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
    }
}
