/**
 * Single Post Styles
 * Modern UX/UI with mobile-first responsive design
 * Styles for [nam_long_single_post] shortcode
 */

/* ═══════════════════════════════════════════════════════════════════════
   CSS VARIABLES & RESET
══════════════════════════════════════════════════════════════════════  */

:root {
    --nls-primary: #c62828;
    --nls-primary-hover: #b71c1c;
    --nls-primary-light: #ffebee;
    --nls-secondary: #64748b;
    --nls-secondary-light: #f1f5f9;
    --nls-text: #0f172a;
    --nls-text-muted: #64748b;
    --nls-border: #e2e8f0;
    --nls-bg: #ffffff;
    --nls-bg-alt: #f8fafc;
    --nls-danger: #ef4444;
    --nls-danger-light: #fef2f2;
    --nls-success: #22c55e;
    --nls-success-light: #f0fdf4;
    --nls-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --nls-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --nls-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --nls-radius: 12px;
    --nls-radius-sm: 8px;
    --nls-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════
   WRAPPER & LAYOUT
══════════════════════════════════════════════════════════════════════  */

.nlssp-wrap {
    display: grid;
    gap: 32px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    box-sizing: border-box;
    max-width: 1200px;
}

/* Mobile-first: Single column, related posts at bottom */
.nlssp-wrap {
    grid-template-columns: 1fr;
}

/* Desktop: Two columns with sidebar on right */
@media (min-width: 1024px) {
    .nlssp-wrap {
        grid-template-columns: 1fr 320px;
        gap: 48px;
        padding: 32px 24px 60px;
    }
}

/* Left column - post content */
.nlspv-recent {
    min-width: 0;
}

/* Right column - related posts (sidebar on desktop) */
.nlspv-top {
    order: 2; /* At bottom on mobile */
}

@media (min-width: 1024px) {
    .nlspv-top {
        order: 0; /* Reset order on desktop */
        position: sticky;
        top: 32px;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        align-self: start;
    }

    /* Smooth scrollbar for sidebar */
    .nlspv-top::-webkit-scrollbar {
        width: 4px;
    }

    .nlspv-top::-webkit-scrollbar-track {
        background: transparent;
    }

    .nlspv-top::-webkit-scrollbar-thumb {
        background: var(--nls-border);
        border-radius: 4px;
    }

    .nlspv-top::-webkit-scrollbar-thumb:hover {
        background: var(--nls-secondary);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   POST CARD
══════════════════════════════════════════════════════════════════════  */

.nlssp-content {
    background: var(--nls-bg);
    border-radius: var(--nls-radius);
    box-shadow: var(--nls-shadow);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════════════════════════  */

.nlssp-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 16px 20px;
    background: var(--nls-bg-alt);
    border-bottom: 1px solid var(--nls-border);
    font-size: 13px;
    color: var(--nls-text-muted);
}

.nlssp-breadcrumb a {
    color: var(--nls-primary);
    text-decoration: none;
    transition: var(--nls-transition);
}

.nlssp-breadcrumb a:hover {
    color: var(--nls-primary-hover);
}

.nlssp-breadcrumb-sep {
    color: var(--nls-border);
    font-size: 10px;
}

.nlssp-breadcrumb-current {
    color: var(--nls-text);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════
   POST HEADER
══════════════════════════════════════════════════════════════════════  */

.nlssp-header {
    padding: 28px 24px 20px;
}

.nlssp-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 0.025em;
}

.nlssp-badge--pinned {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.nlssp-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--nls-text);
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.nlssp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 14px;
    color: var(--nls-text-muted);
}

.nlssp-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nlssp-meta-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--nls-secondary);
}

.nlssp-meta-item time {
    color: var(--nls-text);
}

/* ═══════════════════════════════════════════════════════════════════════
   POST CONTENT
══════════════════════════════════════════════════════════════════════  */

.nlssp-content-body {
    padding: 0 24px 32px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--nls-text);
}

.nlssp-content-body p {
    margin: 0 0 16px 0;
}

.nlssp-content-body p:last-child {
    margin-bottom: 0;
}

.nlssp-content-body--rich img {
    max-width: 100%;
    height: auto;
}

