/* ============================================================
   독학관 신청 - 프론트엔드
   ============================================================ */

/* 신청 버튼 영역 */
.dh-apply-wrap {
    position: relative;
    display: inline-block;
}

.dh-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.dh-trigger-btn:hover { background: #333; }
.dh-trigger-btn.dh-trigger-waiting { background: #e84118; }
.dh-trigger-btn.dh-trigger-waiting:hover { background: #c73010; }

/* 마감 스탬프 */
.dh-stamp-full {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 52px;
    height: 52px;
    background: #e84118;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   오버레이 & 팝업
   ============================================================ */
.dh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.dh-popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    overflow: hidden;
    animation: dhFadeIn .18s ease;
}

@keyframes dhFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dh-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #eee;
}

.dh-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.dh-popup-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.dh-popup-close:hover { color: #111; }

.dh-popup-body { padding: 20px; }

/* 정보 테이블 */
.dh-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.dh-info-table th,
.dh-info-table td {
    padding: 10px 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
}
.dh-info-table th {
    width: 90px;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}
.dh-info-table td { color: #111; }

/* 배지 */
.dh-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e8f4ec;
    color: #1a7c3e;
}
.dh-badge.dh-badge-empty        { background: #f0f0f0; color: #888; }
.dh-badge.dh-badge-preview      { background: #fff3e8; color: #b85c00; } /* 미신청 + 대기 예정 */
.dh-badge.dh-badge-dh_waiting   { background: #fff3e8; color: #b85c00; }
.dh-badge.dh-badge-dh_cancelled { background: #fce8e8; color: #c0392b; }
.dh-badge.dh-badge-dh_registered{ background: #e8f0fe; color: #1a56db; }
/* 예약 구분 "신청 후 확정" 힌트 */
.dh-badge-hint {
    font-size: 11px;
    color: #999;
    margin-left: 6px;
}

.dh-date-note {
    font-size: 11px;
    color: #999;
    margin-left: 6px;
}
.dh-note {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
}

/* 유의사항 */
.dh-notice {
    font-size: 12px;
    color: #666;
    line-height: 1.7;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0;
}

/* 팝업 하단 버튼 */
.dh-popup-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.dh-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, opacity .15s;
}
.dh-btn:disabled { opacity: .5; cursor: not-allowed; }

.dh-btn-primary {
    background: #3b5bdb;
    color: #fff;
    min-width: 100px;
}
.dh-btn-primary:hover:not(:disabled) { background: #2f4ac2; }

.dh-btn-ghost {
    background: #f0f0f0;
    color: #555;
}
.dh-btn-ghost:hover { background: #e2e2e2; }

/* ============================================================
   마이페이지 현황
   ============================================================ */
.dh-mypage-status {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
}

.dh-mypage-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
}

.dh-mypage-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.dh-mypage-table th,
.dh-mypage-table td {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.dh-mypage-table th {
    width: 100px;
    color: #666;
    font-weight: 500;
}

.dh-realtime-note {
    font-size: 11px;
    color: #3b5bdb;
}

.dh-mypage-actions { text-align: right; }

/* 본인인증 안내 */
.dh-auth-required { text-align: center; padding: 4px 0; }
.dh-auth-msg { font-size: 13px; color: #c0392b; margin: 0 0 8px; }

/* 마이페이지 인라인 신청폼 */
.dh-inline-form {
    background: #f8f8f8;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    margin-top: 16px;
}
.dh-inline-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
