/* ==========================================================================
   NR1 Community — Ebooks-style floating layout + Reddit feed
   ========================================================================== */

:root {
    --color-one:   #5B00C9;
    --color-two:   #5FA8FF;
    --color-three: #09003D;
    --color-four:  #1E0072;
    --color-five:  #EDEDED;
}

.reddit-page {
    background: #f3f0ff;
    min-height: calc(100vh - 80px);
    padding: 0 0 48px;
    position: relative;
    overflow-x: clip;
}

.reddit-page-topic {
    padding-top: 0;
}

/* ----- Hero (ebooks breadcum pattern) ----- */
.community-hero {
    position: relative;
    padding: 28px 0 190px;
    overflow: hidden;
}

.community-hero-topic {
    padding-bottom: 210px;
}

.community-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        200deg,
        color-mix(in srgb, var(--color-one) 55%, transparent) 3%,
        color-mix(in srgb, var(--color-two) 45%, transparent) 26%,
    );
}

.community-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(48px);
    opacity: 0.55;
}

.community-hero-orb-1 {
    width: 280px;
    height: 280px;
    background: rgba(148, 61, 255, 0.45);
    top: -80px;
    right: 8%;
}

.community-hero-orb-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.35);
    bottom: 40px;
    left: 12%;
}

.community-hero-orb-3 {
    width: 160px;
    height: 160px;
    background: rgba(124, 58, 237, 0.4);
    top: 30%;
    left: 45%;
}

.community-hero-inner {
    position: relative;
    z-index: 1;
}

.community-hero-breadcrumb .breadcrumb-item a,
.community-hero-breadcrumb .breadcrumb-item.active {
    font-size: 15px;
    font-weight: 500;
    color: rgba(32, 31, 34, 0.85);
}

.community-hero-breadcrumb .breadcrumb-item.active {
    color: #201f22;
}

.community-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(32, 31, 34, 0.55);
}

.community-hero-title {
    margin: 12px 0 0;
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    color: #201f22;
    font-family: "Euclid Circular A", system-ui, sans-serif;
    line-height: 1.15;
}

.community-hero-subtitle {
    margin: 10px 0 0;
    max-width: 640px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(32, 31, 34, 0.72);
}

.community-hero-desc {
    margin: 8px 0 0;
    max-width: 560px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(32, 31, 34, 0.65);
}

.community-hero-topic-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.community-hero-topic-main {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    min-width: 0;
    flex: 1;
}

.community-hero-avatar {
    width: 80px;
    height: 80px;
    font-size: 30px;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 12px 32px rgba(100, 100, 111, 0.25);
}

.community-hero-topic-text {
    min-width: 0;
    padding-bottom: 4px;
}

.community-hero-topic-actions {
    flex-shrink: 0;
    padding-bottom: 6px;
}

.community-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    background: #fff;
    color: #201f22;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(100, 100, 111, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.community-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(100, 100, 111, 0.28);
    color: var(--color-one);
}

/* ----- Floating stage (eNtery-item overlap) ----- */
.community-floating-stage {
    position: relative;
    z-index: 5;
    margin-top: -165px;
}

.community-floating-stage .reddit-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.reddit-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.reddit-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 312px;
    gap: 24px;
    align-items: start;
}

/* ----- Sidebars ----- */
.reddit-sidebar {
    position: sticky;
    top: 168px;
}

.reddit-nav-card {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reddit-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(100, 100, 111, 0.18), 0 4px 12px rgba(148, 61, 255, 0.1);
}

.reddit-nav-card-head {
    padding: 12px 16px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #878a8c;
}

.reddit-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #1a1a1b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: background 0.15s ease;
}

.reddit-nav-item:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.reddit-nav-item.is-active {
    background: #f6f7f8;
    border-left-color: var(--color-one);
    font-weight: 600;
}

.reddit-nav-item i {
    width: 20px;
    text-align: center;
    color: #878a8c;
}

.reddit-nav-item.is-active i {
    color: var(--color-one);
}

.reddit-topic-list {
    padding: 4px 0 8px;
}

.reddit-topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #1a1a1b;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

.reddit-topic-item:hover,
.reddit-topic-item.is-active {
    background: #f6f7f8;
    color: var(--color-one);
}

