/* 
 * Yenitema - Main CSS
 * Design System Tokens & Base Layout
 */

:root {
    /* Colors */
    --bg-color: #0b0b0d; /* Deep dark background */
    --surface-color: #161618; /* Card background */
    --surface-hover: #1f1f22;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --accent-color: #ff5e00; /* Orange accent */
    --accent-hover: #e05300;
    --border-color: #27272a;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Layout */
    --sidebar-left-width: 260px;
    --sidebar-right-width: 320px;
    --main-max-width: 700px;
    --container-padding: 20px;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* CSS Reset & Basics */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
    word-break: normal;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* Layout - CSS Grid */
.site-wrapper {
    display: grid;
    grid-template-areas: "sidebar-l content sidebar-r";
    grid-template-columns: var(--sidebar-left-width) minmax(0, 1fr) var(--sidebar-right-width);
    gap: 30px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    min-height: 100vh;
    width: 100%;
}

.sidebar-nav { grid-area: sidebar-l; min-width: 0; }
.site-content { grid-area: content; min-width: 0; }
.sidebar-widgets { grid-area: sidebar-r; min-width: 0; }

/* ==================
   LEFT SIDEBAR
   ================== */
.sidebar-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
    align-self: start;
    height: calc(100vh - 48px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    z-index: 10;
    scrollbar-width: none;
    padding-bottom: 24px;
}

.sidebar-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.site-logo, .site-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 24px;
}

.search-box {
    margin-bottom: 24px;
    position: relative;
    padding-right: 20px;
}

.search-field {
    width: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 10px 10px 40px;
    border-radius: 8px;
    outline: none;
}

.search-field:focus {
    border-color: var(--accent-color);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.static-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.static-menu li a:hover, .static-menu li a.active {
    color: var(--text-primary);
}

.static-menu li a.active svg {
    color: var(--accent-color);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-secondary);
    padding-right: 20px;
}

.sidebar-footer .status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0;
    font-weight: 600;
}

.dot.active {
    width: 8px;
    height: 8px;
    background-color: #ff5e00;
    border-radius: 50%;
}

.legal-links {
    display: flex;
    gap: 12px;
}

/* ==================
   MAIN FEED
   ================== */
.site-main {
    padding: 24px 0;
}

.feed-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.feed-tabs a {
    padding-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    position: relative;
}

.feed-tabs a.active {
    color: var(--text-primary);
}

.feed-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
}

/* Topic Card */
.topic-card {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .topic-card {
        padding: 20px 4px; /* Give some breathing room on mobile */
    }
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.topic-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.author-avatar img {
    border-radius: 50%;
}

.author-name {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: #3b82f6;
    display: flex;
}

.topic-badges {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-top: 4px;
}

.badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}

.topic-time {
    color: var(--text-secondary);
}

.topic-content {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 16px;
    position: relative;
}

/* Show More functionality styling */
.topic-content p {
    margin-bottom: 12px;
}

.topic-content.collapsed {
    max-height: 250px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.topic-title, .single-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-primary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.topic-title a:hover {
    color: var(--accent-color);
}

.topic-excerpt-wrapper {
    cursor: pointer;
}

.topic-excerpt-wrapper:hover {
    opacity: 0.85;
}

.btn-show-more {
    display: none !important;
}

.topic-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 500;
}

.action-icons {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
}

.action-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: color 0.2s;
}

.action-icon:hover {
    color: var(--text-primary);
}

/* ==================
   RIGHT SIDEBAR
   ================== */
.sidebar-widgets {
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    z-index: 10;
    scrollbar-width: none;
}

