/* 공용 이벤트 참여 팝업 (inc/event-join-popup.html) — 레거시 pop_apply 레이아웃 대응 */
.ejp-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
.ejp-popup[hidden] { display: none; }
.ejp-popup__dim {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 28, 0.6);
}
.ejp-popup__box {
    position: relative;
    width: min(520px, calc(100% - 40px));
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 40px 36px 34px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    text-align: left;
    line-height: 1.5;
}
.ejp-popup__box--alert {
    width: min(420px, calc(100% - 40px));
    padding: 44px 32px 32px;
    text-align: center;
}
.ejp-popup__tit {
    margin: 0 0 14px;
    padding-right: 28px;   /* 닫기(X) 버튼과 겹침 방지 */
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1c2626;
}
.ejp-popup__box--alert .ejp-popup__tit {
    margin-bottom: 10px;
    padding-right: 0;
}
.ejp-popup__desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6a7676;
}
.ejp-popup__notice {
    margin: 0 0 26px;
    padding: 14px 18px;
    list-style: none;
    background: #f6f9f9;
    border-radius: 12px;
    font-size: 12.5px;
    color: #8a9494;
    line-height: 1.7;
}
.ejp-popup__notice li {
    position: relative;
    padding-left: 12px;
}
.ejp-popup__notice li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c2cccc;
}
.ejp-popup__list {
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}
.ejp-popup__list li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
}
.ejp-popup__list li:last-child { margin-bottom: 0; }
.ejp-popup__label {
    flex: 0 0 74px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: #3c4646;
}
.ejp-popup__list input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e2e8e8;
    border-radius: 10px;
    background: #f5f8f8;
    font-size: 15px;
    color: #1c2626;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.ejp-popup__list input::placeholder { color: #aab4b4; }
.ejp-popup__list input:read-write { background: #fff; }
.ejp-popup__list input:read-write:focus {
    outline: none;
    border-color: #2eb6a8;
}
.ejp-popup__edit {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: #3c4646;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.ejp-popup__edit:hover { background: #2a3232; }
.ejp-popup__sms {
    margin: 0 0 4px;
    padding: 18px;
    background: #f9fbfb;
    border: 1px solid #eef2f2;
    border-radius: 14px;
}
.ejp-popup__agree {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: #2a3434;
}
.ejp-popup__agree input {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: #2eb6a8;
    cursor: pointer;
}
.ejp-popup__agree label { cursor: pointer; }
.ejp-popup__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 12.5px;
    color: #5c6868;
}
.ejp-popup__table th,
.ejp-popup__table td {
    padding: 10px 12px;
    border: 1px solid #e8eeee;
    text-align: left;
    font-weight: 400;
    line-height: 1.55;
}
.ejp-popup__table th {
    background: #f2f6f6;
    font-weight: 600;
    color: #3c4646;
    white-space: nowrap;
}
.ejp-popup__caution {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: #a5b0b0;
}
.ejp-popup__help {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8a9494;
}
.ejp-popup__help--error { color: #e05b4d; }
.ejp-popup__search {
    display: flex;
    gap: 10px;
    margin: 0 0 16px;
}
.ejp-popup__search input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e2e8e8;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
}
.ejp-popup__search input::placeholder { color: #aab4b4; }
.ejp-popup__search input:focus {
    outline: none;
    border-color: #2eb6a8;
}
.ejp-popup__result {
    min-height: 200px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e8eeee;
    border-radius: 12px;
}
.ejp-popup__table--school { table-layout: fixed; }
.ejp-popup__table--school th,
.ejp-popup__table--school td {
    border: 0;
    border-bottom: 1px solid #eef2f2;
    padding: 12px 14px;
}
.ejp-popup__table--school thead th {
    position: sticky;
    top: 0;
    background: #f5f8f8;
    font-size: 12.5px;
}
.ejp-popup__table--school tbody tr { cursor: pointer; }
.ejp-popup__table--school tbody tr:hover td { background: #f2faf9; }
.ejp-popup__table--school td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
    color: #2a3434;
}
/* 검색 전 안내·결과 없음 — 테이블 중앙 멘트 */
.ejp-popup__empty td {
    padding: 72px 0;
    border-bottom: 0;
    text-align: center;
    font-size: 13.5px;
    color: #a5b0b0;
    cursor: default;
}
.ejp-popup__empty:hover td { background: transparent; }
.ejp-popup__btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}
.ejp-btn {
    min-width: 140px;
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 26px;
    background: #2eb6a8;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.ejp-btn:hover { background: #279e92; }
.ejp-btn:disabled { opacity: 0.5; cursor: default; }
.ejp-btn--sub {
    background: #e8eceb;
    color: #6a7474;
}
.ejp-btn--sub:hover { background: #dde2e1; }
.ejp-btn--search {
    min-width: 76px;
    height: 48px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 14px;
}
.ejp-popup__close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #b0b8b8;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.ejp-popup__close:hover {
    color: #3c4646;
    background: #f2f6f6;
}
.ejp-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.ejp-popup-open { overflow: hidden; }
@media (max-width: 750px) {
    .ejp-popup__box { padding: 30px 22px 26px; border-radius: 20px; }
    .ejp-popup__tit { font-size: 17px; }
    .ejp-popup__box--alert .ejp-popup__tit { font-size: 17px; }
    .ejp-popup__notice { padding: 12px 14px; margin-bottom: 20px; }
    .ejp-popup__list li { gap: 10px; margin-bottom: 12px; }
    .ejp-popup__label { flex-basis: 68px; font-size: 13px; }
    .ejp-popup__list input, .ejp-popup__edit, .ejp-popup__search input { height: 44px; }
    /* 16px 미만이면 iOS Safari가 focus 시 페이지를 자동 확대 -> 가로 스크롤 발생 */
    .ejp-popup__list input, .ejp-popup__search input { font-size: 16px; }
    .ejp-popup__sms { padding: 14px; }
    .ejp-popup__empty td { padding: 56px 0; }
    .ejp-btn { min-width: 120px; height: 48px; font-size: 14px; }
    .ejp-btn--search { min-width: 68px; height: 44px; }
    .ejp-popup__close { top: 16px; right: 16px; }
}
