/* 프로그램 예약 — 리스트 페이지
   .playground-reservation 컨테이너와 .info-card-* 스타일은 /custom/playground/resv.css 를 공유합니다.
   여기서는 프로그램 전용 요소(.pg-prog-*) 만 정의합니다. */

.pg-prog-list { max-width: 1480px; margin: 0 auto; padding: 0 20px 80px; font-size: 17px; }
/* base.css 의 * { font-size:14px } 범용 규칙을 컨테이너 내부에서 상쇄 */
.pg-prog-list :where(*) { font-size: inherit; }

/* '내 신청 조회·취소' 링크 — playground resv.css 와 완전 동일 규칙.
   base.css 의 a:link/:hover{color:inherit} 및 *{color:#222} 를 모두 이기도록
   a.class + 모든 상태 pseudoclass 를 명시. 아이콘은 hover 상태까지 inherit 고정. */
.pg-prog-list .pg-resv-top-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 18px;
}
a.pg-resv-my-resv-link,
a.pg-resv-my-resv-link:link,
a.pg-resv-my-resv-link:visited,
a.pg-resv-my-resv-link:active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 25px;
    border-radius: 999px;
    background: #626262;
    border: 1px dashed #bbb;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
a.pg-resv-my-resv-link:hover,
a.pg-resv-my-resv-link:hover i {
    color: #fff;
}
a.pg-resv-my-resv-link:hover {
    background-color: var(--color-brand-red);
}
a.pg-resv-my-resv-link i {
    color: inherit;
    transition: color 0.15s;
}

/* 프로그램 없음 — 안내 블록 */
.pg-prog-empty-state {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    margin: 0 0 40px;
    border: 1.5px dashed #cfcfcf;
    border-radius: 20px;
    background: #fafafa;
}
.pg-prog-empty-state__icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #bbb;
    margin: 0 0 18px;
}
.pg-prog-empty-state__title {
    font-size: 20px;
    font-weight: 700;
    color: #444;
    margin: 0 0 6px;
}
.pg-prog-empty-state__desc {
    font-size: 16px;
    color: #888;
    margin: 0;
}

/* 카드 그리드 */
.pg-prog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 0 0 40px;
}

.pg-prog-card {
    display: flex;
    gap: 22px;
    align-items: stretch;
    padding: 20px;
    border: 1.5px dashed #cfcfcf;
    border-radius: 20px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-prog-card:hover {
    border-color: var(--color-brand-red, #ff7268);
    box-shadow: 0 6px 18px rgba(232, 90, 90, 0.08);
}
/*
.pg-prog-card.is-closed { opacity: 0.75; }
.pg-prog-card.is-closed:hover { border-color: #cfcfcf; box-shadow: none; }
*/

.pg-prog-card__thumb {
    flex: 0 0 200px;
    width: 200px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #f2f2f2;
    display: block;
}
.pg-prog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pg-prog-card.is-closed .pg-prog-card__thumb img { filter: grayscale(0.4); }

.pg-prog-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 6px 4px 4px;
}
.pg-prog-card__category {
    font-size: 17px;
    font-weight: 500;
    color: #555;
    margin: 0 0 8px;
}
.pg-prog-card__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-brand-red, #ff7268);
    line-height: 1.3;
    margin: 0 0 18px;
    word-break: keep-all;
}

.pg-prog-card__meta {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pg-prog-card__meta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    color: #555;
    line-height: 1.45;
}
.pg-prog-card__meta li i {
    flex: 0 0 18px;
    width: 18px;
    text-align: center;
    font-size: 16px;
    color: #888;
    margin-top: 2px;
}
.pg-prog-card__meta li span { flex: 1; min-width: 0; word-break: keep-all; }

