/* ========================================
 * POST PAGE STYLES
 * Post Hero - Style 1: Centered
 * ======================================== */

/* ----------------------------------------
 * PAGE BACKGROUND - Remove hard edge from hero
 * ---------------------------------------- */
.site-main--post {
    position: relative;
}

/* ----------------------------------------
 * BASE STYLES
 * ---------------------------------------- */
.post-hero {
    position: relative;
    padding: var(--space-12) 0;
    overflow: visible;
}

/* Background layers */
.post-hero__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Extend gradient below hero */
    bottom: -200px;
    /* Fade out at bottom */
    mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    /* Allow clicks to pass through to elements below */
    pointer-events: none;
}

.post-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(20, 184, 166, 0.25) 0%,
        rgba(20, 184, 166, 0.12) 25%,
        transparent 50%,
        rgba(244, 165, 138, 0.15) 75%,
        rgba(244, 165, 138, 0.28) 100%
    );
}

[data-theme="dark"] .post-hero__gradient {
    background: linear-gradient(
        135deg,
        rgba(20, 184, 166, 0.15) 0%,
        rgba(20, 184, 166, 0.08) 25%,
        transparent 50%,
        rgba(244, 165, 138, 0.1) 75%,
        rgba(244, 165, 138, 0.18) 100%
    );
}

.post-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--color-border) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.4;
}

[data-theme="dark"] .post-hero__pattern {
    opacity: 0.15;
}

/* Content wrapper */
.post-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ----------------------------------------
 * BREADCRUMB
 * Uses shared .breadcrumb from components/breadcrumb.css
 * ---------------------------------------- */
.post-hero__breadcrumb {
    margin-bottom: var(--space-4);
}

/* ----------------------------------------
 * TITLE
 * ---------------------------------------- */
.post-hero__title {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    margin: 0 0 var(--space-4);
}

@media (min-width: 768px) {
    .post-hero__title {
        font-size: var(--text-4xl);
    }
}

@media (min-width: 1024px) {
    .post-hero__title {
        font-size: var(--text-5xl);
    }
}

/* ----------------------------------------
 * EXCERPT
 * ---------------------------------------- */
.post-hero__excerpt {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-6);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------
 * META INFO
 * ---------------------------------------- */
.post-hero__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

@media (min-width: 640px) {
    .post-hero__meta {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-6);
    }
}

/* Author */
.post-hero__author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.post-hero__author-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.post-hero__author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.post-hero__author-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    text-decoration: none;
}

.post-hero__author-name:hover {
    color: var(--color-primary);
}

.post-hero__author-role {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Details */
.post-hero__details {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

.post-hero__date,
.post-hero__updated,
.post-hero__reading-time,
.post-hero__views {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.post-hero__date i,
.post-hero__updated i,
.post-hero__reading-time i,
.post-hero__views i {
    font-size: var(--text-xs);
}

/* ----------------------------------------
 * RATING
 * ---------------------------------------- */
.post-hero__rating {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-top: var(--space-6);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.post-hero__rating:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-hero__stars {
    display: flex;
    gap: var(--space-1);
    color: var(--color-warning);
    font-size: var(--text-sm);
}

.post-hero__rating-score {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text);
}

.post-hero__rating-count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Empty rating state - no reviews yet */
.post-hero__rating--empty {
    gap: var(--space-2);
    color: var(--color-text-muted);
}

.post-hero__rating--empty i {
    font-size: var(--text-lg);
    color: var(--color-primary);
}

.post-hero__rating--empty .post-hero__rating-count {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ----------------------------------------
 * STYLE: CENTERED
 * ---------------------------------------- */
.post-hero--centered {
    padding: var(--space-16) 0;
}

/* ----------------------------------------
 * Responsive Adjustments
 * ---------------------------------------- */
@media (max-width: 767px) {
    .post-hero {
        padding: var(--space-8) 0;
    }

    .post-hero--centered {
        padding: var(--space-10) 0;
    }

    .post-hero__excerpt {
        font-size: var(--text-base);
    }
}

/* ========================================
 * POST FOOTER
 * Style 0: Recommended (Hashtags + Actions + Author)
 * ======================================== */

.post-footer--recommended {
    text-align: center;
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border-subtle);
}

/* Top Row: Tags (left) + Actions (right) - Card Style */
.post-footer__top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Tags Section - Simple inline style */
.post-footer__tags {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.post-footer__tags > i {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    flex-shrink: 0;
}

.post-footer__tags-label {
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.post-footer__tags-list {
    display: inline;
    color: var(--color-text-muted);
}

.post-footer__tags-list a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--duration-200) var(--ease-out);
}

.post-footer__tags-list a:hover {
    color: var(--color-primary);
}

.post-footer__tags-empty {
    font-style: italic;
    color: var(--color-text-muted);
}

/* Share Button - Simple style */
.post-footer__share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--duration-200) var(--ease-out),
                border-color var(--duration-200) var(--ease-out),
                background-color var(--duration-200) var(--ease-out),
                transform var(--duration-150) var(--ease-out);
    flex-shrink: 0;
}

.post-footer__share-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.post-footer__share-btn:active {
    transform: scale(0.95);
}

.post-footer__share-btn i {
    font-size: var(--text-sm);
}

/* Share button success state */
.post-footer__share-btn.is-copied {
    color: var(--color-success);
    border-color: var(--color-success);
    background-color: rgba(34, 197, 94, 0.1);
}

.post-footer__share-btn.is-copied i::before {
    content: "\f26e"; /* bi-check-lg */
}

/* Mobile: Stack vertically */
@media (max-width: 639px) {
    .post-footer__top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .post-footer__tags {
        flex-wrap: wrap;
    }

    .post-footer__share-btn {
        align-self: flex-end;
    }
}

/* Author Centered */
.post-footer__author-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--space-6);
    max-width: 500px;
    margin: 0 auto;
}

