/* === FEED (POSTS & COMMENTS) === */
.create-post-card {
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    position: relative;
    z-index: 10;
}

.create-post-card .input-with-counter textarea {
    width: 100%;
    min-height: 100px;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    padding-bottom: 32px;
    color: #fff;
    resize: vertical;
    margin-bottom: 0;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: pre-wrap;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.create-post-card textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.create-post-card textarea::placeholder,
.post-link-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.post-link-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: #fff;
    margin-bottom: 16px;
    font-size: 14px;
}

.create-post-card .input-with-counter {
    position: relative;
}

.create-post-card .input-with-counter .post-link-input {
    margin-bottom: 0;
    padding-bottom: 32px;
}

.create-post-card .input-with-counter .char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: var(--secondary);
    pointer-events: none;
    background: rgba(10, 10, 12, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
}

.post-link-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.post-link-preview {
    margin-top: -4px;
    margin-bottom: 14px;
}

.post-link-preview.hidden {
    display: none;
}

.link-preview-empty {
    padding: 10px 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--secondary);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.02);
}

.title-suggestion {
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.3s ease-out;
}

.title-suggestion.hidden {
    display: none;
}

.suggestion-label {
    color: var(--secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.suggestion-btn {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1.4;
}

.suggestion-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.suggestion-btn:active {
    transform: translateY(0);
}

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

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.post-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: border-color 0.2s;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-item:hover {
    border-color: var(--border-highlight);
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0px;
    font-size: 14px;
    gap: 12px;
}

.post-toggle {
    margin-left: 12px;
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--accent-cyan);
    line-height: 1.2;
}

.post-time {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 400;
    line-height: normal;
    display: inline-flex;
    align-items: center;
}

.author-link {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: opacity 0.2s;
    font-size: 14px;
    font-weight: 600;
}

.author-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.post-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.post-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    align-self: center;
    /* Clamp to 2 lines with fade effect */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

/* Fade effect for long titles using mask */
.post-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.4em;
    background: linear-gradient(to bottom, transparent 30%, var(--bg-card) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

/* Show fade when title is clamped (JS will add this class) */
.post-title.clamped::after {
    opacity: 1;
}

/* When post is expanded, show full title */
.post-item:has(.post-details:not(.hidden)) .post-title {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.post-item:has(.post-details:not(.hidden)) .post-title::after {
    display: none;
}

.post-title a,
a.post-title {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.post-title a:hover,
a.post-title:hover {
    text-decoration: underline;
}

.post-title-full {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
}

@media (max-width: 600px) {

    .post-title,
    .post-title-full {
        font-size: 16px;
    }
}

.post-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.post-meta {
    color: var(--secondary);
    font-size: 12px;
}

.post-body {
    font-size: 15px;
    color: var(--primary);
    line-height: 1.7;
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    overflow-x: hidden;
}

.post-embed-wrap {
    margin-bottom: 16px;
}

.post-preview {
    color: var(--secondary);
    font-size: 14px;
    line-height: 1.5;
}

.post-preview-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-toggle {
    flex-shrink: 0;
    height: 32px;
    min-width: 32px;
    width: 32px;
    padding: 0;
    align-self: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--secondary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-toggle:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

/* Tag styles */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .tag-chip {
        max-width: 160px;
    }
}

.tag-chip.clickable {
    cursor: pointer;
    transition: all 0.15s;
}

.tag-chip.clickable:hover {
    background: rgba(6, 182, 212, 0.25);
    border-color: var(--accent-cyan);
}

.tag-chip .tag-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.tag-chip .tag-remove:hover {
    opacity: 1;
}

.tag-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.filter-chip {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
}

.btn-clear-filters {
    padding: 6px 12px;
    font-size: 12px;
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-clear-filters:hover {
    background: rgba(6, 182, 212, 0.2);
}

.tag-input-container {
    position: relative;
    z-index: 30;
}

.tag-input-container input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag-hint {
    font-size: 12px;
    color: var(--secondary);
    margin-top: 4px;
}

/* Tag Autocomplete Dropdown */
.tag-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 2500;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tag-autocomplete-dropdown.hidden {
    display: none;
}

.tag-autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    color: #e0e0e0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-autocomplete-item:hover,
.tag-autocomplete-item.selected {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.tag-autocomplete-item .tag-count {
    font-size: 11px;
    color: var(--secondary);
    margin-left: 8px;
}

.post-meta-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    color: var(--secondary);
    font-size: 13px;
    overflow: hidden;
    position: relative;
}

/* On narrow screens, when post is EXPANDED, allow tags to flow to a new line */
@media (max-width: 600px) {

    /* When expanded, enable wrapping */
    .post-item:has(.post-details:not(.hidden)) .post-meta-line {
        flex-wrap: wrap;
        overflow: visible;
        row-gap: 8px;
    }

    /* When expanded, push tags to a new line */
    .post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container {
        flex-basis: 100%;
        width: 100%;
        margin-top: 4px;
        order: 10;
        overflow: visible;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    /* Hide the fade gradient when expanded on mobile */
    .post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container.has-more::after {
        display: none;
    }

    /* Show all tags when expanded */
    .post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container.has-more .tag-chip {
        display: inline-flex;
    }

    /* Hide ellipsis when expanded */
    .post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container.has-more .tags-ellipsis {
        display: none;
    }
}

.meta-like-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s;
    height: 28px;
    font-size: 12px;
    box-sizing: border-box;
}

.meta-like-count.liked {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    font-weight: 600;
}

.post-meta-line .tag-chip {
    margin: 0;
    font-size: 12px;
    flex-shrink: 0;
}

.post-meta-line .tags-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    flex-wrap: nowrap;
    padding-right: 40px;
    /* Space for fade gradient */
}

/* Fade-out gradient on the right edge - always visible when collapsed */
.post-meta-line .tags-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    z-index: 5;
}

/* Tags should not shrink */
.post-meta-line .tags-container .tag-chip {
    flex-shrink: 0;
}

/* Hide ellipsis - we use fade instead */
.post-meta-line .tags-ellipsis {
    display: none;
}

/* When post is EXPANDED, show all tags with wrapping */
.post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container {
    flex-wrap: wrap;
    overflow: visible;
    padding-right: 0;
}

/* Show full tag text when expanded */
.post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container .tag-chip {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
}

/* Hide fade gradient when expanded */
.post-item:has(.post-details:not(.hidden)) .post-meta-line .tags-container::after {
    display: none;
}

.post-details .post-tags-full {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.post-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.post-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.link-embed {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s;
    text-decoration: none;
}

.link-embed:hover {
    border-color: var(--border-highlight);
}

.link-embed-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.link-embed-video-player {
    width: 100%;
    max-height: 500px;
    display: block;
    background: #000;
}

.link-embed-youtube {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.youtube-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.youtube-embed-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.link-embed-meta {
    padding: 10px 14px;
}

.link-embed-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

.link-embed-content {
    padding: 12px 14px;
}

.link-embed-simple {
    padding: 12px 14px;
}

.link-embed-simple .link-embed-content {
    padding: 0;
}

.link-embed-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-embed-desc {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.link-embed-domain {
    font-size: 12px;
    color: var(--accent-cyan);
}

.post-link {
    margin-bottom: 12px;
}

.post-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-cyan);
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 6px;
    transition: background 0.2s;
}

.post-link a:hover {
    background: rgba(6, 182, 212, 0.2);
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

.btn-react {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    height: 28px;
    box-sizing: border-box;
}

.btn-react:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-react.liked {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    cursor: default;
}

.btn-react.liked .like-count {
    color: #22c55e;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.post-like-count-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary);
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 16px;
    transition: all 0.15s;
    height: 38px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.post-like-count-display.liked {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.btn-react.btn-like:not(.liked) {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-react.btn-like:not(.liked):hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Post meta-line Like button - cyan style */
.btn-react.btn-like-meta {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--accent-cyan);
    pointer-events: auto;
    user-select: none;
}

.btn-react.btn-like-meta:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
    color: #fff;
}

.comment-count {
    color: var(--secondary);
    font-size: 14px;
}

/* Standardized action container for meta line buttons */
.btn-action-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 28px;
    box-sizing: border-box;
}

.btn-action-container:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

/* Share button */
.btn-share {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-share svg {
    flex-shrink: 0;
}

.btn-share:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--accent-cyan);
}

/* Copied state animation */
.btn-share.copied,
.btn-action-container.copied,
.comment-share-btn.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
    animation: copiedPulse 0.3s ease-out;
}

@keyframes copiedPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.comment-share-btn,
.btn-icon-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.05);
}

.comment-share-btn svg {
    transition: stroke 0.15s;
}

.comment-share-btn:hover svg {
    stroke: var(--accent-cyan);
}

/* Comments */
.comments {
    margin-top: 24px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.comment-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 10px 6px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
}

.comment-author {
    font-weight: 600;
    color: var(--accent-cyan);
    display: flex;
    gap: 6px;
    align-items: center;
    line-height: 1.2;
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.comment-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.comment-ts {
    color: var(--secondary);
    font-size: 13px;
    font-weight: 400;
    line-height: normal;
    display: inline-flex;
    align-items: center;
}

.comment-body {
    color: var(--primary);
    line-height: 1.6;
    padding: 4px 0 2px 0;
    font-size: 14.5px;
}

.comment-body p {
    margin: 0.5em 0;
}

.comment-body p:first-child {
    margin-top: 0;
}

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

.comment-body em {
    font-style: italic;
}

.comment-body del {
    text-decoration: line-through;
    opacity: 0.7;
}

.comment-body blockquote {
    margin: 0.5em 0;
    padding-left: 10px;
    border-left: 3px solid var(--accent-cyan);
    color: var(--secondary);
    font-style: italic;
}

.comment-body ul {
    margin: 0.5em 0;
    padding-left: 18px;
}

.comment-body li {
    margin: 0.2em 0;
}

.comment-embed {
    margin-top: 8px;
}

.comment-embed img,
.comment-embed .link-embed-thumb {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    object-fit: contain;
}

.comment-embed-video {
    width: 100%;
    max-height: 400px;
    border-radius: var(--radius-sm);
    display: block;
    background: #000;
}

.comment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-like,
.comment-reply {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 28px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.btn-like-comment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    transition: all 0.15s;
    cursor: pointer;
    margin-right: 8px;
    height: 28px;
    box-sizing: border-box;
}

.btn-like-comment:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-like-comment.liked {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.comment-like-count-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    margin-right: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s;
    height: 28px;
    box-sizing: border-box;
}

.comment-like-count-display.liked {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.comment-like.btn-like:not(.liked) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.comment-like.btn-like:not(.liked):hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

.comment-like:hover,
.comment-reply:hover {
    border-color: var(--border-highlight);
    color: #fff;
}

.comment-minimize {
    opacity: 0.6;
}

.comment-minimize:hover {
    opacity: 1;
}

.comment-minimize .minimize-icon {
    font-size: 10px;
    transition: transform 0.15s;
    display: inline-block;
}

.comment-item.comment-minimized {
    opacity: 0.8;
    padding: 6px 10px 6px 20px;
}

.comment-children {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.reply-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.reply-form textarea {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 13px;
    resize: vertical;
    min-height: 56px;
    max-height: 200px;
}

.comment-form-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-form {
    flex: 1;
    min-width: 0;
    display: flex;
}

.comment-form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 80px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

/* New comment form wrapper structure */
.comment-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    width: 100%;
}

.comment-form-wrapper textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    overflow: hidden;
    min-height: 42px;
    transition: none !important;
}

.comment-form-wrapper textarea:focus {
    resize: vertical;
    overflow: auto;
}

.comment-form-wrapper textarea.expanded {
    min-height: 80px;
    max-height: 300px;
}

/* When not expanded, enforce the collapsed height */
.comment-form-wrapper textarea:not(.expanded) {
    min-height: 42px;
    max-height: 42px;
}

.comment-rte-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.comment-rte-toolbar.hidden {
    display: none;
}

.comment-rte-toolbar+textarea,
.comment-rte-toolbar+.comment-preview+.comment-input-row textarea {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.comment-rte-toolbar.hidden+textarea,
.comment-rte-toolbar.hidden+.comment-preview+.comment-input-row textarea {
    border-radius: var(--radius-sm);
}

.comment-form-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.comment-form-bottom.hidden {
    display: none;
}

/* Comment input row with inline sort */
.comment-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input-row textarea {
    flex: 1;
    min-width: 0;
}

.comment-input-row .inline-sort {
    flex-shrink: 0;
}

.comment-input-row .inline-sort.hidden {
    display: none;
}

/* Empty comments placeholder */
.empty-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--secondary);
    text-align: center;
    gap: 8px;
}

.empty-comments .empty-icon {
    font-size: 28px;
    opacity: 0.6;
}

.empty-comments .empty-text {
    font-size: 14px;
    font-weight: 500;
}


.comment-rte-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.comment-rte-toolbar .rte-spacer {
    flex: 1;
}

.comment-rte-toolbar .rte-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.12s ease;
    text-decoration: none;
}

