/**
 * Jijimingo Notice Bar - Frontend Styles (v1.1.0)
 *
 * Design Enhancements:
 * - Added gradients, icons, and animations for a modern look.
 * - Improved typography and readability for modal content.
 * - Enhanced user interaction with hover effects.
 * - Fully responsive for desktop and mobile.
 */

/* Keyframes for animations */
@keyframes jiji-slide-down {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes jiji-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes jiji-scale-up {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* [1] 상단 알림 바 (Enhanced) */
#jiji-notice-bar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99999;
    /* --- Design Improvement: Gradient Background --- */
    background: linear-gradient(45deg, #6b73ff, #4a55e7);
    color: #ffffff;
    /* --- Font/Height Adjustment --- */
    padding: 10px 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    /* --- Font/Height Adjustment --- */
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    transition: filter 0.3s ease, top 0.3s ease;
    /* --- Design Improvement: Animation --- */
    animation: jiji-slide-down 0.5s ease-out forwards;
}

/* --- Design Improvement: Hover Effect --- */
#jiji-notice-bar:hover {
    filter: brightness(1.1);
}

/* --- Design Improvement: Icon --- */
#jiji-notice-bar .jiji-notice-icon {
    display: inline-block;
    margin-right: 10px;
    animation: jiji-fade-in 1s ease;
}

#jiji-notice-bar .jiji-notice-text {
    flex-grow: 1;
    text-align: center;
}

#jiji-notice-bar .jiji-close-bar-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 10px;
    margin-left: 15px;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

#jiji-notice-bar .jiji-close-bar-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* [2] 모달 오버레이 (Enhanced) */
.jiji-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 32, 46, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    /* --- Design Improvement: Animation --- */
    transition: visibility 0s 0.4s, opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.jiji-modal-overlay.jiji-is-visible {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

/* [3] 모달 컨텐츠 박스 (Enhanced) */
.jiji-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 650px;
    width: 90%;
    position: relative;
    font-family: 'Noto Serif KR', serif;
    max-height: 85vh;
    overflow-y: auto;
    /* --- Design Improvement: Animation --- */
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.jiji-modal-overlay.jiji-is-visible .jiji-modal-content {
    transform: scale(1);
}

/* --- Design Improvement: Modal Body & Typography --- */
.jiji-modal-body {
    padding: 45px 50px;
    color: #333;
    line-height: 1.7;
}

.jiji-modal-body h1,
.jiji-modal-body h2,
.jiji-modal-body h3 {
    font-family: 'Noto Sans KR', sans-serif; /* Use a sans-serif for titles for contrast */
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}
.jiji-modal-body h1 { font-size: 28px; }
.jiji-modal-body h2 { font-size: 24px; }
.jiji-modal-body h3 { font-size: 20px; }

.jiji-modal-body p {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 1.2em;
}

.jiji-modal-body a {
    color: #6b73ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.jiji-modal-body a:hover {
    color: #4a55e7;
    text-decoration: underline;
}

.jiji-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}


/* [4] 모달 닫기 버튼 (Enhanced) */
.jiji-modal-content .jiji-close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f1f1f1;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: #555;
    line-height: 36px;
    text-align: center;
    transition: background-color 0.3s, transform 0.3s;
}

.jiji-modal-content .jiji-close-modal-btn:hover {
    background-color: #e0e0e0;
    transform: rotate(90deg);
}

/* --- Mobile 대응 (Enhanced) --- */
@media (max-width: 782px) {
    #jiji-notice-bar {
        padding: 10px 15px;
        font-size: 13px;
    }

    #jiji-notice-bar .jiji-notice-icon {
        margin-right: 8px;
    }
    
    #jiji-notice-bar .jiji-close-bar-btn {
        font-size: 22px;
        padding: 0 5px;
    }

    .jiji-modal-content {
        width: 92%;
        max-height: 80vh;
    }
    
    .jiji-modal-body {
        padding: 30px 25px;
    }

    .jiji-modal-body h1 { font-size: 22px; }
    .jiji-modal-body h2 { font-size: 20px; }
    .jiji-modal-body p { font-size: 15px; }

    .jiji-modal-content .jiji-close-modal-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
        line-height: 32px;
    }
}