.post-footer--recommended .post-footer__author-label {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-3);
}

.post-footer__author-centered .post-footer__author-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-surface);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-3);
}

.post-footer__author-centered .post-footer__author-name {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text);
    text-decoration: none;
    margin-bottom: var(--space-1);
}

.post-footer__author-centered .post-footer__author-name:hover {
    color: var(--color-primary);
}

.post-footer__author-centered .post-footer__author-name i {
    color: var(--color-primary);
    font-size: var(--text-base);
}

.post-footer__author-centered .post-footer__author-role {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-3);
}

.post-footer__author-centered .post-footer__author-bio {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0 0 var(--space-4);
    text-align: center;
}

/* Social links - use shared .social-link from components/social-links.css */
.post-footer__author-centered .post-footer__author-social {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.post-footer__author-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--duration-200) var(--ease-out);
}

.post-footer__author-link:hover {
    gap: var(--space-2);
}

/* ========================================
 * SECTION DIVIDER
 * Divider between post-footer and comments
 * ======================================== */

.section-divider {
    padding: var(--space-8) 0;
}

.section-divider__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    max-width: 600px;
    margin: 0 auto;
}

.section-divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--color-border) 20%,
        var(--color-border) 80%,
        transparent
    );
}

.section-divider__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: var(--text-lg);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* ========================================
 * POST COMMENTS
 * Style 6: Featured (Rating Showcase + Expandable Form + Comments)
 * ======================================== */

.post-comments {
    padding: var(--space-8) 0 var(--space-12);
}

/* ----------------------------------------
 * STAR RATING
 * ---------------------------------------- */
.star-rating {
    display: inline-flex;
    gap: var(--space-1);
}

.star-rating__star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-text-subtle);
    font-size: var(--text-xl);
    transition: all var(--duration-150) var(--ease-out);
}

.star-rating__star.is-active {
    color: var(--color-warning);
    transform: scale(1.1);
}

/* Hover effect - all stars up to hovered one light up */
.star-rating__star.is-hover {
    color: var(--color-warning);
    opacity: 0.8;
    transform: scale(1.05);
}

/* Show filled star on hover */
.star-rating__star.is-hover i.bi-star::before {
    content: "\f586"; /* bi-star-fill */
}

.star-rating--xl .star-rating__star {
    font-size: var(--text-3xl);
}

/* Rating validation error */
.star-rating.has-error {
    animation: shake 0.4s ease-in-out;
}

.star-rating__error {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-error);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ----------------------------------------
 * RATING SHOWCASE - CENTERED
 * ---------------------------------------- */
.comment-showcase--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-8) var(--space-6);
    margin-bottom: var(--space-8);
    position: relative;
}

.comment-showcase__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1-5) var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    background-color: var(--color-surface);
    border: 1px solid var(--color-primary-light);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-showcase--centered:hover .comment-showcase__badge {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.comment-showcase__badge i {
    color: var(--color-warning);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
    }
}

.comment-showcase__score-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    background: conic-gradient(
        from 0deg,
        var(--color-primary) 0deg,
        var(--color-primary-hover) 120deg,
        var(--color-primary) 240deg,
        var(--color-primary-hover) 360deg
    );
    border-radius: var(--radius-full);
    box-shadow:
        0 8px 32px rgba(13, 115, 119, 0.3),
        0 0 0 4px rgba(13, 115, 119, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
    transition: all var(--duration-300) var(--ease-out);
}

.comment-showcase--centered:hover .comment-showcase__score-ring {
    transform: scale(1.08);
    box-shadow:
        0 12px 40px rgba(13, 115, 119, 0.4),
        0 0 0 6px rgba(13, 115, 119, 0.15),
        inset 0 0 30px rgba(255, 255, 255, 0.15);
}

.comment-showcase__score-ring::before {
    content: '';
    position: absolute;
    inset: 5px;
    background-color: var(--color-surface);
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-showcase__score-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(13, 115, 119, 0.15) 0%, transparent 70%);
    border-radius: var(--radius-full);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--duration-300) var(--ease-out);
    pointer-events: none;
}