.reddit-topic-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-one) 0%, var(--color-four) 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.reddit-topic-icon-lg {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.reddit-topic-icon-xl {
    width: 56px;
    height: 56px;
    font-size: 22px;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.reddit-topic-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- Widgets (sidebar direita) ----- */
.reddit-widget {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reddit-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(100, 100, 111, 0.18), 0 4px 12px rgba(148, 61, 255, 0.1);
}

.reddit-widget.reddit-widget-about {
    overflow: visible;
}

.reddit-widget-banner {
    height: 48px;
    background: linear-gradient(90deg, var(--color-one) 0%, var(--color-four) 50%, var(--color-three) 100%);
}

.reddit-widget-body {
    padding: 12px;
}

.reddit-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1b;
}

.reddit-widget-subtitle {
    font-size: 12px;
    color: #787c7e;
    margin: 0;
}

.reddit-widget-heading {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1b;
}

.reddit-widget-text {
    font-size: 13px;
    color: #1a1a1b;
    line-height: 1.5;
}

.reddit-widget-topic-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.reddit-widget-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-five);
}

.reddit-widget-stats strong {
    display: block;
    font-size: 16px;
    color: #1a1a1b;
}

.reddit-widget-stats span {
    font-size: 12px;
    color: #787c7e;
}

.reddit-rules-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #1a1a1b;
    line-height: 1.6;
}

.reddit-popular-topics li + li {
    margin-top: 8px;
}

.reddit-popular-topics a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1a1a1b;
    text-decoration: none;
    font-weight: 500;
}

.reddit-popular-topics a:hover {
    color: var(--color-one);
}

.reddit-recent-posts .reddit-recent-post-item + .reddit-recent-post-item {
    margin-top: 12px;
}

.reddit-recent-posts a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.reddit-recent-posts a:hover .reddit-recent-post-title {
    color: var(--color-one);
}

.reddit-recent-post-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1b;
    line-height: 1.4;
}

.reddit-recent-post-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #787c7e;
}

.reddit-recent-post-empty {
    font-size: 13px;
    color: #787c7e;
}

/* ----- Community banner (legacy � mantido para compat.) ----- */
.reddit-community-banner {
    position: relative;
    margin-bottom: 16px;
}

.reddit-community-banner-bg {
    height: 88px;
    background: linear-gradient(90deg, var(--color-one) 0%, var(--color-four) 40%, var(--color-four) 100%);
}

.reddit-community-banner-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: -32px;
    position: relative;
    z-index: 1;
}

.reddit-community-identity {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.reddit-community-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1b;
}

.reddit-community-title {
    font-size: 14px;
    color: #787c7e;
    margin: 4px 0 0;
}

/* ----- Subreddit header (topic page) ----- */
.reddit-subreddit-header {
    background: #fff;
    border-bottom: 1px solid #ccc;
    margin-bottom: 0;
}

.reddit-subreddit-header-cover {
    height: 112px;
    background: linear-gradient(105deg, var(--color-one) 0%, var(--color-four) 45%, var(--color-four) 100%);
}

.reddit-subreddit-header-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 16px;
    flex-wrap: wrap;
}

.reddit-subreddit-header-main {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.reddit-subreddit-avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
    margin-top: -36px;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.reddit-subreddit-titles {
    min-width: 0;
    padding-bottom: 4px;
}

.reddit-subreddit-name {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: #1a1a1b;
    line-height: 1.2;
    word-break: break-word;
}

.reddit-subreddit-label {
    font-size: 14px;
    color: #787c7e;
    margin: 4px 0 0;
    line-height: 1.4;
}

.reddit-subreddit-header-actions {
    flex-shrink: 0;
    padding-bottom: 8px;
}

.reddit-subreddit-header-actions .reddit-btn {
    white-space: nowrap;
}

/* ----- Widget about topic (sidebar direita) ----- */
.reddit-widget-about {
    overflow: visible;
}

.reddit-widget-cover {
    height: 64px;
    background: linear-gradient(105deg, var(--color-one) 0%, var(--color-four) 50%, var(--color-four) 100%);
    border-radius: 20px 20px 0 0;
}

.reddit-widget-identity {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.reddit-widget-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
    margin-top: -22px;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.reddit-widget-identity-text {
    min-width: 0;
    padding-top: 6px;
}

.reddit-widget-about .reddit-widget-body {
    padding: 0 12px 12px;
}

/* legacy widget banner alias */
.reddit-widget-banner {
    height: 64px;
    background: linear-gradient(105deg, var(--color-one) 0%, var(--color-four) 50%, var(--color-four) 100%);
}

.reddit-widget-topic-row .reddit-topic-icon-lg {
    margin-top: -22px;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* ----- Feed ----- */
.reddit-feed-header {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 10px;
}

.reddit-feed-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1b;
}

.reddit-feed-subtitle {
    font-size: 14px;
    color: #787c7e;
    margin: 0;
}

.reddit-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(32, 31, 34, 0.55);
    margin: 0 0 14px;
    padding: 0 6px;
}

/* ----- Composer ----- */
.reddit-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 12px 16px;
    margin-bottom: 16px;
    cursor: pointer;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.15s ease;
}