.comment-rte-toolbar .rte-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border-subtle);
}

.comment-rte-toolbar .rte-btn-italic {
    font-style: italic;
}

.comment-rte-toolbar .rte-btn-strike {
    text-decoration: line-through;
}

.comment-rte-toolbar .rte-btn-code {
    font-family: 'SF Mono', monospace;
    font-size: 11px;
}

.comment-rte-toolbar .rte-btn-preview {
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
}

.comment-rte-toolbar .rte-btn-preview.active {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.comment-rte-toolbar .rte-btn-help {
    font-weight: 700;
    color: var(--secondary);
}

/* Comment preview pane */
.comment-preview {
    padding: 12px 14px;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.comment-preview.hidden {
    display: none;
}

/* Consolidated Markdown Styles for Post Body, Comment Body, and Previews */
.post-body h2,
.comment-body h2,
.comment-preview h2,
.post-body h3,
.comment-body h3,
.comment-preview h3,
.post-body h4,
.comment-body h4,
.comment-preview h4 {
    margin: 1.2em 0 0.6em;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    clear: both;
}

.post-body h2,
.comment-body h2,
.comment-preview h2 {
    font-size: 1.6em;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.3em;
}

.post-body h3,
.comment-body h3,
.comment-preview h3 {
    font-size: 1.35em;
}

.post-body h4,
.comment-body h4,
.comment-preview h4 {
    font-size: 1.15em;
    color: var(--secondary);
}

.post-body strong,
.comment-body strong,
.comment-preview strong {
    font-weight: 700;
    color: #fff;
}

.post-body em,
.comment-body em,
.comment-preview em {
    font-style: italic;
    opacity: 0.9;
}

.post-body del,
.comment-body del,
.comment-preview del {
    text-decoration: line-through;
    opacity: 0.6;
}

.post-body code,
.comment-body code,
.comment-preview code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-pink);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.post-body a,
.comment-body a,
.comment-preview a {
    color: var(--accent-cyan);
    text-decoration: none;
    border-bottom: 1px dashed rgba(6, 182, 212, 0.4);
    transition: all 0.2s;
}

.post-body a:hover,
.comment-body a:hover,
.comment-preview a:hover {
    color: #fff;
    border-bottom-color: #fff;
    background: rgba(6, 182, 212, 0.1);
}

.post-body blockquote,
.comment-body blockquote,
.comment-preview blockquote {
    margin: 1em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid var(--accent-cyan);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
    color: var(--secondary);
    font-style: italic;
}

.post-body ul,
.comment-body ul,
.comment-preview ul {
    margin: 1em 0;
    padding-left: 1.5em;
}

.post-body li,
.comment-body li,
.comment-preview li {
    margin: 0.5em 0;
}

.post-body p,
.comment-body p,
.comment-preview p {
    margin-bottom: 1em;
}

/* Guest login prompt for non-logged-in users */
.comment-form-row.guest-prompt {
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
}

.guest-login-prompt {
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    transition: all 0.2s;
}

.guest-login-prompt:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--accent-cyan);
    color: #fff;
}