.comment-showcase--centered:hover .comment-showcase__score-ring::after {
    opacity: 1;
}

/* Dark mode: Brighter glow */
[data-theme="dark"] .comment-showcase__score-ring::after {
    background: radial-gradient(circle, rgba(13, 115, 119, 0.2) 0%, transparent 70%);
}

.comment-showcase--centered .comment-showcase__score {
    position: relative;
    z-index: 1;
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    line-height: 1;
    transition: transform var(--duration-200) var(--ease-out);
}

.comment-showcase--centered:hover .comment-showcase__score {
    transform: scale(1.1);
}

.comment-showcase--centered .comment-showcase__stars {
    display: flex;
    justify-content: center;
    gap: var(--space-1);
    color: var(--color-warning);
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 1;
}

.comment-showcase--centered .comment-showcase__stars i {
    transition: transform var(--duration-200) var(--ease-out);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
}

.comment-showcase--centered:hover .comment-showcase__stars i:nth-child(1) { transform: translateY(-2px) rotate(-5deg); transition-delay: 0ms; }
.comment-showcase--centered:hover .comment-showcase__stars i:nth-child(2) { transform: translateY(-4px) rotate(-2deg); transition-delay: 30ms; }
.comment-showcase--centered:hover .comment-showcase__stars i:nth-child(3) { transform: translateY(-5px); transition-delay: 60ms; }
.comment-showcase--centered:hover .comment-showcase__stars i:nth-child(4) { transform: translateY(-4px) rotate(2deg); transition-delay: 90ms; }
.comment-showcase--centered:hover .comment-showcase__stars i:nth-child(5) { transform: translateY(-2px) rotate(5deg); transition-delay: 120ms; }

.comment-showcase__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.comment-showcase--centered .comment-showcase__count {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    transition: color var(--duration-200) var(--ease-out);
}

.comment-showcase--centered:hover .comment-showcase__count {
    color: var(--color-text);
}

.comment-showcase__separator {
    color: var(--color-text-subtle);
}

.comment-showcase__recommend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-success);
}

.comment-showcase__recommend i {
    font-size: var(--text-base);
}

/* ----------------------------------------
 * EXPANDABLE COMMENT FORM
 * ---------------------------------------- */
.comment-form--featured {
    max-width: 800px;
    margin: 0 auto var(--space-8);
}

/* Compact View */
.comment-form__compact {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding: var(--space-4);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-form__compact:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.comment-form__compact-top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.comment-form__compact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-primary-light);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.comment-form__compact-text {
    flex: 1;
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

.comment-form__compact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2-5) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    background-color: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-form__compact-btn:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* Desktop: Inline layout */
@media (min-width: 640px) {
    .comment-form__compact {
        flex-direction: row;
        align-items: center;
        gap: var(--space-4);
        padding: var(--space-4) var(--space-5);
    }

    .comment-form__compact-top {
        flex: 1;
    }

    .comment-form__compact-icon {
        width: 44px;
        height: 44px;
        font-size: var(--text-xl);
    }

    .comment-form__compact-btn {
        width: auto;
        padding: var(--space-2-5) var(--space-5);
        font-weight: var(--font-semibold);
        color: white;
        background-color: var(--color-primary);
        border-color: var(--color-primary);
    }

    .comment-form__compact-btn:hover {
        background-color: var(--color-primary-hover);
        border-color: var(--color-primary-hover);
    }
}

/* Expanded View */
.comment-form__expanded {
    display: none;
    position: relative;
    padding: var(--space-8);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.comment-form--featured[data-expanded="true"] .comment-form__compact {
    display: none;
}

.comment-form--featured[data-expanded="true"] .comment-form__expanded {
    display: block;
    animation: slideDown var(--duration-300) var(--ease-out);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-form__close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--color-bg-alt);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-form__close:hover {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

.comment-form--featured .comment-form__title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    text-align: center;
}

.comment-form__rating-select {
    text-align: center;
    margin-bottom: var(--space-6);
}

.comment-form__label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.comment-form__field {
    margin-bottom: var(--space-4);
}

.comment-form__textarea {
    width: 100%;
    padding: var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    resize: vertical;
    min-height: 100px;
    transition: border-color var(--duration-200) var(--ease-out),
                box-shadow var(--duration-200) var(--ease-out);
}

.comment-form__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.comment-form__textarea::placeholder {
    color: var(--color-text-subtle);
}

.comment-form__input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text);
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--duration-200) var(--ease-out),
                box-shadow var(--duration-200) var(--ease-out);
}

.comment-form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.comment-form__input::placeholder {
    color: var(--color-text-subtle);
}