.reddit-composer:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 61, 255, 0.35);
    box-shadow: 0 16px 40px rgba(100, 100, 111, 0.18), 0 4px 16px rgba(148, 61, 255, 0.12);
}

.reddit-composer-guest {
    cursor: default;
}

.reddit-composer-guest:hover {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14);
    transform: none;
}

.reddit-composer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-five);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-one);
    font-size: 14px;
}

.reddit-composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reddit-composer-input {
    flex: 1;
    background: #f6f7f8;
    border: 1px solid var(--color-five);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    color: #878a8c;
    text-decoration: none;
}

.reddit-composer-actions {
    display: flex;
    gap: 12px;
    color: #878a8c;
    font-size: 18px;
}

/* ----- Sort bar ----- */
.reddit-sort-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 8px;
    margin-bottom: 10px;
}

.reddit-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #878a8c;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.reddit-sort-btn:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.reddit-sort-btn.is-active {
    background: #fff;
    color: var(--color-one);
    box-shadow: 0 4px 14px rgba(148, 61, 255, 0.18);
}

/* ----- Post card ----- */
.reddit-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reddit-post {
    display: flex;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reddit-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(100, 100, 111, 0.2), 0 6px 16px rgba(148, 61, 255, 0.1);
}

.reddit-post-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48px;
    padding: 12px 6px;
    background: linear-gradient(180deg, #faf8ff 0%, #f3f0ff 100%);
    flex-shrink: 0;
    border-right: 1px solid rgba(148, 61, 255, 0.08);
}

.reddit-vote-btn {
    border: none;
    background: transparent;
    color: #878a8c;
    padding: 4px 2px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}

.reddit-vote-btn:not(:disabled):hover {
    background: #e9ecef;
}

.reddit-vote-btn:not(:disabled):hover.reddit-like-btn,
.reddit-vote-btn.is-active.reddit-like-btn {
    color: #e53935;
}

.reddit-score {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1b;
    padding: 4px 0 0;
    min-height: 18px;
    line-height: 1.2;
}

.reddit-post-main {
    flex: 1;
    min-width: 0;
    padding: 12px 14px 8px;
}

.reddit-post-author-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.reddit-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-one);
    font-size: 15px;
    border: 1px solid rgba(148, 61, 255, 0.12);
}

.reddit-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reddit-post-author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-top: 2px;
}

.reddit-post-author-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1b;
    line-height: 1.25;
}

.reddit-post-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    font-size: 12px;
    color: #787c7e;
    line-height: 1.3;
}

.reddit-post-time {
    color: #787c7e;
}

.reddit-post-topic-link {
    color: #787c7e;
    font-weight: 600;
    text-decoration: none;
}

.reddit-post-topic-link:hover {
    color: var(--color-one);
    text-decoration: underline;
}

.reddit-post-content {
    min-width: 0;
}

.reddit-post-header {
    display: none;
}

.reddit-post-subreddit {
    font-weight: 700;
    color: #1a1a1b;
    text-decoration: none;
}

.reddit-post-subreddit:hover {
    text-decoration: underline;
}

.reddit-post-author {
    display: none;
}

.reddit-post-dot {
    display: inline-block;
    margin: 0 0.35em;
    color: #787c7e;
    font-size: 0;
    line-height: 1;
    vertical-align: middle;
    speak: never;
}