.nlssp-content-body--rich a {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════
   MEDIA GALLERY
══════════════════════════════════════════════════════════════════════  */

.nlssp-gallery {
    padding: 24px;
    background: var(--nls-bg-alt);
    border-top: 1px solid var(--nls-border);
    border-bottom: 1px solid var(--nls-border);
}

.nlssp-gallery-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--nls-text);
}

.nlssp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .nlssp-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
}

.nlssp-gallery-item {
    position: relative;
    border-radius: var(--nls-radius-sm);
    overflow: hidden;
    background: var(--nls-secondary-light);
    aspect-ratio: 16 / 10;
}

.nlssp-gallery-link,
.nlssp-gallery-video {
    display: block;
    width: 100%;
    height: 100%;
}

.nlssp-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nlssp-gallery-link:hover .nlssp-gallery-img {
    transform: scale(1.05);
}

.nlssp-gallery-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--nls-radius-sm);
}

.nlssp-gallery-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Lightbox */
.nlssp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    animation: nlsFadeIn 0.2s ease;
}

@keyframes nlsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nlssp-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--nls-radius);
    box-shadow: var(--nls-shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════════
   ACTIONS
══════════════════════════════════════════════════════════════════════  */

.nlssp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 24px;
    background: var(--nls-bg-alt);
    border-top: 1px solid var(--nls-border);
}

.nlssp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--nls-radius-sm);
    cursor: pointer;
    transition: var(--nls-transition);
    white-space: nowrap;
}

.nlssp-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.nlssp-btn--secondary {
    background: #fff;
    color: var(--nls-text);
    border: 1px solid var(--nls-border);
}

.nlssp-btn--secondary:hover {
    background: var(--nls-bg-alt);
    border-color: var(--nls-secondary);
}

.nlssp-btn:active {
    transform: translateY(0);
}

.nlssp-btn--liked {
    color: var(--nls-primary);
    border-color: var(--nls-primary);
    background: var(--nls-primary-light);
}

.nlssp-btn--liked:hover {
    background: #ffdede;
    border-color: var(--nls-primary-hover);
}

.nlssp-btn--liked .dashicons-heart {
    color: var(--nls-primary);
}

#nlssp-like-count {
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   COMMENTS SECTION (Facebook-style)
   Uses classes: nls-comments, nls-cmt, nls-cmt-row, nls-cmt-bubble, etc.
══════════════════════════════════════════════════════════════════════  */

/* Comments container - integrated into single post */
.nls-comments {
    padding: 24px;
    border-top: 1px solid var(--nls-border);
    background: linear-gradient(180deg, #fff 0%, var(--nls-bg-alt) 100%);
}

.nls-comments-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    font-weight: 700;
    font-size: 18px;
    color: var(--nls-text);
}

/* ===== COMMENT FORM ===== */
.nls-comment-form-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--nls-border);
    margin-bottom: 16px;
}

.nls-comment-form-input {
    flex: 1;
    min-width: 0;
}

.nls-input-row {
    display: flex;
    align-items: center;
    background: var(--nls-bg-alt);
    border-radius: 24px;
    padding: 4px 6px 4px 16px;
    transition: var(--nls-transition);
    border: 2px solid transparent;
}

.nls-input-row:focus-within {
    background: #fff;
    border-color: var(--nls-primary);
    box-shadow: 0 0 0 3px var(--nls-primary-light);
}

.nls-input-row textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    padding: 10px 0;
    min-height: 24px;
    max-height: 150px;
    outline: none;
    color: var(--nls-text);
}

.nls-input-row textarea::placeholder {
    color: var(--nls-text-muted);
}

.nls-send-btn {
    font-size: 12px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--nls-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--nls-transition);
}

.nls-send-btn svg {
    width: 18px;
    height: 18px;
}

.nls-send-btn:disabled {
    background: var(--nls-bg-alt);
    color: var(--nls-text-muted);
    cursor: not-allowed;
}

.nls-send-btn:not(:disabled):hover {
    background: var(--nls-primary-hover);
    transform: scale(1.05);
}