.sidebar-widgets::-webkit-scrollbar {
    display: none;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline:hover {
    color: var(--text-primary);
}

.btn-wiki {
    background-color: #ef4444;
    color: white;
    gap: 6px;
}

.widget {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.trending-list li:last-child {
    margin-bottom: 0;
}

.trending-list .rank {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 20px;
}

.trending-info a {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.trending-info .count {
    font-size: 12px;
    color: var(--text-secondary);
}

.community-join h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.community-join p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Mobile Header */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.mobile-branding .site-title {
    margin-bottom: 0;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100vw - 120px);
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    padding: 8px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* ==================
   RESPONSIVE DESIGN
   ================== */
@media (max-width: 1024px) {
    .site-wrapper {
        grid-template-areas: 
            "sidebar-l content"
            "widgets widgets";
        grid-template-columns: var(--sidebar-left-width) minmax(0, 1fr);
        gap: 20px;
    }
    .sidebar-widgets {
        grid-area: widgets;
        height: auto;
        padding-top: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .sidebar-widgets .widget { margin-bottom: 0; }
}

@media (max-width: 768px) {
    .site-wrapper {
        display: block; /* Remove grid for maximum safety on mobile */
        width: 100%;
        padding: 0 16px;
        overflow-x: hidden;
    }
    .mobile-header {
        display: flex;
        position: sticky;
        top: 0;
        background: var(--bg-color);
        z-index: 100;
        width: calc(100% + 32px); /* Compensation for wrapper padding */
        margin-left: -16px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-nav {
        display: none; /* Fully hide when not active */
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: var(--bg-color);
        z-index: 1000;
        padding: 24px;
        box-shadow: 4px 0 15px rgba(0,0,0,0.5);
        transition: left 0.3s ease;
    }
    body.menu-open .sidebar-nav {
        display: flex;
        left: 0;
    }
    .site-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .sidebar-widgets {
        display: block;
        width: 100%;
        padding-bottom: 40px;
    }
    .sidebar-widgets .widget {
        width: 100%;
        margin-bottom: 24px;
    }
}

/* ==================
   SINGLE TOPIC PAGE
   ================== */
.single-top-bar {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.back-btn:hover {
    color: var(--accent-color);
}

.single-topic-card {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .single-topic-card {
        padding-left: 4px;
        padding-right: 4px;
    }
}

.single-meta {
    margin-bottom: 2px;
}

.author-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topic-sub-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.single-content {
    margin: 0 0 20px;
    font-size: 16px;
    line-height: 1.6;
}

.single-footer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin: 30px 0 15px;
}

.single-actions {
    display: flex;
    align-items: center;
    gap: 30px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.action-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.comments-area-wrapper {
    margin-bottom: 40px;
}

.related-topics {
    border-top: 2px solid var(--border-color);
    padding-top: 30px;
}

.comments-placeholder {
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.related-topics {
    margin-top: 40px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-item-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

/* ==================
   COMMENTS & FORMS
   ================== */
.comment-list {
    margin-bottom: 40px;
}

.comment-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.comment-avatar img {
    border-radius: 50%;
}

.comment-body {
    flex: 1;
}

.comment-author-name {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.comment-author-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.18s ease;
    font-weight: 700;
}

.comment-author-name a:hover {
    color: var(--accent-color);
}

.comment-author-name .comment-meta {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 12px;
}

.comment-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.comment-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.comment-form textarea {
    width: 100%;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    resize: none;
    margin-bottom: 12px;
}

.comment-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.must-log-in {
    text-align: center;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 8px;
    color: var(--text-secondary);
}

.must-log-in a {
    color: var(--accent-color);
    font-weight: 600;
}

.like-btn.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}
.like-btn.active .like-count {
    color: #ef4444;
}

/* Repost active state */
.repost-btn.active svg {
    stroke: #17bf63;
}
.repost-btn.active {
    color: #17bf63;
}

/* Bookmark active state */
.bookmark-btn.active svg {
    fill: var(--accent-color);
    stroke: var(--accent-color);
}
.bookmark-btn.active {
    color: var(--accent-color);
}

/* ==================
   WORDPRESS RICH CONTENT TYPOGRAPHY
   Applies inside .entry-content, .topic-content, .comment-content
   ================== */
.entry-content,
.topic-content,
.comment-content {
    line-height: 1.7;
    font-size: 15px;
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Headings */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.topic-content h1, .topic-content h2, .topic-content h3,
.topic-content h4, .topic-content h5, .topic-content h6,
.comment-content h1, .comment-content h2, .comment-content h3,
.comment-content h4, .comment-content h5, .comment-content h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 1.2em 0 0.6em;
}
.entry-content h1, .topic-content h1, .comment-content h1 { font-size: 1.8em; }
.entry-content h2, .topic-content h2, .comment-content h2 { font-size: 1.5em; }
.entry-content h3, .topic-content h3, .comment-content h3 { font-size: 1.25em; }
.entry-content h4, .topic-content h4, .comment-content h4 { font-size: 1.1em; }

/* Paragraphs */
.entry-content p, .topic-content p, .comment-content p {
    margin-bottom: 1em;
}

/* Bold & Italic */
.entry-content strong, .topic-content strong, .comment-content strong { font-weight: 700; }
.entry-content em, .topic-content em, .comment-content em { font-style: italic; color: var(--text-secondary); }

/* Lists */
.entry-content ul, .entry-content ol,
.topic-content ul, .topic-content ol,
.comment-content ul, .comment-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.entry-content ul, .topic-content ul, .comment-content ul { list-style: disc; }
.entry-content ol, .topic-content ol, .comment-content ol { list-style: decimal; }
.entry-content li, .topic-content li, .comment-content li { margin-bottom: 0.4em; }

/* Blockquote */
.entry-content blockquote,
.topic-content blockquote,
.comment-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding: 10px 16px;
    margin: 1em 0;
    background: rgba(255, 94, 0, 0.05);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Code inline */
.entry-content code, .topic-content code, .comment-content code {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.88em;
    color: #e879f9;
}

/* Code block */
.entry-content pre, .topic-content pre, .comment-content pre {
    background: #111113;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    overflow-x: auto;
    margin: 1em 0;
    font-size: 13px;
    line-height: 1.6;
}
.entry-content pre code, .topic-content pre code, .comment-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    color: var(--text-primary);
}

/* Images inside content */
.entry-content img, .topic-content img, .comment-content img,
.entry-content figure, .topic-content figure {
    max-width: 100% !important;
    height: auto;
    margin: 12px 0;
    display: block;
}

.entry-content .wp-block-image, .entry-content figure {
    margin-left: 0;
    margin-right: 0;
    width: auto !important; /* Override fixed widths from WP editor */
}

.entry-content iframe, .entry-content video, .entry-content embed,
.comment-content iframe, .comment-content video {
    max-width: 100%;
    border-radius: 8px;
}

/* Horizontal rule */
.entry-content hr, .topic-content hr, .comment-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2em 0;
}

/* Tables */
.entry-content table, .topic-content table, .comment-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 14px;
}
.entry-content th, .entry-content td,
.topic-content th, .topic-content td,
.comment-content th, .comment-content td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}
.entry-content th, .topic-content th, .comment-content th {
    background: rgba(255,255,255,0.04);
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================
   AUTHOR PROFILE PAGE
   ================== */
.author-profile-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.author-cover {
    height: 150px;
    background: linear-gradient(45deg, #1f1f22, #0b0b0d);
    border-radius: 12px 12px 0 0;
}

.author-profile-info {
    padding: 0 20px 24px;
    position: relative;
    margin-top: -60px;
}

.author-avatar-large img {
    border: 4px solid var(--bg-color);
    border-radius: 50%;
    background: var(--bg-color);
}

.author-details {
    margin-top: 12px;
}

.author-display-name {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.author-username {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 12px;
}

.author-bio {
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.author-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.author-stats strong {
    color: var(--text-primary);
}

.no-content {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.share-modal.active {
    opacity: 1;
    pointer-events: all;
}

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.share-modal-content {
    position: relative;
    background: var(--surface-color);
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 24px;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.share-modal.active .share-modal-content {
    transform: translateY(0);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.share-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.share-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
}

.share-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.share-option svg {
    color: var(--text-secondary);
}

.share-option:hover svg {
    color: var(--accent-color);
}

/* Comment Editor Styles */
.comment-editor-wrapper {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.comment-editor-wrapper .wp-editor-container {
    border: none !important;
}

.comment-editor-wrapper .wp-editor-area {
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 12px;
}

.comment-editor-wrapper .mce-panel {
    background-color: var(--surface-color) !important;
    border-color: var(--border-color) !important;
}

.comment-editor-wrapper .mce-btn {
    background-color: transparent !important;
}

/* Comment Like Button Active */
.comment-like-btn.active svg {
    fill: #e0245e;
    stroke: #e0245e;
}
.comment-like-btn.active {
    color: #e0245e;
}

/* Comment Author Link — hover like author-name */
.comment-author-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.18s ease;
}
.comment-author-link:hover {
    color: var(--accent-color);
}

/* Comment Edit / Delete icon buttons — subtle, barely visible until hover */
.comment-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: transparent;          /* invisible by default */
    transition: color 0.18s ease, opacity 0.18s ease;
    opacity: 0;
}
/* Show icons when hovering the parent comment item */
.comment-item:hover .comment-action-icon {
    color: var(--text-secondary);
    opacity: 0.45;
}
.comment-action-icon:hover {
    opacity: 1 !important;
}
/* Edit — slight blue tint on hover */
.edit-comment-btn:hover {
    color: #60a5fa !important;
}
/* Delete — slight red tint on hover */
.delete-comment-btn:hover {
    color: #f87171 !important;
}

/* Follow Button */
.follow-btn {
    min-width: 120px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid var(--accent-color);
}
.follow-btn.btn-primary {
    background: var(--accent-color);
    color: #fff;
}
.follow-btn.btn-primary:hover {
    filter: brightness(1.15);
}
.follow-btn.btn-outline {
    background: transparent;
    color: var(--text-primary);
}
.follow-btn.btn-outline:hover {
    background: rgba(255,255,255,0.06);
}
.follow-btn.following {
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.follow-btn.following:hover {
    border-color: #e0245e;
    color: #e0245e;
}

/* Activity Feed Cards */
.activity-card:last-child {
    border-bottom: none !important;
}
.activity-post-preview:hover {
    border-color: var(--accent-color) !important;
    transition: border-color 0.2s ease;
}

/* ─── Sidebar Logo: visible on desktop, hidden when mobile menu is open ─── */
.sidebar-logo-desktop {
    padding: 20px 16px 8px;
}
@media (max-width: 768px) {
    .sidebar-logo-desktop {
        display: none;
    }
}

/* Hide WP admin bar completely on front end */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* ─── Comments Login Prompt ─── */
.comments-login-prompt {
    text-align: center;
    padding: 40px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 32px;
}
.comments-login-prompt h3 { margin-bottom: 12px; }
.comments-login-prompt p { color: var(--text-secondary); margin-bottom: 24px; }

/* ─── Comments Title ─── */
.comments-title, .comments-reply-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* ─── Custom Comment Editor ─── */
.yenitema-comment-form {
    margin-top: 32px;
}

.yt-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
    flex-wrap: wrap;
}

.yt-toolbar-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.yt-toolbar-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.yt-comment-editor {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.2s;
    word-break: break-word;
}
.yt-comment-editor:focus {
    border-color: var(--accent-color);
}
.yt-comment-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-secondary);
    pointer-events: none;
}
.yt-comment-editor img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
}
.yt-comment-editor .embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    margin: 10px 0;
}
.yt-comment-editor .embed-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.yt-editor-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Link Styling for Post Content & Comments */
.entry-content a:not(.link-preview-card), .comment-content a:not(.link-preview-card) {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-color);
    transition: all 0.2s ease;
    padding-bottom: 1px;
    font-weight: 500;
}
.entry-content a:not(.link-preview-card):hover, .comment-content a:not(.link-preview-card):hover {
    color: #fff;
    background: var(--accent-color);
    border-bottom-style: solid;
    padding: 0 4px 2px 4px;
    border-radius: 4px;
}

/* Link Preview Cards */
.link-preview-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    background: var(--surface-color);
    margin: 12px 0;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 500px;
    height: 100px;
}

.link-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}
.lp-image {
    width: 120px;
    height: 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1d;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}
.lp-content {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .link-preview-card {
        height: auto;
        min-height: 90px;
        flex-direction: row !important;
        align-items: stretch;
    }
    .lp-image {
        width: 100px !important;
        height: auto !important;
        min-height: 90px;
        flex-shrink: 0;
        border-right: 1px solid var(--border-color);
        border-bottom: none !important;
    }
    .lp-content {
        padding: 10px 12px;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    .lp-title {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 2px;
        -webkit-line-clamp: 2; /* Allow 2 lines */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .lp-desc {
        display: none; /* Keep description hidden on small mobile to avoid overcrowding */
    }
    .lp-domain {
        margin-top: 2px;
        font-size: 10px;
    }
}
.lp-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lp-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lp-domain {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