.pg-prog-card__btn {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 11px 28px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
a.pg-prog-card__btn--open,
a.pg-prog-card__btn--open:link,
a.pg-prog-card__btn--open:visited {
    background: var(--color-brand-red, #ff7268);
    color: #fff;
}
a.pg-prog-card__btn--open:hover { background: #ff5a50; color: #fff; }

.pg-prog-card__btn--closed {
    background: #9a9a9a;
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}

a.pg-prog-card__btn.pg-prog-card__btn--detail,
a.pg-prog-card__btn.pg-prog-card__btn--detail:link,
a.pg-prog-card__btn.pg-prog-card__btn--detail:visited {
    background: #fff;
    color: var(--color-brand-red, #ff7268);
    border: 1px solid var(--color-brand-red, #ff7268);
    text-decoration: none;
}
a.pg-prog-card__btn.pg-prog-card__btn--detail:hover {
    background: var(--color-brand-red, #ff7268);
    color: #fff;
}

.pg-prog-card__btn-row {
    margin-top: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}
.pg-prog-card__btn-row .pg-prog-card__btn {
    margin-top: 0;
    align-self: auto;
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 16px;
}

a.pg-prog-card__btn.pg-prog-card__btn--admin-test,
a.pg-prog-card__btn.pg-prog-card__btn--admin-test:link,
a.pg-prog-card__btn.pg-prog-card__btn--admin-test:visited {
    background: #b6e5c8;
    color: #1b6e3a;
    text-decoration: none;
}
a.pg-prog-card__btn.pg-prog-card__btn--admin-test:hover {
    background: #95d9b1;
    color: #134e2a;
}
a.pg-prog-card__btn.pg-prog-card__btn--admin-test .fa-solid {
    margin-right: 6px;
    color: #f57f17;
}

#pgProgAdminTest,
#pgProgAdminTest:link,
#pgProgAdminTest:visited {
    background: #b6e5c8;
    color: #1b6e3a;
    border-color: transparent;
}
#pgProgAdminTest:hover,
#pgProgAdminTest:focus {
    background: #95d9b1;
    color: #134e2a;
    border-color: transparent;
}
#pgProgAdminTest .fa-solid {
    color: #f57f17;
    margin-right: 6px;
}

.swal2-popup .swal2-html-container {
    line-height: 1.7;
}
.swal2-popup .swal2-html-container strong,
.swal2-popup .swal2-html-container b {
    font-size: inherit;
    line-height: inherit;
    vertical-align: baseline;
    display: inline;
    margin: 0;
    padding: 0;
}
.swal2-popup .swal2-html-container div + div {
    margin-top: 4px;
}

/* 페이지네이션 */
.pg-prog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0 0 50px;
}
.pg-prog-pagination__btn,
.pg-prog-pagination__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #666;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pg-prog-pagination__btn:hover,
.pg-prog-pagination__num:hover {
    background: #f7f7f7;
    color: #222;
}
.pg-prog-pagination__num.is-active {
    background: #222;
    color: #fff;
    border-color: #222;
}

/* 안내 카드 래퍼 — playground resv.css 의 .info-card-wrapper / .info-card / .info-character / .info-list 스타일을 그대로 상속
   id 셀렉터만 #progInfoList 로 재사용 */
.pg-prog-list .info-card-wrapper {
    background: #FFF7FA;
    border: 1.5px dashed #999898;
    border-radius: 32px;
    margin-top: 50px;
}
.pg-prog-list .info-card {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 30px;
}
.pg-prog-list .info-character {
       flex-shrink: 0;
    width: 450px;
    height: 200px;
    position: relative;
    max-width: 100%;
}
.pg-prog-list .info-character img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pg-prog-list .info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px 0 0;
    margin: 0;
}
.pg-prog-list .info-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 18px;
    line-height: 1.8;
    color: #343434;
}
.pg-prog-list #progInfoList li::before {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 23px;
    height: 23px;
    background: url('/asset/images/icon_caution.png') no-repeat center / contain;
    margin-top: 2px;
}

/* 반응형 */
@media (max-width: 1100px) {
    .pg-prog-grid { grid-template-columns: 1fr; gap: 18px; }
    .pg-prog-card__thumb { flex: 0 0 180px; width: 180px; }
    .pg-prog-card__title { font-size: 24px; }
}
@media (max-width: 720px) {
    .pg-prog-list { padding: 0 14px 60px; }
    .pg-prog-card { flex-direction: column; padding: 16px; gap: 16px; }
    .pg-prog-card__thumb { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 10; }
    .pg-prog-card__title { font-size: 22px; margin: 0 0 12px; }
    .pg-prog-card__btn { width: 100%; min-width: 0; }
    .pg-prog-pagination__btn,
    .pg-prog-pagination__num { width: 32px; height: 32px; font-size: 15px; }
    .pg-prog-list .info-card { flex-direction: column; gap: 16px; }
    .pg-prog-list .info-character { width: 180px; height: 80px; }
    .pg-prog-list .info-card-wrapper { padding: 22px 18px; border-radius: 22px; }
}