/* Guest Form Footer: Name + Email + Submit inline */
.comment-form__footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.comment-form__footer .comment-form__guest-fields,
.comment-form__footer .comment-form__saved-guest {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.comment-form__footer .comment-form__guest-fields .comment-form__field {
    width: 100%;
    margin-bottom: 0;
}

/* Saved guest info inline */
.comment-form__footer .comment-form__saved-guest {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-1) var(--space-4);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.comment-form__footer .comment-form__submit {
    width: 100%;
}

/* Desktop: Inline layout */
@media (min-width: 640px) {
    .comment-form__footer {
        flex-direction: row;
        align-items: stretch;
    }

    .comment-form__footer .comment-form__guest-fields,
    .comment-form__footer .comment-form__saved-guest {
        flex: 1;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .comment-form__footer .comment-form__guest-fields .comment-form__field {
        flex: 1;
        min-width: 140px;
    }

    .comment-form__footer .comment-form__submit {
        width: auto;
        min-width: 160px;
        flex-shrink: 0;
    }
}

/* Field with Icon */
.comment-form__field--icon {
    position: relative;
}

.comment-form__field--icon > i {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-base);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: color var(--duration-200) var(--ease-out);
}

.comment-form__field--icon .comment-form__input {
    padding-left: calc(var(--space-4) + var(--text-base) + var(--space-3));
}

.comment-form__field--icon:focus-within > i {
    color: var(--color-primary);
}

/* Submit Button */
.comment-form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: white;
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    white-space: nowrap;
}

.comment-form__submit:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.comment-form__submit:active {
    transform: translateY(0);
}

.comment-form__submit i {
    font-size: var(--text-sm);
}

/* Cookies Consent Checkbox */
.comment-form__cookies {
    margin-bottom: var(--space-4);
}

.comment-form__checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    user-select: none;
}

.comment-form__checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.comment-form__checkbox-mark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--duration-200) var(--ease-out);
    flex-shrink: 0;
}

.comment-form__checkbox-mark::after {
    content: '';
    position: absolute;
    display: none;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.comment-form__checkbox input[type="checkbox"]:checked + .comment-form__checkbox-mark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.comment-form__checkbox input[type="checkbox"]:checked + .comment-form__checkbox-mark::after {
    display: block;
}

.comment-form__checkbox input[type="checkbox"]:focus + .comment-form__checkbox-mark {
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.comment-form__checkbox-text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

/* Logged-in User Info */
.comment-form__logged-in {
    margin-bottom: var(--space-4);
}

.comment-form__user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-lg);
}

.comment-form__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.comment-form__user-name {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    flex: 1;
}

.comment-form__logout {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--duration-200) var(--ease-out);
}

.comment-form__logout:hover {
    color: var(--color-error);
}

.comment-form__submit--full {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-4);
}

/* Saved Guest Avatar Placeholder */
.comment-form__guest-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: white;
    flex-shrink: 0;
}

.comment-form__not-you {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: all var(--duration-200) var(--ease-out);
}

.comment-form__not-you:hover {
    background-color: var(--color-surface);
    color: var(--color-error);
}

/* Hide guest fields when has saved info */
.comment-form--featured.has-saved-info .comment-form__guest-fields,
.comment-form--featured.has-saved-info .comment-form__cookies {
    display: none;
}

/* Reply form saved guest */
.comment__reply-form.has-saved-info .comment__reply-form-guest {
    display: none;
}

.is-hidden {
    display: none !important;
}

/* ----------------------------------------
 * COMMENT LIST - FEATURED
 * ---------------------------------------- */
.comment-list--featured {
    max-width: 800px;
    margin: 0 auto;
}

.comment-list--featured .comment-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-1) 0;
}

.comment-list__header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.comment-list__count {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-text);
    line-height: 1;
}

.comment-list__label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    line-height: 1;
    padding-top: 2px;
}

.comment-list__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    font-size: var(--text-sm);
}

.comment-list__icon-btn:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.comment-list__reactions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.comment-list__reaction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-list__reaction--flash {
    color: var(--color-warning);
}

.comment-list__reaction--flash:hover {
    background-color: var(--color-warning-light);
}

.comment-list__reaction--fire {
    color: var(--color-error);
}

.comment-list__reaction--fire:hover {
    background-color: var(--color-error-light);
}

/* Reset Filter Button */
.comment-list__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: var(--text-base);
    color: var(--color-text-muted);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-list__reset:hover {
    color: var(--color-error);
    background-color: var(--color-error-light, rgba(220, 38, 38, 0.1));
}

.comment-list__reset.is-hidden {
    display: none;
}

/* Sort Dropdown */
.comment-list__sort {
    position: relative;
}

.comment-list__sort-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1-5) var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-list__sort-toggle:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__sort-toggle i {
    font-size: 10px;
    color: var(--color-accent);
    transition: transform var(--duration-200) var(--ease-out);
}

.comment-list__sort.is-open .comment-list__sort-toggle {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__sort.is-open .comment-list__sort-toggle i {
    transform: rotate(180deg);
}

.comment-list__sort-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 150px;
    padding: var(--space-2);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--duration-200) var(--ease-out);
    z-index: var(--z-dropdown);
}

.comment-list__sort.is-open .comment-list__sort-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.comment-list__sort-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all var(--duration-150) var(--ease-out);
}