.toast-bubble {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    max-width: 90vw;
    pointer-events: none;
}

.toast-bubble.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast-bubble.toast-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.toast-bubble.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
    border: 1px solid rgba(248, 113, 113, 0.3);
}

/* Image lightbox modal */
.image-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.image-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    -webkit-tap-highlight-color: transparent;
}

.image-modal-img {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.image-modal-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.image-modal-fallback {
    color: #fff;
    text-align: center;
    padding: 24px;
}

.image-modal-fallback a {
    color: var(--accent-cyan, #06b6d4);
}

/* Mobile styling for comments to prevent overlap */
@media (max-width: 600px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .comment-actions.comment-actions-inline {
        width: 100%;
        justify-content: flex-start;
        margin-top: 2px;
    }
}

/* ============================================================================
   Poll Builder & Display
   ============================================================================ */

/* Poll Toggle */
.poll-toggle-group {
    margin-top: 8px;
}

.btn-poll-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 13px;
}

.btn-poll-toggle:hover {
    color: var(--primary-text);
    background: rgba(255, 255, 255, 0.05);
}

.btn-poll-toggle .poll-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-poll-toggle:hover .poll-icon {
    opacity: 1;
}

/* Checked state handled by the sibling input */
input#poll-toggle:checked+.btn-poll-toggle {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    font-weight: 600;
}