.reddit-post-dot::before {
    content: '\00b7';
    font-size: 14px;
    line-height: 1;
}

.reddit-post-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
}

.reddit-post-title-link {
    color: #1a1a1b;
    text-decoration: none;
}

.reddit-post-title-link:hover {
    color: var(--color-one);
}

.reddit-post-body {
    font-size: 14px;
    color: #1a1a1b;
    line-height: 1.5;
    margin-bottom: 8px;
    word-break: break-word;
}

.reddit-post-body p {
    margin: 0 0 0.75em;
}

.reddit-post-body p:last-child {
    margin-bottom: 0;
}

.reddit-post-body ul,
.reddit-post-body ol {
    margin: 0 0 0.75em;
    padding-left: 1.4em;
}

.reddit-post-body a {
    color: var(--color-one, #0079d3);
    text-decoration: underline;
}

.reddit-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.reddit-post-body--feed {
    margin-top: 4px;
}

.reddit-post-body a,
.reddit-post-media-wrap,
.reddit-link-preview {
    position: relative;
    z-index: 2;
}

#communityCreatePostModal .note-editor.note-frame {
    border: 1px solid #edeff1;
    border-radius: 8px;
    overflow: hidden;
}

#communityCreatePostModal .note-editor.note-frame .note-editing-area .note-editable {
    background: #fff;
    min-height: 140px;
}

#communityCreatePostModal .note-toolbar {
    background: #f6f7f8;
    border-bottom: 1px solid #edeff1;
}

#communityCreatePostModal .modal-body {
    overflow: visible;
}

#communityCreatePostModal .note-dropdown-menu,
#communityCreatePostModal .note-popover {
    z-index: 1060;
}

/* Summernote dialogs (Insert Link etc.) must sit above Bootstrap modal (1055) */
body.modal-open .note-modal {
    z-index: 2000 !important;
}

body.modal-open .note-modal .modal {
    z-index: 2001 !important;
}

body.modal-open .note-modal-backdrop {
    z-index: 1990 !important;
}

body.modal-open .note-popover,
body.modal-open .note-dropdown-menu {
    z-index: 2010 !important;
}

.reddit-post-text {
    font-size: 14px;
    line-height: 1.5;
    color: #1a1a1b;
    white-space: pre-wrap;
    word-break: break-word;
}

.reddit-read-more {
    border: none;
    background: none;
    color: var(--color-one);
    font-size: 13px;
    font-weight: 600;
    padding: 0;
    margin-top: 4px;
    cursor: pointer;
}

.reddit-link-preview {
    display: block;
    border: 1px solid #ced0d4;
    border-radius: 12px;
    margin-bottom: 8px;
    text-decoration: none;
    background: #f0f2f5;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reddit-link-preview--facebook {
    background: #f0f2f5;
}

.reddit-link-preview--static {
    cursor: default;
    pointer-events: none;
}

.reddit-link-preview-media {
    position: relative;
    background: #e4e6eb;
    border-bottom: 1px solid #ced0d4;
}

.reddit-link-preview-media--video .reddit-link-preview-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.reddit-link-preview-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e4e6eb 100%);
    border-bottom: 1px solid #ced0d4;
    color: #65676b;
    font-size: 28px;
}

.reddit-link-preview--embed:hover .reddit-link-preview-media--video .reddit-link-preview-play {
    background: rgba(0, 0, 0, 0.38);
}

.reddit-link-preview-image {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
    background: #e4e6eb;
}

.reddit-link-preview-content {
    padding: 10px 12px 12px;
    background: #f0f2f5;
}

.reddit-link-preview:hover {
    border-color: var(--color-one);
    box-shadow: 0 2px 8px rgba(148, 61, 255, 0.08);
}

.reddit-link-preview--static:hover {
    border-color: #ced0d4;
    box-shadow: none;
}

.reddit-link-domain {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #65676b;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.reddit-link-preview-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #050505;
    margin-bottom: 4px;
}

.reddit-link-preview-desc {
    font-size: 13px;
    line-height: 1.35;
    color: #65676b;
    margin: 0;
}

.reddit-link-preview p {
    font-size: 13px;
    color: #1a1a1b;
    margin: 0;
    padding: 0 12px 10px;
}

.community-link-preview-host {
    margin-top: 4px;
}