.comment-list__sort-option:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__sort-option.is-active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__sort-option i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* Progress Bar */
.comment-list__progress {
    margin-bottom: var(--space-6);
}

.comment-list__progress-bar {
    display: flex;
    height: 4px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background-color: var(--color-border-subtle);
}

.comment-list__progress-segment {
    height: 100%;
    transition: width var(--duration-300) var(--ease-out);
}

.comment-list__progress-segment--green {
    background-color: var(--color-success);
}

.comment-list__progress-segment--yellow {
    background-color: var(--color-warning);
}

.comment-list__progress-segment--orange {
    background-color: #F97316;
}

.comment-list__progress-segment--red {
    background-color: var(--color-error);
}

/* ----------------------------------------
 * COMMENT ITEM - FEATURED (CARD)
 * ---------------------------------------- */
.comment--featured {
    position: relative;
    padding: var(--space-5);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-4);
    transition: all var(--duration-200) var(--ease-out);
}

.comment--featured:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

/* Highlighted Comment */
.comment--featured.comment--highlighted {
    border-color: var(--color-primary);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(13, 115, 119, 0.03) 0%, var(--color-surface) 100%);
}

.comment--featured.comment--highlighted::before {
    content: '';
    position: absolute;
    top: -1px;
    left: var(--space-6);
    right: var(--space-6);
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.comment__badge-featured {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.comment__badge-featured i {
    font-size: var(--text-sm);
    color: var(--color-warning);
}

/* Comment Header Row */
.comment--featured .comment__main {
    display: block;
}

.comment--featured .comment__top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment--featured .comment__top--center {
    align-items: center;
}

/* Avatar */
.comment--featured .comment__avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--avatar-bg, var(--color-primary));
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: white;
    flex-shrink: 0;
}

.comment__avatar--admin {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
}

.comment__avatar--admin i {
    font-size: var(--text-lg);
}

/* User Info */
.comment--featured .comment__info {
    flex: 1;
    min-width: 0;
}

.comment--featured .comment__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
    line-height: 1;
}

.comment--featured .comment__author {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text);
    line-height: 1;
}

.comment__verified {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--color-success);
    line-height: 1;
    position: relative;
    top: 2px;
}

.comment__verified i {
    font-size: var(--text-sm);
    line-height: 1;
}

.comment__badge-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: var(--text-base);
    position: relative;
    top: 2px;
}

.comment__badge-admin i {
    filter: drop-shadow(0 1px 2px rgba(13, 115, 119, 0.3));
    line-height: 1;
}

.comment--featured .comment__date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    line-height: 1;
}

/* Rating */
.comment__rating-inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.comment--featured .comment__stars {
    display: flex;
    gap: 2px;
    color: var(--color-warning);
    font-size: var(--text-sm);
}

.comment__rating-text {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Rating Badge Color Variants */
.comment__rating-text--bad {
    color: #DC2626;
    background-color: #FEE2E2;
}

.comment__rating-text--poor {
    color: #EA580C;
    background-color: #FFEDD5;
}

.comment__rating-text--average {
    color: #D97706;
    background-color: #FEF3C7;
}

.comment__rating-text--good {
    color: #65A30D;
    background-color: #ECFCCB;
}

.comment__rating-text--excellent {
    color: #059669;
    background-color: #D1FAE5;
}

/* Body */
.comment--featured .comment__body {
    margin-bottom: var(--space-4);
}

.comment--featured .comment__body p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
}

/* Footer */
.comment--featured .comment__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border-subtle);
}

.comment--featured .comment__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Actions positioning - Mobile: show bottom, Desktop: show top */
.comment--featured .comment__actions--top {
    display: none;
    flex-shrink: 0;
}

.comment--featured .comment__actions--bottom {
    display: flex;
    width: 100%;
    gap: var(--space-2);
}

/* Mobile: Full-width styled buttons */
.comment--featured .comment__actions--bottom .comment__action {
    flex: 1;
    justify-content: center;
    padding: var(--space-1) var(--space-4);
    font-size: var(--text-sm);
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-lg);
}

.comment--featured .comment__actions--bottom .comment__action:hover,
.comment--featured .comment__actions--bottom .comment__action:focus {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

@media (min-width: 640px) {
    .comment--featured .comment__actions--top {
        display: flex;
    }

    .comment--featured .comment__actions--bottom {
        display: none;
    }

    .comment--featured .comment__footer {
        display: none;
    }
}

.comment--featured .comment__action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1-5) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    background-color: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment--featured .comment__action:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment--featured .comment__action i {
    font-size: 14px;
}

/* Like button states */
.comment--featured .comment__action.has-liked {
    color: var(--color-primary);
}

.comment--featured .comment__action.has-liked i {
    color: var(--color-primary);
}

.comment--featured .comment__action.is-liked {
    animation: like-pulse 0.3s ease-out;
}

@keyframes like-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Replies - WordPress uses .children, JS uses .comment__replies */
.comment__replies,
.comment-list__items .children {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    padding-left: var(--space-4);
    border-top: 1px dashed var(--color-border-subtle);
}