.nls-cancel-btn {
    border: none;
    background: none;
    color: var(--nls-text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: var(--nls-transition);
}

.nls-cancel-btn:hover {
    color: var(--nls-danger);
}

/* Login banner */
.nls-login-banner {
    padding: 16px 20px;
    background: var(--nls-bg-alt);
    border-radius: var(--nls-radius-sm);
    text-align: center;
    font-size: 14px;
    color: var(--nls-text-muted);
    margin-bottom: 16px;
    border: 1px solid var(--nls-border);
}

.nls-login-banner a {
    color: var(--nls-primary);
    text-decoration: none;
    font-weight: 600;
}

.nls-login-banner a:hover {
    text-decoration: underline;
}

/* ===== AVATAR ===== */
.nls-avatar {
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    box-shadow: var(--nls-shadow-sm);
}

.nls-avatar-28 { width: 28px; height: 28px; font-size: 11px; }
.nls-avatar-32 { width: 32px; height: 32px; font-size: 13px; }

/* ===== COMMENT LIST ===== */
.nls-comments-list {
    display: flex;
    flex-direction: column;
}

.nls-comments-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--nls-text-muted);
    font-size: 15px;
}

/* ===== COMMENT ITEM ===== */
.nls-cmt {
    padding: 8px 0;
    animation: nls-cmt-fade-in 0.25s ease-out;
}

@keyframes nls-cmt-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.nls-cmt-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.nls-cmt-bubble {
    width: 100%;
    background: var(--nls-bg-alt);
    border-radius: 18px;
    padding: 10px 14px;
    word-wrap: break-word;
}

.nls-cmt-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--nls-text);
    line-height: 1.3;
}

.nls-cmt-text {
    font-size: 15px;
    color: var(--nls-text);
    line-height: 1.5;
    margin-top: 4px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Reply arrow (›) and reply-to target */
.nls-reply-arrow {
    color: var(--nls-text-muted);
    font-weight: 400;
    margin: 0 4px;
    font-size: 14px;
}

.nls-cmt-author .nls-reply-to {
    color: var(--nls-text-muted);
    font-weight: 500;
}

.nls-cmt-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0 4px 50px;
    font-size: 13px;
    color: var(--nls-text-muted);
}

.nls-cmt-footer time {
    cursor: default;
}

.nls-cmt-action {
    border: none;
    background: none;
    color: var(--nls-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--nls-transition);
}

.nls-cmt-action:hover {
    color: var(--nls-primary);
    background: var(--nls-primary-light);
}

.nls-delete-btn:hover {
    color: var(--nls-danger);
    background: var(--nls-danger-light);
}

/* ===== REPLIES ===== */
.nls-replies {
    margin-left: 42px;
    margin-top: 8px;
}

.nls-toggle-replies {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: none;
    color: var(--nls-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    border-radius: 6px;
    transition: var(--nls-transition);
}

.nls-toggle-replies:hover {
    color: var(--nls-primary);
    background: var(--nls-primary-light);
}

.nls-arrow-down {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--nls-secondary);
    color: #fff;
    font-size: 10px;
    transition: var(--nls-transition);
}

.nls-toggle-replies.expanded .nls-arrow-down {
    background: var(--nls-primary);
}

/* Collapsed: show only last reply */
.nls-replies-collapsed .nls-cmt--reply {
    display: none;
}

.nls-replies-collapsed .nls-cmt--reply:last-child {
    display: block;
}

/* Reply comment */
/* .nls-cmt--reply .nls-cmt-bubble {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--nls-border);
} */

.nls-cmt--reply .nls-cmt-footer {
    padding-left: 44px;
}

.nls-cmt--reply .nls-cmt-author {
    font-size: 13px;
}

.nls-cmt--reply .nls-cmt-text {
    font-size: 14px;
}

/* ===== ANIMATIONS ===== */
.nls-cmt-new {
    animation: nls-cmt-fade-in 0.3s ease-out;
}

.nls-spin {
    animation: nls-cmt-spin 0.8s linear infinite;
}

@keyframes nls-cmt-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== TOAST ===== */
.nls-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: var(--nls-radius-sm);
    font-size: 14px;
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: var(--nls-shadow-lg);
}

.nls-toast.nls-toast--success {
    background: var(--nls-success);
}

.nls-toast.nls-toast--error {
    background: var(--nls-danger);
}

.nls-toast.nls-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== INLINE REPLY FORM ===== */
.nls-inline-reply-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 8px;
    padding: 12px;
    background: var(--nls-bg-alt);
    border-radius: var(--nls-radius-sm);
    border: 1px solid var(--nls-border);
    animation: nls-cmt-fade-in 0.2s ease-out;
}

.nls-inline-reply-input {
    flex: 1;
    min-width: 0;
}

