/* ==========================================================================
   Kids Trip Korea - Notice & Changelog Modal Stylesheet (css/notice.css)
   Version: 1.0.0 (KTDS v1.0.0 - Light-First Dual Theme)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header Notice Button & Badge
   -------------------------------------------------------------------------- */
.header-notice-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-min-size);
    min-height: var(--touch-min-size);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background var(--duration-fast), color var(--duration-fast);
}

.header-notice-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-emerald);
}

.notice-count-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    background: var(--accent-rose);
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 0 6px var(--accent-rose-glow, rgba(225, 29, 72, 0.4));
    animation: noticePulse 2.4s infinite ease-in-out;
}

@keyframes noticePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notice-count-badge {
        animation: none;
    }
    .notice-drawer-overlay,
    .notice-drawer-content,
    .notice-version-toggle-icon,
    .notice-version-content {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------------------------------
   2. Notice Drawer Overlay & Container (Zero CLS Fixed Overlay)
   -------------------------------------------------------------------------- */
.notice-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-spring);
}

.notice-drawer-overlay.open {
    display: flex;
    opacity: 1;
}

@media (min-width: 768px) {
    .notice-drawer-overlay {
        align-items: center;
    }
}

.notice-drawer-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 580px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-modal);
    transform: translateY(100%);
    transition: transform var(--duration-slow) var(--ease-spring);
    overflow: hidden;
}

@media (min-width: 768px) {
    .notice-drawer-content {
        border-radius: var(--radius-xl);
        max-height: 82vh;
        transform: translateY(20px);
    }
}

.notice-drawer-overlay.open .notice-drawer-content {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   3. Drawer Header & Drag Handle
   -------------------------------------------------------------------------- */
.notice-drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--border-hover);
    border-radius: var(--radius-full);
    margin: 8px auto 0 auto;
}

@media (min-width: 768px) {
    .notice-drawer-handle {
        display: none;
    }
}

.notice-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.notice-drawer-title-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notice-drawer-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-drawer-subtitle {
    font-size: 0.75rem;
    color: var(--accent-emerald);
    font-weight: 600;
}

.notice-drawer-close {
    width: var(--touch-min-size);
    height: var(--touch-min-size);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.notice-drawer-close:hover {
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
    background: var(--accent-emerald-tint);
}

/* --------------------------------------------------------------------------
   4. Notice Drawer Body & Version List (Accordion)
   -------------------------------------------------------------------------- */
.notice-drawer-body {
    overflow-y: auto;
    flex: 1;
    padding: 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.notice-intro-banner {
    background: var(--accent-emerald-tint);
    border: 1px solid var(--accent-emerald);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.notice-intro-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.notice-version-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.notice-version-card.is-latest {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 1px var(--accent-emerald-tint), var(--shadow-sm);
}

.notice-version-header {
    width: 100%;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--duration-fast);
}

.notice-version-header:hover {
    background: var(--bg-card-hover);
}

.notice-version-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notice-badge-version {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-card-active);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.notice-version-card.is-latest .notice-badge-version {
    background: var(--accent-emerald);
    color: var(--color-white);
}

.notice-badge-latest-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    background: var(--accent-emerald-tint);
    color: var(--accent-emerald);
    border: 1px solid var(--accent-emerald);
}

.notice-version-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notice-version-toggle-icon {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: transform var(--duration-base) var(--ease-spring);
    flex-shrink: 0;
}

.notice-version-card.is-expanded .notice-version-toggle-icon {
    transform: rotate(180deg);
}

.notice-version-content {
    display: none;
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notice-version-card.is-expanded .notice-version-content {
    display: block;
    animation: noticeFadeIn 0.25s ease-out;
}

@keyframes noticeFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.notice-section-block {
    margin-top: 0.875rem;
}

.notice-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.notice-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-item {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item::before {
    content: "•";
    position: absolute;
    left: 0.15rem;
    color: var(--accent-emerald);
    font-weight: 900;
}

.notice-item b, .notice-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   5. Drawer Footer
   -------------------------------------------------------------------------- */
.notice-drawer-footer {
    padding: 0.75rem 1.25rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notice-footer-link {
    color: var(--accent-emerald);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.notice-footer-link:hover {
    text-decoration: underline;
}

/* Loading & Empty States */
.notice-loading-state,
.notice-error-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notice-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--border-color);
    border-top-color: var(--accent-emerald);
    border-radius: var(--radius-full);
    animation: noticeSpin 0.8s linear infinite;
    margin-bottom: 0.5rem;
}

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