.comment--featured.comment--reply {
    padding: var(--space-4);
    background-color: var(--color-bg-alt);
    border: none;
    margin-bottom: var(--space-3);
}

.comment--featured.comment--reply:hover {
    box-shadow: none;
}

.comment--featured.comment--reply:last-child {
    margin-bottom: 0;
}

.comment--featured.comment--reply .comment__avatar--initial {
    width: 36px;
    height: 36px;
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
}

.comment--featured.comment--reply .comment__footer {
    border-top: none;
    padding-top: 0;
}

/* Replies (depth-2 and deeper) - Date on separate line below name */
.comment-list__items .children .comment--featured .comment__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-0-5);
}

.comment-list__items .children .comment--featured .comment__header > .comment__author,
.comment-list__items .children .comment--featured .comment__header > .comment__verified {
    display: inline;
}

.comment-list__items .children .comment--featured .comment__date {
    display: block;
    width: 100%;
}

/* Replies on mobile: show top actions (like desktop), hide bottom actions */
.comment-list__items .children .comment--featured .comment__actions--top {
    display: flex;
}

.comment-list__items .children .comment--featured .comment__actions--bottom {
    display: none;
}

.comment-list__items .children .comment--featured .comment__footer {
    display: none;
}

/* Pending Comment State */
.comment--featured.comment--pending {
    opacity: 0.85;
    background: repeating-linear-gradient(
        -45deg,
        var(--color-surface),
        var(--color-surface) 10px,
        var(--color-bg-alt) 10px,
        var(--color-bg-alt) 20px
    );
}

.comment--pending .comment__body {
    font-style: italic;
    color: var(--color-text-muted);
}

.comment__pending-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-0-5) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-warning);
    background-color: rgba(245, 158, 11, 0.1);
    border-radius: var(--radius-full);
    margin-left: var(--space-2);
}

.comment__pending-badge i {
    font-size: 12px;
}

.comment__pending-note {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-warning);
}

.comment__pending-note i {
    color: var(--color-warning);
    font-size: 14px;
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 639px) {
    .comment--featured {
        padding: var(--space-4);
    }

    .comment--featured .comment__avatar--initial {
        width: 38px;
        height: 38px;
    }

    .comment--featured.comment--reply .comment__avatar--initial {
        width: 32px;
        height: 32px;
    }
}

/* Load More */
.comment-list__more {
    display: flex;
    justify-content: center;
    padding: var(--space-6) 0;
}

.comment-list__more-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-text-secondary);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-list__more-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__more-btn i {
    font-size: 16px;
    transition: transform var(--duration-200) var(--ease-out);
}

/* Loading state */
.comment-list__more-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.comment-list__more-btn.is-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   INLINE REPLY FORM
======================================== */

/* Reply Form Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reply Form Container - Hidden by default */
.comment__reply-form {
    display: none;
    margin-top: var(--space-4);
    padding: var(--space-4);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    animation: slideDown var(--duration-200) var(--ease-out);
}

.comment__reply-form.is-open {
    display: block;
}

/* Reply Form Header */
.comment__reply-form-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment__reply-form-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--color-primary-light);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-size: var(--text-sm);
    flex-shrink: 0;
}

/* Saved guest avatar in reply form */
.comment__reply-form-guest-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: white;
}

.comment__reply-form-context {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-1-5);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.comment__reply-form-context strong {
    color: var(--color-text);
    font-weight: var(--font-semibold);
}

/* Reply Form Body */
.comment__reply-form-body {
    margin-bottom: var(--space-3);
}

.comment__reply-form-textarea {
    width: 100%;
    padding: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 80px;
    transition: border-color var(--duration-200) var(--ease-out),
                box-shadow var(--duration-200) var(--ease-out);
}

.comment__reply-form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.comment__reply-form-textarea::placeholder {
    color: var(--color-text-subtle);
}

/* Reply Form Footer */
.comment__reply-form-footer {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Input fields container */
.comment__reply-form-fields,
.comment__reply-form-guest {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
}

/* Input wrapper with icon */
.comment__reply-form-field {
    flex: 1;
    min-width: 0;
    position: relative;
}

.comment__reply-form-field i {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-sm);
    color: var(--color-text-subtle);
    pointer-events: none;
    transition: color var(--duration-200) var(--ease-out);
}

.comment__reply-form-field:focus-within i {
    color: var(--color-primary);
}

/* Name and Email inputs */
.comment__reply-form-input {
    width: 100%;
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-200) var(--ease-out),
                box-shadow var(--duration-200) var(--ease-out);
}

.comment__reply-form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.comment__reply-form-input::placeholder {
    color: var(--color-text-subtle);
}

.comment__reply-form-submit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: white;
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    flex-shrink: 0;
}

.comment__reply-form-submit:hover {
    background-color: var(--color-primary-hover);
}

.comment__reply-form-submit:active {
    transform: scale(0.98);
}

