/* Phase 2C: CSS replacements for jQuery plugins */

/* ── Login panel slide (replaces jQuery slidePanel) ───────── */
.vanilla-slidepanel-enabled #slidepanel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.vanilla-slidepanel-enabled #slidepanel.open {
    max-height: 500px;
}

/* ── Notice marquee: driven by nbmarquee.js (JS copyspeed), not CSS animation ── */

/* ── Notice Modal (native <dialog>, replaces Magnific Popup) ── */
@keyframes noticeModalIn {
    from { opacity: 0; transform: scale(0.94) translateY(-14px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);     }
}

#notice-dialog {
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 580px;
    width: 90%;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45),
                0 4px  16px rgba(0, 0, 0, 0.20);
    overflow: hidden;
    animation: noticeModalIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

#notice-dialog::backdrop {
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Header */
.notice-modal-header {
    background: #4C801A;
    padding: 18px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.notice-modal-icon-wrap {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.notice-modal-header-content {
    flex: 1;
    min-width: 0;
}

.notice-modal-title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    font-weight: normal;
    color: #fff;
    margin: 0 0 5px 0;
    line-height: 1.35;
    word-break: break-word;
}

.notice-modal-date {
    display: block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
}

.notice-modal-close {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 2px;
    transition: background 0.18s ease;
}

.notice-modal-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* Body */
.notice-modal-body {
    padding: 24px 26px 28px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.75;
    color: #444;
    max-height: 52vh;
    overflow-y: auto;
}

.notice-modal-body p {
    margin: 0;
}

.notice-modal-body::-webkit-scrollbar       { width: 5px; }
.notice-modal-body::-webkit-scrollbar-track { background: #f4f4f4; }
.notice-modal-body::-webkit-scrollbar-thumb { background: #4C801A; border-radius: 3px; }
.notice-modal-body::-webkit-scrollbar-thumb:hover { background: #3a6415; }

/* Loading state */
.notice-modal-loading {
    padding: 48px 24px;
    text-align: center;
    color: #888;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
}

.notice-modal-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e8e8e8;
    border-top-color: #4C801A;
    border-radius: 50%;
    animation: noticeSpinning 0.75s linear infinite;
    margin: 0 auto 12px;
}

@keyframes noticeSpinning { to { transform: rotate(360deg); } }

/* Error state */
.notice-modal-error {
    padding: 48px 24px;
    text-align: center;
    color: #c0392b;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 560px) {
    #notice-dialog {
        width: 96%;
        max-width: 96%;
        border-radius: 8px;
    }
    .notice-modal-header    { padding: 14px 16px; gap: 10px; }
    .notice-modal-body      { padding: 18px 16px 22px; }
    .notice-modal-title     { font-size: 15px; }
    .notice-modal-icon-wrap { width: 36px; height: 36px; }
}