.nls-reply-to-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--nls-primary-light);
    border-radius: var(--nls-radius-sm) var(--nls-radius-sm) 0 0;
    font-size: 13px;
    color: var(--nls-text-muted);
    margin-bottom: 2px;
}

.nls-replying-to {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nls-replying-to strong {
    color: var(--nls-primary);
    font-weight: 600;
}

.nls-inline-reply-cancel-small {
    border: none;
    background: none;
    color: var(--nls-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: var(--nls-transition);
}

.nls-inline-reply-cancel-small:hover {
    color: var(--nls-danger);
}

.nls-inline-reply-form .nls-input-row {
    background: #fff;
    border: 1px solid var(--nls-border);
    padding: 3px 4px 3px 12px;
}

.nls-inline-reply-form .nls-input-row:focus-within {
    border-color: var(--nls-primary);
    box-shadow: 0 0 0 3px var(--nls-primary-light);
}

.nls-inline-reply-textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    padding: 8px 0;
    min-height: 20px;
    max-height: 120px;
    outline: none;
    color: var(--nls-text);
}

.nls-inline-reply-textarea::placeholder {
    color: var(--nls-text-muted);
}

.nls-inline-reply-send {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--nls-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--nls-transition);
}

.nls-inline-reply-send svg {
    width: 16px;
    height: 16px;
}

.nls-inline-reply-send:disabled {
    background: var(--nls-bg-alt);
    color: var(--nls-text-muted);
    cursor: not-allowed;
}

.nls-inline-reply-send:not(:disabled):hover {
    background: var(--nls-primary-hover);
    transform: scale(1.05);
}

.nls-inline-reply-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.nls-inline-reply-cancel {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--nls-text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--nls-transition);
}

.nls-inline-reply-cancel:hover {
    color: var(--nls-danger);
    background: var(--nls-danger-light);
}

/* ═══════════════════════════════════════════════════════════════════════
   RELATED POSTS (SIDEBAR)
══════════════════════════════════════════════════════════════════════  */

.nlspv-top {
    background: var(--nls-bg);
    border-radius: var(--nls-radius);
    padding: 0;
    box-shadow: var(--nls-shadow);
    overflow: hidden;
}

.nlspv-top-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--nls-text);
    padding: 20px 20px 16px;
    /* background: linear-gradient(135deg, var(--nls-primary-light) 0%, #fff 100%); */
    border-bottom: 1px solid var(--nls-border);
}

.nlspv-top-heading::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--nls-primary) 0%, var(--nls-primary-hover) 100%);
    border-radius: 2px;
}

.nlspv-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--nls-text-muted);
}

.nlspv-empty::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.nlspv-empty p {
    margin: 0;
    font-size: 14px;
}

.nlspv-top-list {
    list-style: none;
    margin: 0;
    padding: 12px;
    counter-reset: related-counter;
}

.nlssp-related-list {
    counter-increment: related-counter;
    position: relative;
    margin-bottom: 8px;
    margin-right: 12px !important;
}

.nlssp-related-list::before {
    content: counter(related-counter);
    position: absolute;
    left: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    background: #c62828;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    z-index: 1;
}

.nlssp-related-item {
    margin: 0;
}

.nlssp-related-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: var(--nls-transition);
    background: var(--nls-bg-alt);
    border: 1px solid var(--nls-border);
    border-radius: var(--nls-radius-sm);
    padding: 12px 12px 12px 48px;
    position: relative;
    overflow: hidden;
}

.nlssp-related-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--nls-primary-light) 0%, transparent 100%);
    opacity: 0;
    transition: var(--nls-transition);
    z-index: 0;
}

.nlssp-related-link:hover {
    border-color: var(--nls-primary);
    transform: translateX(2px);
    box-shadow: var(--nls-shadow);
}

.nlssp-related-link:hover::before {
    opacity: 1;
}

.nlssp-related-title-item {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--nls-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.nlssp-related-link:hover .nlssp-related-title-item {
    color: var(--nls-primary);
}

.nlssp-related-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--nls-text-muted);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.nlssp-related-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nlssp-related-date::before {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.nlssp-related-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nlssp-related-views .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--nls-secondary);
}


/* ═══════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
══════════════════════════════════════════════════════════════════════  */


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE IMPROVEMENTS
══════════════════════════════════════════════════════════════════════  */