.community-link-preview-loading,
.community-link-preview-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #787c7e;
    text-align: center;
    border: 1px dashed #d7dadc;
    border-radius: 12px;
    background: #fafafa;
}

.reddit-post-media-wrap {
    margin-bottom: 8px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-five);
    max-height: 512px;
}

.reddit-media-lightbox {
    display: block;
    text-decoration: none;
    color: inherit;
}

.reddit-video-poster {
    position: relative;
    display: block;
    background: #000;
}

.reddit-video-thumb {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 512px;
    pointer-events: none;
}

.reddit-video-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    transition: background 0.15s ease;
}

.reddit-video-play-btn i {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.reddit-video-lightbox:hover .reddit-video-play-btn {
    background: rgba(0, 0, 0, 0.38);
}

.reddit-post-media {
    width: 100%;
    display: block;
    object-fit: cover;
}

.reddit-post-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.reddit-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 6px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #878a8c;
    cursor: pointer;
}

.reddit-action-btn:not(:disabled):hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

/* ----- Community list (home) ----- */
.reddit-community-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reddit-community-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reddit-community-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(100, 100, 111, 0.2), 0 6px 16px rgba(148, 61, 255, 0.1);
    color: inherit;
}

.reddit-community-row-body {
    flex: 1;
    min-width: 0;
}

.reddit-community-row-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #1a1a1b;
}

.reddit-community-row-title {
    font-size: 13px;
    color: #787c7e;
    margin: 0 0 4px;
}

.reddit-community-row-desc {
    font-size: 12px;
    color: #878a8c;
    margin: 0 0 4px;
    line-height: 1.4;
}

.reddit-community-row-meta {
    font-size: 12px;
    color: #878a8c;
}

.reddit-community-row-join {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-one);
    flex-shrink: 0;
}

/* ----- Buttons ----- */
.reddit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

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

.reddit-btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}

.reddit-btn-outline-light {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.reddit-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ----- Empty states ----- */
.reddit-empty {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 56px 28px;
    text-align: center;
    color: #787c7e;
    box-shadow: 0 10px 32px rgba(100, 100, 111, 0.14), 0 2px 8px rgba(148, 61, 255, 0.06);
}

.reddit-empty i {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 12px;
}

.reddit-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1b;
    margin: 0 0 8px;
}

.reddit-empty p {
    margin: 0 0 16px;
    font-size: 14px;
}

/* ----- Modal Reddit style ----- */
.reddit-modal .modal-content {
    border-radius: 8px;
    border: none;
}

.reddit-modal .modal-header {
    border-bottom: 1px solid var(--color-five);
    padding: 16px 20px;
}

.reddit-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
}

.reddit-modal .modal-body {
    padding: 16px 20px 20px;
}

.reddit-modal .modal-footer {
    border-top: 1px solid var(--color-five);
    padding: 12px 20px;
}

.community-modal-section {
    margin-bottom: 18px;
}

/* ----- Post type tabs (segmented) ----- */
.reddit-post-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    margin-bottom: 20px;
    background: #f4f5f7;
    border: 1px solid var(--color-five);
    border-radius: 14px;
}

.reddit-post-type-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    border: none;
    background: transparent;
    padding: 11px 10px;
    font-size: 13px;
    font-weight: 600;
    color: #787c7e;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.reddit-post-type-tab i {
    font-size: 15px;
}

.reddit-post-type-tab:hover:not(.is-active):not(:disabled) {
    color: #1a1a1b;
    background: rgba(255, 255, 255, 0.65);
}

.reddit-post-type-tab.is-active {
    color: var(--color-one);
    background: #fff;
    box-shadow: 0 2px 10px rgba(100, 100, 111, 0.12);
}

.reddit-post-type-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.community-tab-pane {
    animation: communityPaneIn 0.18s ease;
}

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

/* ----- Topic picker (searchable combobox) ----- */
.community-topic-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1b;
    margin-bottom: 8px;
}

.community-topic-picker-control {
    position: relative;
}