/* =================================================================
   상세 / 신청 플로우 (program_detail / agree / input / complete)
   playground/resv.css 의 .pg-resv-* 클래스를 같이 사용. 여기는 program 전용 추가만.
   ================================================================= */
.pg-prog-detail .pg-prog-detail__head {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin: 0 0 24px;
}
.pg-prog-detail .pg-prog-detail__thumb {
    flex: 0 0 220px;
    width: 220px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #f2f2f2;
}
.pg-prog-detail .pg-prog-detail__thumb img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.pg-prog-detail .pg-prog-detail__info { flex: 1; min-width: 0; padding: 4px 0 0; }
.pg-prog-detail .pg-prog-detail__category { font-size: 16px; color: #555; margin: 0 0 6px; }
.pg-prog-detail .pg-prog-detail__title {
    font-size: 26px; font-weight: 700;
    color: var(--color-brand-red, #ff7268);
    line-height: 1.3; margin: 0 0 14px; word-break: keep-all;
}
.pg-prog-detail .pg-prog-detail__meta {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.pg-prog-detail .pg-prog-detail__meta li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 16px; color: #555; line-height: 1.45;
}
.pg-prog-detail .pg-prog-detail__meta li i { width: 18px; text-align: center; color: #888; margin-top: 3px; }
.pg-prog-detail .pg-prog-detail__heading {
    font-size: 17px; font-weight: 700; color: #333;
    margin: 24px 0 12px; padding: 0 0 10px;
    border-bottom: 1px dashed #ddd;
}
.pg-prog-detail .pg-prog-detail__heading .req { color: #e85a5a; margin-left: 4px; }
.pg-prog-detail .pg-prog-detail__desc {
    font-size: 15px; line-height: 1.7; color: #444;
    padding: 18px 20px;
    word-break: keep-all;
}

/* 상세 페이지 상단 헤더(썸네일·메타) 숨김 */
.pg-prog-detail .pg-prog-detail__head { display: none; }

/* 반 선택 카드 리스트 — 가로 그리드(반응형). 좁은 뷰포트에서 자동 줄바꿈.
   auto-fit: 카드 수에 맞춰 가용 공간을 균등 분배해 우측 빈 트랙이 남지 않도록. */
.pg-prog-class-list {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}
.pg-prog-class-wrap { position: relative; }
.pg-prog-class-wrap.is-locked .pg-prog-class-list {
    filter: grayscale(0.7) blur(2px);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}
.pg-prog-class-item { margin: 0; }
.pg-prog-class-label {
    display: block; cursor: pointer;
}
.pg-prog-class-label input[type="radio"] {
    position: absolute; opacity: 0; pointer-events: none;
}
.pg-prog-class-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 16px 18px;
    border: 1.5px dashed #cfcfcf; border-radius: 14px;
    background: #fff; transition: border-color 0.15s, background 0.15s;
}
.pg-prog-class-label:hover .pg-prog-class-card {
    border-color: var(--color-brand-red, #ff7268);
    background: #fff7fa;
}
.pg-prog-class-label input[type="radio"]:checked + .pg-prog-class-card {
    border-color: var(--color-brand-red, #ff7268);
    background: #fff0ee;
    border-style: solid;
}
.pg-prog-class-item.is-full .pg-prog-class-card {
    opacity: 0.55; cursor: not-allowed; background: #f2f2f2; border-style: solid;
}
.pg-prog-class-item.is-full .pg-prog-class-label { cursor: not-allowed; }
.pg-prog-class-card__name { font-size: 18px; font-weight: 700; color: #333; }
.pg-prog-class-card__row { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-prog-class-card__chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 20px; border-radius: 999px;
    background: #fafafa; border: 1px solid #eee;
    font-size: 18px; color: #666;
}
.pg-prog-class-card__chip i { color: #888; }
.pg-prog-class-card__chip--cap {
    background: #fff7fa; color: var(--color-brand-red, #ff7268);
    border-color: #ffd6d2; font-weight: 700;
}

/* 신청자 / 아이 입력 폼 */
.pg-resv-input-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
}
.pg-resv-field { display: flex; flex-direction: column; gap: 6px; }
.pg-resv-field--full { grid-column: 1 / -1; }
.pg-resv-field__label { font-size: 14px; font-weight: 600; color: #444; }
.pg-resv-field__label .req { color: #e85a5a; margin-left: 2px; }
.pg-resv-field input,
.pg-resv-field select,
.pg-resv-field textarea {
    width: 100%; padding: 9px 12px;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 15px; line-height: 1.4; font-family: inherit;
    background: #fff; box-sizing: border-box;
}
.pg-resv-field textarea { resize: vertical; min-height: 64px; }
.pg-resv-field input:focus,
.pg-resv-field select:focus,
.pg-resv-field textarea:focus {
    outline: none; border-color: var(--color-brand-red, #ff7268);
    box-shadow: 0 0 0 3px rgba(255, 114, 104, 0.12);
}

.pg-resv-child-list { display: flex; flex-direction: column; gap: 12px; }
.pg-resv-child-row {
    border: 1px dashed #ddd; border-radius: 12px; padding: 14px 16px;
    background: #fafafa;
}
.pg-resv-child-row__head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px;
    margin: 0 0 10px;
}
.pg-resv-child-row__head strong { font-size: 15px; color: #333; }
.pg-resv-child-row__actions {
    display: inline-flex; align-items: center; gap: 6px;
}
.pg-resv-child-del {
    background: none; border: 1px solid #ddd; border-radius: 6px;
    padding: 4px 10px; font-size: 13px; color: #888; cursor: pointer;
}
.pg-resv-child-del:hover { color: #e85a5a; border-color: #e85a5a; }
.pg-resv-child-row__actions .pg-resv-child-add {
    padding: 4px 12px; font-size: 13px;
}
.pg-resv-child-row__actions .pg-resv-child-add.is-hidden { display: none !important; }

.pg-child-birth-group {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 6px;
    min-width: 0;
}
.pg-child-birth-group select {
    min-width: 0;
    padding-left: 8px; padding-right: 8px;
}

@media (min-width: 769px) {
    .pg-resv-child-row .pg-resv-input-grid {
        grid-template-columns: 1fr 1.8fr 0.9fr;
        gap: 12px;
    }
    .pg-resv-child-row .pg-resv-field { min-width: 0; }
}

.reserve-btn-small {
    background: #fff; border: 1px dashed #bbb; color: #555;
    padding: 8px 16px; border-radius: 999px;
    font-size: 14px; cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.reserve-btn-small:hover {
    color: var(--color-brand-red, #ff7268);
    border-color: var(--color-brand-red, #ff7268);
}

/* 완료 화면 */
.pg-resv-complete { text-align: center; }
.pg-resv-complete__icon {
    font-size: 60px; color: var(--color-brand-green, #00cb9e);
    margin: 10px 0 18px;
}
.pg-resv-complete__title {
    font-size: 22px; font-weight: 700; color: #333; margin: 0 0 8px;
    word-break: keep-all;
}
.pg-resv-complete__desc { font-size: 15px; color: #666; margin: 0 0 20px; word-break: keep-all; }

/* 반응형 */
@media (max-width: 720px) {
    .pg-prog-detail .pg-prog-detail__head { flex-direction: column; gap: 18px; }
    .pg-prog-detail .pg-prog-detail__thumb { flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 10; }
    .pg-prog-detail .pg-prog-detail__title { font-size: 22px; }
    .pg-resv-input-grid { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 480px) {
    .pg-prog-list .pg-resv-top-actions {
    justify-content: center;
}
}


.pg-prog-card__meta-upcoming { color: #b35e00; }
.pg-prog-card__meta-deadline { color: #346cb0; }
.pg-resv-deadline-note {
    margin: 18px 0 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f7f8fb;
    color: #3a4b66;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}
.pg-resv-deadline-note i { margin-right: 6px; }