/* ==========================================================================
   Release Notes — Public + Modal Shared Styles
   Used by: release-notes/index.blade.php, components/release-notes-modal.blade.php
   ========================================================================== */

/* ---- Category badges (shared across modal + public page) ---- */
.rn-badge {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
}

.rn-badge--feature {
    background: #e0f2fe;
    color: #075985;
}

.rn-badge--improvement {
    background: #ede9fe;
    color: #5b21b6;
}

.rn-badge--bugfix {
    background: #fee2e2;
    color: #991b1b;
}

.rn-badge--security {
    background: #fef3c7;
    color: #92400e;
}

.rn-badge--announcement {
    background: #dcfce7;
    color: #166534;
}

/* ==========================================================================
   Public release-notes page
   ========================================================================== */
body.release-notes-page {
    background: var(--light-bg);
    color: var(--text-primary);
    overflow-y: auto;
    height: auto;
}

.rn-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.rn-navbar .navbar-brand {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.rn-navbar .navbar-brand img {
    height: 30px;
    width: auto;
}

.rn-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 110px 1.5rem 5rem;
}

.rn-back-link {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
    margin-bottom: 2.5rem;
}

.rn-back-link:hover {
    color: var(--text-primary);
}

.rn-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.rn-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.rn-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rn-filter-bar {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 0.5rem;
    -ms-flex-pack: center;
        justify-content: center;
    margin-bottom: 2.5rem;
}

.rn-filter-pill {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--white);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    text-transform: capitalize;
}

.rn-filter-pill:hover {
    color: var(--text-primary);
    border-color: var(--gray-400);
}

.rn-filter-pill.is-active {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.rn-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.rn-card-meta {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.75rem;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rn-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.rn-card-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.rn-card-body {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.925rem;
}

.rn-card-body h1,
.rn-card-body h2,
.rn-card-body h3,
.rn-card-body h4 {
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}

.rn-card-body h2 { font-size: 1.1rem; }
.rn-card-body h3 { font-size: 1rem; }

.rn-card-body p { margin-bottom: 0.75rem; }
.rn-card-body ul,
.rn-card-body ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0 0.75rem;
}
.rn-card-body li { margin-bottom: 0.35rem; }
.rn-card-body code {
    background: var(--gray-50);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #b91c1c;
}
.rn-card-body pre {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0.75rem 0;
}
.rn-card-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
.rn-card-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}
.rn-card-body img:hover { opacity: 0.85; }

.rn-card-body a {
    color: var(--vibrant-coral);
    text-decoration: none;
    font-weight: 500;
}
.rn-card-body a:hover { text-decoration: underline; }

.rn-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--white);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

/* ==========================================================================
   Modal + bell (used inside the authenticated app)
   ========================================================================== */
.rn-bell-btn {
    position: relative;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: center;
        justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary, #555);
    cursor: pointer;
    transition: background-color var(--transition-fast, 0.15s ease);
}

.rn-bell-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary, #111);
}

.rn-bell-btn .rn-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    display: none;
    border: 2px solid var(--white, #fff);
    box-sizing: content-box;
}

.rn-bell-btn[data-unread="true"] .rn-bell-badge {
    display: inline-block;
}

.rn-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    display: none;
    -ms-flex-align: start;
        align-items: flex-start;
    -ms-flex-pack: center;
        justify-content: center;
    padding: 4rem 1rem;
    overflow-y: auto;
}

.rn-modal-backdrop.is-open {
    display: -ms-flexbox;
    display: flex;
}

.rn-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 640px;
    width: 100%;
    max-height: calc(100vh - 8rem);
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
        flex-direction: column;
    overflow: hidden;
}

.rn-modal__header {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: justify;
        justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.rn-modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.rn-modal__close {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.rn-modal__close:hover { color: #111; }

.rn-modal__body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    -ms-flex: 1 1 auto;
        flex: 1 1 auto;
}

.rn-modal__entry {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.rn-modal__entry:last-child { border-bottom: none; }

.rn-modal__entry-meta {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 0.65rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.rn-modal__entry-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.35rem;
}

.rn-modal__entry-summary {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

.rn-modal__entry-body {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.6;
}

.rn-modal__entry-body a { color: var(--vibrant-coral, #ef4444); text-decoration: none; font-weight: 500; }
.rn-modal__entry-body a:hover { text-decoration: underline; }
.rn-modal__entry-body code { background: #f3f4f6; padding: 0.05rem 0.3rem; border-radius: 3px; font-size: 0.85em; }
.rn-modal__entry-body ul, .rn-modal__entry-body ol { padding-left: 1.25rem; margin: 0.4rem 0; }
.rn-modal__entry-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}
.rn-modal__entry-body img:hover { opacity: 0.85; }

/* ---- Image lightbox overlay ---- */
.rn-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: center;
        justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.rn-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.rn-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    -o-object-fit: contain;
       object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.rn-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: center;
        justify-content: center;
    transition: background 0.15s ease;
}
.rn-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.rn-modal__entry details > summary {
    cursor: pointer;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    list-style: none;
}
.rn-modal__entry details > summary::-webkit-details-marker { display: none; }
.rn-modal__entry details[open] > summary { color: #111827; }
.rn-modal__entry details > summary::after { content: " ▾"; }
.rn-modal__entry details[open] > summary::after { content: " ▴"; }

.rn-modal__footer {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: justify;
        justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.rn-modal__footer .rn-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.85rem;
}
.rn-modal__footer .rn-link:hover { color: #111; text-decoration: underline; }

.rn-modal__footer .rn-btn {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.rn-modal__footer .rn-btn:hover { background: #1f2937; }

.rn-modal__empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #9ca3af;
}