.community-topic-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.community-topic-input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-one);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.community-topic-search {
    min-height: 46px;
    padding: 10px 42px 10px 40px;
    border: 1px solid #d7dadc;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* ----- Modal form fields (title, body, link) ----- */
.community-modal-input {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d7dadc;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.community-modal-input:focus {
    border-color: var(--color-one);
    box-shadow: 0 0 0 3px rgba(148, 61, 255, 0.12);
}

.community-modal-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.community-modal-input--title {
    font-size: 16px;
    font-weight: 600;
}

.community-modal-input--body {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

.community-modal-input--file {
    padding: 10px 14px;
    border: 1px solid #d7dadc;
    border-radius: 12px;
    background: #fff;
}

.community-topic-search:focus {
    border-color: var(--color-one);
    box-shadow: 0 0 0 3px rgba(148, 61, 255, 0.12);
}

.community-topic-picker-control.is-open .community-topic-search,
.community-topic-picker-control.is-invalid .community-topic-search {
    border-color: var(--color-one);
}

.community-topic-picker-control.is-invalid .community-topic-search {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.community-topic-clear {
    position: absolute;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #f1f3f5;
    color: #787c7e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.community-topic-clear:hover {
    background: #e9ecef;
    color: #1a1a1b;
}

.community-topic-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--color-five);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(100, 100, 111, 0.18);
}

.community-topic-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

.community-topic-option:hover,
.community-topic-option.is-highlighted {
    background: #f6f0ff;
}

.community-topic-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    color: var(--color-one);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.community-topic-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.community-topic-option-text strong {
    font-size: 13px;
    color: #1a1a1b;
    line-height: 1.2;
}

.community-topic-option-text span {
    font-size: 12px;
    color: #787c7e;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-topic-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #787c7e;
    text-align: center;
}

.community-topic-loading {
    padding: 14px 12px;
    font-size: 13px;
    color: #787c7e;
    text-align: center;
}

.community-topic-hint {
    padding: 8px 12px 4px;
    font-size: 11px;
    color: #878a8c;
    text-align: center;
    border-top: 1px solid #f1f3f5;
    margin-top: 4px;
}

.community-topic-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-five);
    border-radius: 12px;
    background: #faf8ff;
}

.community-topic-locked-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    color: var(--color-one);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.community-topic-locked-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #787c7e;
}

.community-topic-locked-value {
    display: block;
    font-size: 14px;
    color: #1a1a1b;
}

.community-topic-locked-name {
    display: block;
    font-size: 12px;
    color: #787c7e;
}

/* Legacy alias � mantido para compatibilidade */
.reddit-input-title {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d7dadc;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
}

.reddit-input-title:focus {
    border-color: var(--color-one);
    box-shadow: 0 0 0 3px rgba(148, 61, 255, 0.12);
}

#community-create-post-form textarea.community-modal-input {
    min-height: 160px;
    padding: 10px 14px;
    border: 1px solid #d7dadc;
    border-radius: 12px;
    resize: vertical;
    line-height: 1.5;
    background: #fff;
}

#community-create-post-form textarea.community-modal-input:focus {
    border-color: var(--color-one);
    box-shadow: 0 0 0 3px rgba(148, 61, 255, 0.12);
}

#community-create-post-form textarea.community-modal-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.reddit-vote-btn.is-guest {
    cursor: pointer;
    opacity: 0.85;
}

.reddit-toggle-comments.is-open {
    color: var(--color-one);
    background: #f3e8ff;
}

/* ----- Top toolbar (floating filter � ebooks sidebar style) ----- */
.reddit-top-toolbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 14px 40px rgba(100, 100, 111, 0.18), 0 4px 12px rgba(148, 61, 255, 0.08);
}

.reddit-top-toolbar-inner {
    max-width: none;
    margin: 0;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reddit-top-toolbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.reddit-top-toolbar-nav::-webkit-scrollbar {
    display: none;
}

.reddit-top-toolbar-left,
.reddit-top-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.reddit-top-toolbar-actions {
    gap: 8px;
    flex-shrink: 0;
}

.reddit-toolbar-divider-nav {
    margin: 0 4px;
    flex-shrink: 0;
}

.reddit-sort-bar-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-bottom: 0;
    border: none;
    background: rgba(254, 253, 255, 0.65);
    border-radius: 14px;
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(148, 61, 255, 0.06);
}

.reddit-sort-bar-inline .reddit-sort-btn {
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 12px;
}

.reddit-sort-bar-inline .reddit-sort-btn span {
    line-height: 1;
}