.comment__reply-form-submit i {
    font-size: var(--text-xs);
}

.comment__reply-form-submit--full {
    flex: 1;
    justify-content: center;
}

/* Not You button in reply form */
.comment__reply-form-not-you {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
    cursor: pointer;
    transition: color var(--duration-200) var(--ease-out);
}

.comment__reply-form-not-you:hover {
    color: var(--color-error);
}

.comment__reply-form-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* Desktop: Inline layout for reply form footer */
@media (min-width: 480px) {
    .comment__reply-form-footer {
        flex-direction: row;
        align-items: stretch;
    }

    .comment__reply-form-fields,
    .comment__reply-form-guest {
        flex-direction: row;
    }
}

/* Mobile: Stack fields vertically */
@media (max-width: 479px) {
    .comment__reply-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .comment__reply-form-fields,
    .comment__reply-form-guest {
        flex-direction: column;
    }

    .comment__reply-form-field {
        width: 100%;
    }

    .comment__reply-form-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Reply button active state (when form is open) */
.comment__action.is-replying {
    color: var(--color-error);
    background-color: var(--color-error-light);
}

.comment__action.is-replying:hover {
    color: var(--color-error);
    background-color: var(--color-error-light);
}

/* ========================================
 * RELATED ARTICLES - Slider Style
 * ======================================== */

/* Slider variant container */
.related-content--slider {
    padding: var(--space-6) 0;
}

/* Hide navigation in header - we use overlay arrows instead */
.related-slider__nav {
    display: none;
}

/* Slider Container - with space for overlay arrows */
.related-slider {
    position: relative;
    overflow: visible;
}

/* Overlay Arrow Buttons - positioned on sides, half outside */
.related-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    box-shadow: var(--shadow-lg);
}

/* Half outside, half inside */
.related-slider__arrow--prev {
    left: -22px;
}

.related-slider__arrow--next {
    right: -22px;
}

.related-slider__arrow:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    transform: translateY(-50%) scale(1.05);
}

.related-slider__arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.related-slider__arrow:disabled:hover {
    background-color: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-secondary);
    transform: translateY(-50%);
}

.related-slider__arrow i {
    font-size: var(--text-base);
}

/* Slider Track - using transform for smooth animation */
.related-slider__track {
    display: flex;
    gap: var(--space-4);
    transition: transform var(--duration-300) var(--ease-out);
    padding: var(--space-2) 0;
    will-change: transform;
}

/* Touch scroll for mobile - override with class */
.related-slider__track.is-touch-enabled {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: none;
}

.related-slider__track.is-touch-enabled::-webkit-scrollbar {
    display: none;
}

/* Wrapper to clip cards but allow arrows to overflow */
.related-slider__wrapper {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

/* Slider Slide - Mobile: show card 1 + peek of card 2 */
.related-slider__slide {
    flex: 0 0 calc(85% - var(--space-2));
    min-width: 0;
}

.related-slider__track.is-touch-enabled .related-slider__slide {
    scroll-snap-align: start;
}

@media (min-width: 640px) {
    .related-slider__slide {
        flex: 0 0 calc(50% - var(--space-2));
    }
}

@media (min-width: 1024px) {
    .related-slider__slide {
        flex: 0 0 calc(25% - var(--space-3));
    }
}

/* Slider Dots */
.related-slider__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding-top: var(--space-5);
}

.related-slider__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background-color: var(--color-border);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.related-slider__dot:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.2);
}

.related-slider__dot.is-active {
    width: 24px;
    background-color: var(--color-primary);
}

/* Mobile: Hide overlay arrows, rely on swipe + dots */
@media (max-width: 639px) {
    .related-slider__arrow {
        display: none;
    }
}

/* ========================================
 * POST CARD - Slider Variant
 * MOVED to components/post-cards.css
 * ======================================== */

/* ========================================
 * TABLE OF CONTENTS
 * MOVED to inc/toc-expandable/toc.css (Single Source of Truth)
 * ======================================== */

/* ========================================
 * NOTIFICATIONS & LOADING STATES
 * For AJAX comment operations
 * ======================================== */

/* Notification Toast */
.acms-notification {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 400px;
    padding: var(--space-4) var(--space-5);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--duration-300) var(--ease-out);
}

.acms-notification.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.acms-notification > i {
    font-size: var(--text-xl);
    flex-shrink: 0;
}

.acms-notification > span {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--color-text);
    line-height: var(--leading-normal);
}

.acms-notification__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--duration-150) var(--ease-out);
    flex-shrink: 0;
}

.acms-notification__close:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
}

/* Notification Types */
.acms-notification--success {
    border-left: 4px solid var(--color-success);
}

.acms-notification--success > i {
    color: var(--color-success);
}

.acms-notification--error {
    border-left: 4px solid var(--color-error);
}

.acms-notification--error > i {
    color: var(--color-error);
}

.acms-notification--info {
    border-left: 4px solid var(--color-primary);
}

.acms-notification--info > i {
    color: var(--color-primary);
}