input#poll-toggle:checked+.btn-poll-toggle .poll-icon {
    stroke: var(--accent-cyan);
    opacity: 1;
}

/* Poll Builder */
.poll-builder {
    margin-top: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-sm);
}

.poll-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.poll-builder-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poll-pax-cost {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--secondary);
}

.poll-pax-cost input {
    width: 50px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    text-align: center;
}

/* Poll Settings Row */
.poll-settings {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

/* Poll Duration Selector */
.poll-duration {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--secondary);
}

.poll-duration select {
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}

.poll-duration select:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.poll-duration select option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px;
}

/* Hide number input arrows */
.poll-pax-cost input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.poll-pax-cost input[type="number"]::-webkit-inner-spin-button,
.poll-pax-cost input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Poll Option Character Counter */
.poll-option-counter {
    font-size: 11px;
    color: var(--secondary);
    min-width: 32px;
    text-align: right;
}

/* Poll Time Remaining */
.poll-time-remaining {
    color: #fbbf24;
    font-weight: 500;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.poll-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.poll-option-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.poll-option-input:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

.poll-option-remove {
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-option-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.poll-add-option {
    align-self: flex-start;
}

/* Poll Display in Post */
.poll-display {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.poll-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.poll-display-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.poll-vote-count {
    font-size: 12px;
    color: var(--secondary);
}

.poll-option-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.poll-option-text {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

.poll-option-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.poll-star {
    font-size: 22px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    line-height: 1;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.poll-star:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.poll-star.active {
    background: var(--accent-cyan);
    color: #000;
    border-color: var(--accent-cyan);
    text-shadow: none;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.poll-star.readonly {
    cursor: default;
    pointer-events: none;
}

/* Poll display title row for info button */
.poll-display-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.poll-option-result {
    display: flex;
    align-items: center;
    gap: 8px;
}

.poll-result-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.poll-result-fill {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #4ade80);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.poll-result-stats {
    font-size: 12px;
    color: var(--secondary);
    min-width: 60px;
    text-align: right;
}

.poll-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.poll-cost-info {
    font-size: 13px;
    color: var(--secondary);
}

.poll-rating-box {
    font-size: 20px;
    font-weight: 700;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 8px;
    margin-right: 8px;
    flex-shrink: 0;
}

.poll-container:empty {
    display: none;
}

.poll-options {
    display: flex;
    flex-direction: column;
}

/* Modern Shake Error Animation */
@keyframes shake-error {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-4px) rotate(-2deg);
    }

    30% {
        transform: translateX(4px) rotate(2deg);
    }

    45% {
        transform: translateX(-2px) rotate(-1deg);
    }

    60% {
        transform: translateX(2px) rotate(1deg);
    }

    75% {
        transform: translateX(-1px);
    }
}

.flash-error {
    animation: shake-error 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2), 0 0 8px rgba(239, 68, 68, 0.15) !important;
    outline: none !important;
}

/* Poll Info Modal */
.poll-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.poll-info-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.poll-info-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.poll-info-content {
    position: relative;
    background: #121417;
    /* Deep dark bg */
    border: 1px solid rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.15);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
}

.poll-info-modal.visible .poll-info-content {
    transform: scale(1) translateY(0);
}

.poll-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.poll-info-title {
    color: var(--accent-cyan);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.poll-info-icon-lg {
    color: var(--accent-cyan);
}

.poll-info-body {
    color: var(--secondary-light, #ccc);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.poll-info-body ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.poll-info-body li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
}

.poll-info-body li::before {
    content: "•";
    color: var(--accent-cyan);
    position: absolute;
    left: 6px;
    font-weight: bold;
}

.poll-info-ok-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-cyan);
    color: #000;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.poll-info-ok-btn:hover {
    background: #22d3ee;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Button Refinement */
.btn-poll-info-trigger {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.btn-poll-info-trigger:hover {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
    transform: scale(1.1);
}

/* ============================================================================
   KP-004 FIX: Like buttons on narrow mobile screens
   Prevent text wrapping inside like/react buttons
   ============================================================================ */

/* Ensure like buttons never wrap internally */
.btn-react,
.btn-like-meta,
.post-like-count-display,
.comment-like-count-display,
.meta-like-count {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Very narrow screens: shrink buttons and adjust layout */
@media (max-width: 360px) {
    .btn-like-meta {
        padding: 4px 8px;
        font-size: 12px;
    }

    .post-like-count-display,
    .comment-like-count-display,
    .meta-like-count {
        padding: 4px 8px;
        font-size: 11px;
    }

    .btn-action-container {
        padding: 4px 6px;
        font-size: 11px;
    }

    /* Shrink post meta line gap on narrow screens */
    .post-meta-line {
        gap: 4px;
    }

    /* Hide tags container on very narrow screens to prioritize actions */
    .post-meta-line .tags-container {
        display: none;
    }

    /* Share button - hide text, keep icon */
    .btn-share span {
        display: none;
    }
}

/* Slightly narrow screens: reduce padding */
@media (max-width: 480px) {
    .post-meta-line {
        gap: 8px;
    }

    .btn-react,
    .btn-action-container {
        padding: 4px 8px;
    }
}