.reddit-top-toolbar-nav .reddit-toolbar-btn,
.reddit-top-toolbar-nav .reddit-sort-btn,
.reddit-top-toolbar-nav .reddit-toolbar-topic {
    height: 36px;
    box-sizing: border-box;
}

.reddit-top-toolbar-nav .reddit-toolbar-topic {
    display: inline-flex;
    align-items: center;
}

/* Search (toolbar direita) */
.reddit-search-form {
    width: 180px;
    flex-shrink: 0;
}

.reddit-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f7f8;
    border: 1px solid var(--color-five);
    border-radius: 20px;
    padding: 0 12px;
    min-height: 36px;
}

.reddit-search-wrap:focus-within {
    border-color: var(--color-one);
    background: #fff;
}

.reddit-search-wrap i.fa-magnifying-glass {
    color: #878a8c;
    font-size: 13px;
}

.reddit-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1a1a1b;
    min-width: 0;
    outline: none;
}

.reddit-search-clear {
    color: #878a8c;
    text-decoration: none;
    line-height: 1;
}

.reddit-search-clear:hover {
    color: var(--color-one);
}

.reddit-notifications {
    position: relative;
}

.reddit-notifications-btn {
    position: relative;
}

.reddit-notifications-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #ff4500;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.reddit-notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(100, 100, 111, 0.22);
    z-index: 200;
    overflow: hidden;
}

.reddit-notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-five);
    font-size: 14px;
}

.reddit-notifications-mark-all {
    border: none;
    background: none;
    color: var(--color-one);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.reddit-notifications-list {
    max-height: 320px;
    overflow-y: auto;
}

.reddit-notification-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-five);
    text-decoration: none;
    color: #1a1a1b;
    font-size: 13px;
    line-height: 1.4;
}

.reddit-notification-item:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.reddit-notification-item.is-unread {
    background: #f3e8ff;
}

.reddit-notification-item time {
    display: block;
    font-size: 11px;
    color: #878a8c;
    margin-top: 4px;
}

.reddit-notifications-empty {
    padding: 24px 14px;
    text-align: center;
    color: #878a8c;
    font-size: 13px;
}

/* ----- Comments inline ----- */

.reddit-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: #1a1a1b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.reddit-toolbar-btn:hover {
    background: #f6f7f8;
    color: #1a1a1b;
}

.reddit-toolbar-btn.is-active {
    background: #fff;
    color: var(--color-one);
    box-shadow: 0 4px 14px rgba(148, 61, 255, 0.15);
}

.reddit-toolbar-btn-primary {
    background: var(--color-one);
    color: #fff !important;
}

.reddit-toolbar-btn-primary:hover {
    opacity: 0.92;
    background: var(--color-one);
}

.reddit-toolbar-create-post {
    white-space: nowrap;
    flex-shrink: 0;
}

.reddit-toolbar-create-post span {
    line-height: 1;
}

.reddit-toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--color-five);
}

.reddit-toolbar-topic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1a1a1b;
    text-decoration: none;
    font-size: 14px;
}

.reddit-toolbar-topic:hover {
    color: var(--color-one);
}

.reddit-topic-icon-sm {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

/* ----- Comments inline ----- */
.reddit-comments-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-five);
}

.reddit-comments-loader {
    text-align: center;
    padding: 16px;
    color: #878a8c;
    font-size: 13px;
}

.reddit-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    max-height: 480px;
    overflow-y: auto;
}

.reddit-comments-empty {
    font-size: 13px;
    color: #878a8c;
    padding: 8px 0 12px;
}

.reddit-comment {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.reddit-comment-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding-top: 4px;
}

.reddit-comment-vote-btn {
    border: none;
    background: none;
    padding: 0;
    width: 24px;
    height: 22px;
    color: #878a8c;
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
}

.reddit-comment-vote-btn:hover,
.reddit-comment-vote-btn.is-active.reddit-comment-like {
    color: #e53935;
}

.reddit-comment-score {
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1b;
    min-width: 16px;
    text-align: center;
    margin-top: 2px;
}

.reddit-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-one), var(--color-four));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reddit-comment-body {
    flex: 1;
    min-width: 0;
    background: #f6f7f8;
    border-radius: 4px;
    padding: 8px 12px;
}