/* Mobile Notification */
@media (max-width: 639px) {
    .acms-notification {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
        max-width: none;
    }
}

/* Loading Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin,
.bi-arrow-repeat.spin {
    animation: spin 1s linear infinite;
}

/* Comment List Loading State */
.comment-list__items.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Load More Button */
.comment-list__more {
    display: flex;
    justify-content: center;
    padding: var(--space-6) 0;
}

.comment-list__more-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
}

.comment-list__more-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: var(--color-primary-light);
}

.comment-list__more-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.comment-list__more-btn.is-loading i {
    animation: spin 1s linear infinite;
}

/* Completed state - all comments loaded (subtle, muted) */
.comment-list__more-btn.is-complete {
    color: var(--color-text-subtle);
    border-color: var(--color-border-light);
    background-color: var(--color-bg-subtle);
    cursor: default;
    pointer-events: none;
    opacity: 0.7;
}

.comment-list__more-btn.is-complete:hover {
    color: var(--color-text-subtle);
    border-color: var(--color-border-light);
    background-color: var(--color-bg-subtle);
}

.comment-list__more-btn:disabled {
    cursor: not-allowed;
}

/* New Comment Animation */
@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment--new {
    animation: slideInComment 0.3s ease-out;
}

/* Empty State Enhancement */
.comment-list--empty {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-2xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.comment-list__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-4);
    background-color: var(--color-primary-light);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: var(--text-2xl);
}

.comment-list__empty-text {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin: 0;
}

/* ========================================
 * SIDEBAR LAYOUT OVERRIDES
 * When single post uses content-layout grid
 * ======================================== */

/* Remove nested container padding/max-width inside sidebar layout */
.site-main--post-sidebar .content-layout__main .post-footer .container,
.site-main--post-sidebar .content-layout__main .section-divider .container,
.site-main--post-sidebar .content-layout__main .post-comments .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* Remove max-width: 800px constraints - content is already constrained by grid */
.site-main--post-sidebar .post-footer__top-row {
    max-width: none;
}

.site-main--post-sidebar .comment-form--featured {
    max-width: none;
}

.site-main--post-sidebar .comment-list--featured {
    max-width: none;
}

.site-main--post-sidebar .comment-list--empty {
    max-width: none;
}

/* Author box in sidebar layout */
.site-main--post-sidebar .post-footer__author-centered {
    max-width: none;
}

/* Comment showcase in sidebar layout */
.site-main--post-sidebar .comment-showcase--centered {
    max-width: none;
}

/* Section divider in sidebar layout */
.site-main--post-sidebar .section-divider__inner {
    max-width: none;
}

/* Sidebar layout spacing */
.site-main--post-sidebar > .container {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

/* Post article in sidebar - no extra container wrapping */
.post-article--sidebar {
    padding: 0;
}

/* Post content fills the grid column in sidebar layout */
.site-main--post-sidebar .post-content {
    max-width: 100%;
}

/* Sticky sidebar */
@media (min-width: 1024px) {
    .site-main--post-sidebar .content-layout__sidebar .sidebar {
        position: sticky;
        top: calc(var(--header-height, 64px) + var(--space-6));
    }
}

/* ========================================
 * AFFILIATE DISCLOSURE ALERT
 * Shown above post content
 * ======================================== */

.post-disclosure {
    width: 100%;
    margin: 0;
    padding: var(--space-2) var(--space-5);
    background: transparent;
    border: none;
    font-size: var(--text-xs);
    line-height: 1.5;
}

.post-disclosure .container {
    max-width: var(--container-max-width, 1200px);
    margin: 0 auto;
}

.post-disclosure__main {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
}

.post-disclosure__icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin-top: 1px;
}

.post-disclosure__text {
    margin: 0;
    color: var(--color-text-muted);
}

.post-disclosure__link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-medium);
    white-space: nowrap;
}

.post-disclosure__link:hover {
    text-decoration: underline;
}

.post-disclosure__promos {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.post-disclosure__promo {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.post-disclosure__promo a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-medium);
}

.post-disclosure__promo a:hover {
    text-decoration: underline;
}

/* Mobile & Tablet: Hide icon, center text, reduce padding */
@media (max-width: 768px) {
    .post-disclosure {
        padding: var(--space-2) var(--space-3) !important;
    }

    .post-disclosure__main {
        justify-content: center !important;
        text-align: center !important;
    }

    .post-disclosure__icon {
        display: none !important;
    }

    .post-disclosure__text {
        text-align: center !important;
    }
}

/* ========================================
 * MOBILE OVERFLOW FIX
 * Prevent horizontal scrolling on small screens
 * ======================================== */

@media (max-width: 767px) {
    /* Ensure all containers respect viewport */
    .site-main,
    .container,
    .post-content,
    .entry-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Force word wrap for long text */
    .post-content p,
    .post-content li,
    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    /* Ensure tables don't overflow */
    .post-content table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix any fixed-width elements */
    .post-content > * {
        max-width: 100%;
    }
}

