/* ==================================================
   Notice Popup
================================================== */

.notice-popup-overlay {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;

    background: rgba(0, 0, 0, 0.42);

    z-index: 9999;
}


/* 팝업 본체 */
.notice-popup {
    width: min(420px, 100%);
    max-height: 72vh;

    background: #fff;
    border-radius: 12px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.18),
        0 3px 8px rgba(0, 0, 0, 0.06);

    overflow: hidden;

    animation: noticePopupShow 0.25s ease;
}


/* ==================================================
   Header
================================================== */

.notice-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 15px 18px;

    border-bottom: 1px solid #e5e7eb;
}


.notice-popup-title-area {
    display: flex;
    align-items: center;

    gap: 8px;

    min-width: 0;
}


.notice-popup-header h2 {
    margin: 0;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;

    color: #111827;
}


.notice-popup-count {
    flex-shrink: 0;

    padding: 2px 6px;

    border-radius: 8px;

    background: #f1f5f9;

    color: #64748b;

    font-size: 11px;
    font-weight: 600;
}


/* X 버튼 */
.notice-popup-x {
    flex-shrink: 0;

    width: 28px;
    height: 28px;

    padding: 0;

    border: none;
    background: transparent;

    color: #6b7280;

    font-size: 23px;
    line-height: 1;

    cursor: pointer;
}


.notice-popup-x:hover {
    color: #111827;
}


/* ==================================================
   Body
================================================== */

.notice-popup-body {
    padding: 18px;

    max-height: 42vh;

    overflow-y: auto;

    color: #374151;

    font-size: 13px;
    line-height: 1.65;
}


/* DB에 저장된 HTML의 p 간격 조절 */
.notice-popup-body p {
    margin: 0 0 10px;
}


.notice-popup-body p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   Footer
================================================== */

.notice-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 11px 18px;

    background: #f8fafc;

    border-top: 1px solid #e5e7eb;
}


.notice-popup-today-label {
    display: flex;
    align-items: center;

    gap: 6px;

    color: #4b5563;

    font-size: 12px;

    cursor: pointer;
}


.notice-popup-today {
    width: 14px;
    height: 14px;

    margin: 0;

    cursor: pointer;
}


/* 오른쪽 버튼 영역 */
.notice-popup-actions {
    display: flex;
    align-items: center;

    gap: 6px;

    flex-shrink: 0;
}


.notice-popup-detail,
.notice-popup-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 6px 12px;

    border-radius: 6px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


.notice-popup-detail {
    border: 1px solid #d1d5db;

    background: #fff;

    color: #374151;

    text-decoration: none;
}


.notice-popup-detail:hover {
    background: #f3f4f6;
}


.notice-popup-close {
    border: none;

    background: #222;

    color: #fff;
}


.notice-popup-close:hover {
    background: #000;
}


/* ==================================================
   Animation
================================================== */

@keyframes noticePopupShow {

    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* ==================================================
   Mobile
================================================== */

@media (max-width: 600px) {

    .notice-popup-overlay {
        padding: 14px;
    }


    .notice-popup {
        width: min(380px, 100%);
        max-height: 82vh;

        border-radius: 10px;
    }


    .notice-popup-header {
        padding: 13px 15px;
    }


    .notice-popup-header h2 {
        font-size: 16px;
    }


    .notice-popup-body {
        padding: 16px 15px;

        max-height: 50vh;

        font-size: 13px;
    }


    .notice-popup-footer {
        padding: 10px 15px;
    }

}