.reddit-comment-meta {
    font-size: 12px;
    color: #787c7e;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.reddit-comment-meta strong {
    color: #1a1a1b;
}

.reddit-comment-text {
    font-size: 14px;
    color: #1a1a1b;
    line-height: 1.5;
    word-break: break-word;
}

.reddit-comment-form textarea {
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.reddit-comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.reddit-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.reddit-comment-guest {
    font-size: 13px;
    color: #787c7e;
    padding: 8px 0;
}

.reddit-comment-guest a {
    color: var(--color-one);
    font-weight: 600;
}

.reddit-comment-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.reddit-comment-reply-btn,
.reddit-comment-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: #878a8c;
    cursor: pointer;
    min-height: 20px;
}

.reddit-comment-reply-btn:hover {
    color: var(--color-one);
}

.reddit-comment-delete-btn:hover {
    color: #ea0027;
}

.reddit-delete-post:hover {
    color: #ea0027;
}

.reddit-comment-replies {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid var(--color-five);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reddit-comment-thread-more {
    margin-top: 8px;
}

.reddit-comment-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    padding: 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-one);
    cursor: pointer;
}

.reddit-comment-expand-btn:hover {
    color: var(--color-four);
    text-decoration: underline;
}

.reddit-comment-expand-count {
    font-weight: 500;
    color: #787c7e;
}

.reddit-comment[data-depth="4"] .reddit-comment-replies,
.reddit-comment[data-depth="5"] .reddit-comment-replies,
.reddit-comment[data-depth="6"] .reddit-comment-replies,
.reddit-comment[data-depth="7"] .reddit-comment-replies,
.reddit-comment[data-depth="8"] .reddit-comment-replies,
.reddit-comment[data-depth="9"] .reddit-comment-replies {
    padding-left: 12px;
}

.reddit-comment-avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.reddit-reply-form textarea {
    font-size: 13px;
}

.reddit-feed-loader {
    text-align: center;
    padding: 20px;
    color: #878a8c;
    font-size: 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 10px;
}

.reddit-pagination {
    margin-top: 16px;
}

.reddit-pagination .pagination {
    justify-content: center;
}

/* ----- Responsive ----- */
@media (max-width: 991px) {
    .community-hero {
        padding-bottom: 160px;
    }

    .community-hero-topic {
        padding-bottom: 175px;
    }

    .community-floating-stage {
        margin-top: -130px;
    }

    .community-hero-topic-row {
        flex-direction: column;
        align-items: stretch;
    }

    .community-hero-topic-actions {
        width: 100%;
        padding-bottom: 0;
    }

    .community-hero-btn {
        width: 100%;
    }

    .reddit-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .reddit-sidebar-left,
    .reddit-sidebar-right {
        display: none;
    }

    .reddit-sidebar {
        top: 140px;
    }

    .reddit-top-toolbar-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .reddit-top-toolbar-nav {
        order: 1;
        flex: 1 1 100%;
        width: 100%;
    }

    .reddit-top-toolbar-actions {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-end;
    }

    .reddit-search-form {
        flex: 1;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 575px) {
    .community-hero {
        padding: 20px 0 140px;
    }

    .community-floating-stage {
        margin-top: -110px;
    }

    .community-hero-avatar {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .reddit-post-vote {
        flex-direction: column;
        align-items: center;
        width: auto;
        min-width: 40px;
        padding: 8px 10px;
        border-bottom: 1px solid var(--color-five);
        border-right: none;
    }

    .reddit-post {
        flex-direction: column;
    }

    .reddit-composer-actions {
        display: none;
    }

    .reddit-post-type-tab span {
        display: none;
    }

    .reddit-post-type-tab {
        padding: 12px 8px;
    }
}

/* ─── Card clicável via Bootstrap stretched-link ─────────────────────────── */
.reddit-post {
    position: relative;
}

/* Zonas interativas ficam acima do overlay (z-index: 1) do stretched-link */
.reddit-post-vote,
.reddit-post-author-row,
.reddit-post-footer {
    position: relative;
    z-index: 2;
}

/* Link de ação (Comments) como <a> — mantém visual idêntico ao <button> */
a.reddit-action-btn {
    text-decoration: none;
    color: #878a8c;
}

a.reddit-action-btn:hover {
    color: #1a1a1b;
}