@media (max-width: 640px) {
    .nlssp-wrap {
        padding: 16px 12px 32px;
        gap: 24px;
    }

    .nlssp-header,
    .nlssp-content-body,
    .nlssp-gallery,
    .nlssp-actions,
    .nls-comments-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .nlssp-breadcrumb {
        padding: 12px 16px;
        font-size: 12px;
    }

    .nlssp-title {
        font-size: 22px;
    }

    .nlssp-meta {
        gap: 12px 16px;
        font-size: 13px;
    }

    .nlssp-meta-item .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .nlssp-actions {
        flex-direction: column;
    }

    .nlssp-btn {
        width: 100%;
    }

    .nlssp-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    /* Comments section mobile styles */
    .nls-comments {
        padding: 20px 16px;
    }

    .nls-comments-bar {
        font-size: 16px;
        padding-bottom: 12px;
    }

    .nls-comment-form-wrap {
        gap: 10px;
        padding-bottom: 12px;
    }

    .nls-input-row {
        padding: 3px 5px 3px 12px;
        border-radius: 20px;
    }

    .nls-input-row textarea {
        font-size: 14px;
        padding: 8px 0;
    }

    .nls-send-btn {
        width: 32px;
        height: 32px;
    }

    .nls-send-btn svg {
        width: 16px;
        height: 16px;
    }

    .nls-cmt-footer {
        padding-left: 40px;
        gap: 12px;
        font-size: 12px;
    }

    /* Inline reply form mobile */
    .nls-inline-reply-form {
        padding: 10px;
        gap: 8px;
    }

    .nls-reply-to-header {
        padding: 6px 10px;
        font-size: 12px;
    }

    .nls-inline-reply-form .nls-input-row {
        padding: 2px 4px 2px 10px;
    }

    .nls-inline-reply-textarea {
        font-size: 13px;
        padding: 6px 0;
    }

    .nls-inline-reply-send {
        width: 28px;
        height: 28px;
    }

    .nls-inline-reply-send svg {
        width: 14px;
        height: 14px;
    }

    .nls-inline-reply-actions {
        margin-top: 6px;
    }

    .nls-inline-reply-cancel {
        padding: 5px 12px;
        font-size: 12px;
    }

    .nls-replies {
        margin-left: 32px;
    }

    .nls-cmt-bubble {
        width: 100%;
        padding: 8px 12px;
    }

    .nls-cmt-author {
        font-size: 13px;
    }

    .nls-cmt-text {
        font-size: 14px;
    }

    .nls-comments-empty {
        padding: 24px 12px;
        font-size: 14px;
    }

    .nls-login-banner {
        padding: 12px 16px;
        font-size: 13px;
    }

    .nlspv-top {
        padding: 0;
    }

    .nlspv-top-heading {
        padding: 16px 16px 12px;
        font-size: 15px;
    }

    .nlspv-top-list {
        padding: 8px;
    }

    .nlssp-related-link {
        padding: 10px 10px 10px 44px;
    }

    .nlssp-related-list::before {
        width: 26px;
        height: 26px;
        font-size: 12px;
        left: 10px;
        top: 10px;
    }

    .nlssp-related-title-item {
        font-size: 13px;
    }

    .nlssp-related-meta {
        font-size: 10px;
        gap: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════════════════════════════  */

@media print {
    .nlssp-breadcrumb,
    .nlssp-actions,
    .nlspv-top,
    .nls-comments,
    .nlssp-gallery-badge {
        display: none !important;
    }

    .nlssp-content {
        box-shadow: none;
    }

    .nlssp-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nlssp-wrap {
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
══════════════════════════════════════════════════════════════════════  */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.nlssp-btn:focus-visible,
.nls-input-row textarea:focus-visible,
.nls-send-btn:focus-visible,
.nls-cmt-action:focus-visible,
.nls-toggle-replies:focus-visible,
.nlssp-related-link:focus-visible,
.nls-inline-reply-textarea:focus-visible,
.nls-inline-reply-send:focus-visible,
.nls-inline-reply-cancel:focus-visible,
.nls-inline-reply-cancel-small:focus-visible {
    /* outline: 2px solid var(--nls-primary); */
    outline-offset: 2px;
}

.nlssp-related-link:focus-visible,
.nls-send-btn:focus-visible,
.nls-inline-reply-send:focus-visible {
    outline-offset: 3px;
}
