/**
 * Reflect2 - Scoped Styles
 * 
 * These styles are specific to the reflect2 module and are designed
 * to work alongside the existing pod CSS (main.css, responsive.css).
 * 
 * All classes are prefixed with "reflect2-" to avoid conflicts.
 * 
 * @version 1.0
 * @since January 2026
 */

/* ===========================================
   BASE LAYOUT
   =========================================== */

.reflect2-page {
    /* Content sizes naturally; outer layout handles footer positioning */
}

.reflect2-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding-top: 20px;
}

.reflect2-main {
    /* Main content area */
}

/* ===========================================
   NAVIGATION DROPDOWNS
   =========================================== */

.reflect2-nav {
    margin-bottom: 1.5rem;
}

.reflect2-nav-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reflect2-nav-btn {
    background-color: #D9E4DD;
    color: #000000;
    border: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.reflect2-nav-btn:hover,
.reflect2-nav-btn:focus {
    background-color: #c5d4c9;
    color: #000000;
}

.reflect2-nav .dropdown-toggle-split {
    border-color: #CDC9C3;
}

.reflect2-nav .dropdown-menu {
    min-width: 200px;
}

.reflect2-nav .dropdown-item.active {
    background-color: #D9E4DD;
    color: #000;
}

.reflect2-nav .dropdown-divider {
    margin: 0.5rem 0;
}

/* ===========================================
   PROMPT CARD
   =========================================== */

.reflect2-prompt-card {
    margin-top: 1.5rem;
}

.reflect2-prompt-card .card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.reflect2-prompt-card .card-header {
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.reflect2-prompt-card .card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reflect2-prompt-card .card-body {
    padding: 1.5rem;
}

.reflect2-prompt-card .card-text {
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Subtle inline expand/collapse links */
.reflect2-expand-prompt,
.reflect2-collapse-prompt {
    color: #777;
    text-decoration: none;
    font-size: 0.9em;
}

.reflect2-expand-prompt:hover,
.reflect2-collapse-prompt:hover {
    color: #555;
    text-decoration: underline;
}

/* ===========================================
   HOMEWORK FORM
   =========================================== */

/* Auto-expanding textarea for homework */
.reflect2-homework-textarea {
    min-height: 150px;
    max-height: 500px;
    overflow-y: auto;
    transition: height 0.2s ease;
}

/* TinyMCE auto-expand wrapper */
.reflect2-tinymce-wrapper .tox-tinymce {
    min-height: 200px !important;
}

.reflect2-tinymce-wrapper .tox-edit-area {
    min-height: 160px;
}

/* Remove inner iframe focus outline for homework editor too */
.reflect2-tinymce-wrapper .tox-edit-area__iframe:focus {
    outline: none !important;
}

/* ===========================================
   SORT MENU
   =========================================== */

.reflect2-sort-menu {
    margin-bottom: 1rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.reflect2-sort-menu .btn {
    font-size: 0.875rem;
}

/* ===========================================
   QUOTE CARD
   =========================================== */

.reflect2-quote {
    margin: 1.5rem 0;
}

.reflect2-quote img {
    max-width: 100%;
    border-radius: 4px;
}

/* ===========================================
   POST CARDS (Feed) - Redesigned
   =========================================== */

.reflect2-post-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Alternating backgrounds for better visual rhythm */
.reflect2-post-card:nth-child(even) {
    background: #faf8f5;
}

.reflect2-post-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.reflect2-post-card.reflect2-featured {
    border-left: 4px solid #5cb85c;
    background-color: rgba(92, 184, 92, 0.03);
}

/* Post Body - optimized for reading */
.reflect2-post-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2d3436;
    word-wrap: break-word;
    overflow-wrap: break-word;
    letter-spacing: 0.01em;
}

.reflect2-post-body p {
    margin-bottom: 0.5rem;
}

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

.reflect2-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}

/* Actions Row */
.reflect2-actions a {
    transition: color 0.15s;
}

.reflect2-actions a:hover {
    color: #333 !important;
}

.reflect2-actions .bi-heart:hover {
    color: #C62828 !important;
}

/* Quick Reply Form */
.reflect2-quick-reply {
    padding: 8px 0;
}

.reflect2-quick-reply .form-control {
    border: 1px solid #ddd;
}

.reflect2-quick-reply .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

/* Post Header */
.reflect2-post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.reflect2-avatar {
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.reflect2-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.reflect2-meta {
    flex-grow: 1;
    min-width: 0;
}

.reflect2-author {
    display: block;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.reflect2-author:hover {
    color: #007bff;
    text-decoration: underline;
}

.reflect2-time {
    font-size: 0.85rem;
    color: #6c757d;
    text-decoration: none;
}

.reflect2-time:hover {
    color: #007bff;
}

.reflect2-admin-actions {
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.reflect2-admin-actions a {
    color: #6c757d;
    padding: 0.25rem;
}

.reflect2-admin-actions a:hover {
    color: #333;
}

/* Post Body */
.reflect2-post-body {
    margin-bottom: 0.75rem;
}

.reflect2-content {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.reflect2-content p {
    margin-bottom: 0.75rem;
}

.reflect2-content p:last-child {
    margin-bottom: 0;
}

.reflect2-excerpt {
    /* Teaser text */
}

.reflect2-full {
    /* Full content (hidden by default) */
}

/* Read more button - styled as prominent link */
.reflect2-readmore-btn {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.reflect2-readmore-btn:hover {
    text-decoration: underline;
    color: #0056b3;
}


.reflect2-readmore-wrap {
    display: block;
    margin-top: 0.5rem;
}

.reflect2-read-more {
    background: none;
    border: none;
    color: #007bff;
    padding: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.reflect2-read-more:hover {
    text-decoration: underline;
}

.reflect2-translate {
    margin-top: 0.5rem;
    text-align: right;
}

.reflect2-translate .btn-translate {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

/* Inline Comment Form */
.reflect2-comment-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.reflect2-comment-form .d-flex {
    gap: 0.5rem;
}

.reflect2-comment-form textarea {
    flex-grow: 1;
    resize: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.9rem;
    min-height: 38px;
    max-height: 100px;
}

.reflect2-comment-form textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.reflect2-send {
    flex-shrink: 0;
}

/* Post Footer */
.reflect2-post-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    font-size: 0.9rem;
}

.reflect2-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6c757d;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.reflect2-action:hover {
    color: #333;
}

.reflect2-action .count {
    font-size: 0.85rem;
}

.reflect2-heart.active i,
.reflect2-heart:hover i {
    color: #C62828;
}

/* ===========================================
   PERMALINK PAGE (Redesigned)
   =========================================== */

.reflect2-permalink {
    max-width: 760px;
    margin: 0 auto;
}

.permalink-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Header: Photo + Meta */
.permalink-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.permalink-avatar img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 14px;
}

.permalink-meta {
    min-width: 0;
}

.permalink-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.permalink-title a {
    color: #333;
    text-decoration: none;
}

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

/* Public badge - subtle pill next to author/group */
.permalink-public-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    color: #6a9b7d;
    background: #edf5f0;
    border-radius: 10px;
    padding: 1px 8px;
    margin-left: 8px;
    text-decoration: none;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.permalink-public-badge i {
    font-size: 0.6rem;
    margin-right: 2px;
}

.permalink-public-badge:hover {
    color: #4a7d5e;
    background: #dceee3;
    text-decoration: none;
}

.permalink-byline {
    font-size: 0.95rem;
    color: #666;
}

.permalink-byline a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.permalink-byline a:hover {
    color: #007bff;
}

.permalink-byline .sep {
    margin: 0 6px;
    color: #ccc;
}

.permalink-byline .date {
    color: #888;
}

.permalink-byline .edit-link {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #888;
}

.permalink-byline .edit-link:hover {
    color: #333;
}

.permalink-group {
    font-size: 0.85rem;
    color: #DB5A36;
    margin-top: 2px;
}

.permalink-group a {
    color: #DB5A36;
}

.permalink-group .public-badge {
    background: #e9ecef;
    color: #666;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    text-transform: uppercase;
}

.permalink-utils {
    flex-shrink: 0;
    margin-left: 10px;
}

.permalink-utils .btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.permalink-utils .btn:hover {
    background: #f0f0f0;
}

/* Translation Options */
.permalink-translations {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.permalink-translations a {
    display: inline-block;
    padding: 3px 10px;
    margin: 2px 4px;
    background: #e9ecef;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
}

.permalink-translations a:hover {
    background: #dee2e6;
}

.translation-new {
    margin-top: 8px;
}

.translation-new a {
    background: #d1ecf1;
    color: #0c5460;
}

/* Prompt Section */
.permalink-prompt {
    padding: 14px 20px;
    background: #f5f8f5;
    border-bottom: 1px solid #e8ede8;
}

.prompt-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.prompt-text {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.6;
}

.permalink-expand-prompt,
.permalink-collapse-prompt {
    color: #888;
    text-decoration: none;
    font-size: 0.9em;
}

.permalink-expand-prompt:hover,
.permalink-collapse-prompt:hover {
    color: #555;
}

/* Post Content */
.permalink-content {
    padding: 20px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
}

/* Ensure inner content gets the correct font size (override any competing styles) */
.permalink-content .perm_post,
.permalink-content .perm_post p,
.permalink-content .perm_post div {
    font-size: 1.05rem;
    line-height: 1.6;
}

.permalink-content img {
    max-width: 100%;
    height: auto;
}

/* Action Bar */
.permalink-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.actions-left {
    display: flex;
    gap: 16px;
}

.action-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

.action-item a {
    color: #666;
    text-decoration: none;
}

.action-item a:hover {
    color: #333;
}

.action-item i.liked {
    color: #C62828;
}

/* Smiler Hover Tooltip (via Bootstrap Popover in pod.js) */
/* .smilehover_info is a hidden data container; pod.js copies its HTML into a Bootstrap popover */
.smilehover {
    position: relative;
    cursor: pointer;
}

.smilehover_info {
    display: none !important;  /* Always hidden - data source for popover only */
}

/* Style the Bootstrap popover when triggered by smilehover */
.smilehover + .popover,
.popover {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    max-width: 220px;
}

.smilehover + .popover .popover-body,
.popover .popover-body {
    padding: 8px 14px;
    font-size: 0.82rem;
    line-height: 1.7;
    max-height: 180px;
    overflow-y: auto;
}

.popover-body a {
    display: block;
    color: #444;
    text-decoration: none;
    padding: 1px 0;
}

.popover-body a:hover {
    color: #007bff;
}

.actions-right {
    display: flex;
    gap: 4px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #e9ecef;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
}

.nav-btn:hover:not(.disabled) {
    background: #dee2e6;
    color: #333;
}

.nav-btn.disabled {
    color: #bbb;
    cursor: default;
}

/* Comments Section */
.permalink-comments {
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Comment TinyMCE - compact */
.permalink-comment-tinymce .tox-tinymce {
    min-height: 120px !important;
    max-height: 220px;
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Nice border on focus - applied to the whole editor */
.permalink-comment-tinymce .tox-tinymce:focus-within {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Remove TinyMCE's default inner edit-area border */
.permalink-comment-tinymce .tox .tox-edit-area {
    border: none !important;
    outline: none !important;
}

.permalink-comment-tinymce .tox .tox-edit-area::before,
.permalink-comment-tinymce .tox .tox-edit-area::after {
    display: none !important;
}

/* Let JS control heights dynamically - don't hardcode */
.permalink-comment-tinymce .tox-edit-area,
.permalink-comment-tinymce .tox-edit-area iframe {
    min-height: 70px;
}

/* Remove the inner iframe focus outline */
.permalink-comment-tinymce .tox-edit-area__iframe,
.permalink-comment-tinymce .tox-edit-area__iframe:focus {
    outline: none !important;
    border: none !important;
}

/* Remove any sidebar wrap borders */
.permalink-comment-tinymce .tox .tox-sidebar-wrap {
    border: none !important;
}

.permalink-comment-tinymce .tox-editor-container {
    min-height: 60px;
}

/* Inline Reply Form */
.inline-reply-form {
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.inline-reply-form .form-control {
    font-size: 0.9rem;
    border-radius: 20px;
    padding: 6px 14px;
}

.inline-reply-form .btn-sm {
    padding: 6px 12px;
}

.inline-reply-form .btn-link {
    font-size: 0.85rem;
    padding: 6px 8px;
}

/* Post Body in Permalink */
.reflect2-permalink .perm_post {
    font-size: 16px;
    line-height: 24px;
    color: #333;
}

.reflect2-permalink .perm_post p {
    margin-bottom: 1rem;
}

.reflect2-permalink .perm_post img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ===========================================
   COMMENTS SECTION
   =========================================== */

.reflect2-comments h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.reflect2-comments h4 .badge {
    font-size: 0.75rem;
    font-weight: normal;
    vertical-align: middle;
}

/* Note: Comment styles consolidated below in "COMMENTS SECTION" */

.reflect2-comment-replies {
    border-color: #dee2e6 !important;
}

.reflect2-comment-reply {
    padding: 0.25rem 0;
}

/* Comment Form */
.reflect2-comment-form-wrapper {
    background: transparent;
}

.reflect2-comment-form-wrapper .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reflect2-comment-form-wrapper .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* TinyMCE editor container */
.reflect2-comment-form-wrapper .tox-tinymce {
    border-radius: 8px;
}

/* Remove all inner borders from TinyMCE edit area */
.reflect2-comment-form-wrapper .tox .tox-edit-area,
.reflect2-comment-form-wrapper .tox .tox-edit-area__iframe {
    border: none !important;
    outline: none !important;
}

.reflect2-comment-form-wrapper .tox .tox-sidebar-wrap {
    border: none !important;
}

/* ===========================================
   LANGUAGE PREFERENCE
   =========================================== */

.reflect2-lang-pref {
    padding: 2rem 0;
}

.reflect2-lang-pref .card {
    border: none;
}

.reflect2-lang-pref .form-control {
    border-radius: 6px;
}

/* Smiler hover styles consolidated above */

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.reflect2-form {
    background: #D9E4DD;
    border-radius: 8px;
    padding: 1.5rem;
}

.reflect2-form-prompt {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.reflect2-form-textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
}

.reflect2-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.reflect2-form-actions .btn {
    text-transform: uppercase;
    font-weight: 500;
}

/* ===========================================
   COMMENTS SECTION
   =========================================== */

.reflect2-comments {
    margin-top: 2rem;
}

.reflect2-comments-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.reflect2-comment {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
}

.reflect2-comment:last-child {
    border-bottom: none;
}

.reflect2-comment-author {
    font-weight: 600;
    color: #333;
}

.reflect2-comment-time {
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.reflect2-comment-body {
    margin-top: 0.25rem;
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
}

.reflect2-comment-body p {
    margin-bottom: 0.5rem;
}

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

/* Links in comment/reply text - underline for visibility
   (overrides global a { text-decoration: none } from main.css) */
.reflect2-comment-body a[target="_blank"],
.reflect2-comment-body a[rel="noopener"],
.reflect2-comment-reply a[target="_blank"],
.reflect2-comment-reply a[rel="noopener"] {
    color: #0056b3;
    text-decoration: underline;
}

.reflect2-comment-body a[target="_blank"]:hover,
.reflect2-comment-body a[rel="noopener"]:hover,
.reflect2-comment-reply a[target="_blank"]:hover,
.reflect2-comment-reply a[rel="noopener"]:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Lists in comment/reply text - restore bullets stripped by global ul reset */
.reflect2-comment-body ul,
.reflect2-comment-reply ul {
    margin: 4px 10px 8px 24px;
    padding-left: 0;
    list-style-type: disc;
}

.reflect2-comment-body ol,
.reflect2-comment-reply ol {
    margin: 4px 10px 8px 24px;
    padding-left: 0;
    list-style-type: decimal;
}

.reflect2-comment-body li,
.reflect2-comment-reply li {
    margin-bottom: 2px;
}

.reflect2-comment-actions {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.reflect2-comment-actions a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.reflect2-comment-actions a:hover {
    color: #333;
}

/* ===========================================
   LOADING & PAGINATION
   =========================================== */

.reflect2-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.reflect2-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: reflect2-spin 1s linear infinite;
}

@keyframes reflect2-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.reflect2-no-more {
    text-align: center;
    padding: 1.5rem;
    color: #6c757d;
    font-style: italic;
}

.reflect2-pager {
    /* Pager visibility handled by scroll.css */
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

@media (max-width: 768px) {
    .reflect2-content {
        padding: 15px;
    }
    
    .reflect2-nav-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reflect2-nav-group .btn-group {
        width: 100%;
    }
    
    .reflect2-nav-group .btn-group .btn {
        flex-grow: 1;
    }
    
    .reflect2-nav-group .btn-group + .btn-group {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }
    
    .reflect2-post-footer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .reflect2-avatar img {
        width: 40px;
        height: 40px;
    }
    
    .reflect2-permalink-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .reflect2-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .reflect2-form-actions .btn {
        width: 100%;
    }
}

/* ===========================================
   DARK LINK HELPERS (from main.css)
   =========================================== */

.reflect2-content a {
    color: #333;
}

.reflect2-content a:hover {
    color: #007bff;
}

/* Prevent underlines on icon-only links */
a .bi,
a > .bi,
a[class*="heart"] .bi,
a[class*="cmtmodal"] .bi {
    text-decoration: none !important;
}

/* ===========================================
   LINK STYLING FOR CONTENT vs ACTION LINKS
   =========================================== */

/* Content areas - links SHOULD be underlined for visibility */
.reflect2-module-descr a,
.card-body.link-ext a,
.card-body a,
.reflect2-prompt a,
.link-ext a,
.dark-link p a,
.dark-link li a,
.dark-link div:not([class*="action"]):not([class*="heart"]):not([class*="cmt"]) > a {
    color: #0056b3;
    text-decoration: underline;
}

.reflect2-module-descr a:hover,
.card-body.link-ext a:hover,
.card-body a:hover,
.reflect2-prompt a:hover,
.link-ext a:hover,
.dark-link p a:hover,
.dark-link li a:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Action links (hearts, comments, share, etc.) - NO underline */
.reflect2-post-actions a,
.reflect2-comment-actions a,
.post-card-actions a,
a[class*="heart"],
a[class*="cmtmodal"],
a.reflect2-subtle-link,
.dark-link .reflect2-post-actions a,
.dark-link .reflect2-comment-actions a {
    text-decoration: none;
}

.reflect2-post-actions a:hover,
.reflect2-comment-actions a:hover,
.post-card-actions a:hover {
    text-decoration: none;
}

/* Subtle links - hint at clickability without being distracting */
.reflect2-subtle-link {
    color: #555;
    text-decoration: none;
    transition: color 0.15s ease;
}

.reflect2-subtle-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.reflect2-text-muted {
    color: #6c757d;
}

.reflect2-text-small {
    font-size: 0.85rem;
}

.reflect2-mb-0 { margin-bottom: 0 !important; }
.reflect2-mb-1 { margin-bottom: 0.5rem !important; }
.reflect2-mb-2 { margin-bottom: 1rem !important; }
.reflect2-mb-3 { margin-bottom: 1.5rem !important; }
.reflect2-mt-3 { margin-top: 1.5rem !important; }

/* ===========================================
   COMMENT MODAL ENHANCEMENTS
   =========================================== */

/* Comments in modal */
.reflect2-comments-full .reflect2-comment-actions a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.15s ease;
}

.reflect2-comments-full .reflect2-comment-actions a:hover {
    color: #007bff;
}

.reflect2-comments-full .modal-cmt-heart.active i,
.reflect2-comments-full .modal-cmt-heart i.bi-heart-fill {
    color: #C62828;
}

/* Toggle replies link */
.toggle-replies {
    font-weight: 500;
}

.toggle-replies:hover {
    text-decoration: underline !important;
}

/* Reply form in modal */
.modal-reply-form input,
.modal-comment-form input {
    font-size: 0.9rem;
    padding: 8px 15px;
}

.modal-reply-form input:focus,
.modal-comment-form input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0,123,255,.15);
}

/* Reply items */
.replies-section {
    margin-top: 8px;
}

.replies-section .reply-item {
    padding: 6px 0;
}

.replies-section .reply-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* Disabled comment icon (no comments) */
.reflect2-actions span.text-muted[style*="cursor: default"] {
    pointer-events: none;
}

/* Comment modal scroll improvements */
#cmtModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#cmtModal .comments-list {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

#cmtModal .comments-list::-webkit-scrollbar {
    width: 6px;
}

#cmtModal .comments-list::-webkit-scrollbar-track {
    background: transparent;
}

#cmtModal .comments-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Modal comment form styling */
.modal-comment-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: -12px;
    margin-top: 12px !important;
}

/* ===========================================
   AUTO-EXPANDING TEXTAREAS
   =========================================== */

.reflect2-autoexpand {
    min-height: 36px;
    max-height: 150px;
    line-height: 1.4;
    padding: 8px 12px;
    resize: none;
    overflow-y: hidden;
    box-sizing: border-box;
}

/* When textarea is at max height, allow scrolling and keep cursor visible */
.reflect2-autoexpand.at-max-height {
    overflow-y: auto;
}

.reflect2-autoexpand:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0,123,255,.15);
}

/* Ensure placeholder is vertically centered */
.reflect2-autoexpand::placeholder {
    line-height: 1.4;
}

/* Align send button with textarea */
.reflect2-quick-reply .d-flex,
.modal-reply-form .d-flex,
.modal-comment-form .d-flex {
    align-items: flex-end;
}

/* Read more arrow styling */
.reflect2-readmore-btn {
    white-space: nowrap;
}

/* ===========================================
   WIDE LAYOUT ADJUSTMENTS (v2)
   Container widened to col-lg-10 to match dashboard
   Text content constrained for readability
   =========================================== */

/* Main content area - constrain for optimal reading width */
.reflect2-main {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* Post cards: constrain width and center for readability */
.reflect2-post-card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Pinned post same treatment */
.reflect2-pinned-post .card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Quote card - same width as post cards */
.reflect2-quote .card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Search header spans full width */
.reflect2-search-header {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile warning centered */
.reflect2-profile-warning .alert {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Explore more link */
.reflect2-explore-more {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation stays full-width within main content area */
.reflect2-nav {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* Prompt card - same width as post cards for visual consistency */
.reflect2-prompt-card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Homework form - slightly wider for editing comfort */
.reflect2-form {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Edit page - narrower for focused editing */
.reflect2-edit {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Privacy toggle on edit page */
.reflect2-edit .privacy-toggle .btn-group .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

/* Homework index page (prompt + form) */
.reflect2-homework {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* Canvas multi-question form */
.reflect2-canvas-form {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Day 0 orientation page */
.reflect2-day0 {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Comment edit page */
.reflect2-edit-comment {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Thanks pages - narrower for centered content */
.reflect2-thanks,
.reflect2-day0-thanks {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Quotes gallery page */
.reflect2-quotes {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Empty state message */
.reflect2-empty-state {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Add post CTA widget */
.reflect2-add-post-cta {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Language preference page */
.reflect2-lang-pref {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Permalink page already has max-width */

/* No posts message */
.reflect2-no-posts {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* End message for infinite scroll */
.surface-container .status {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================================
   WIDER SCREEN PADDING (lg+)
   More breathing room inside cards for comfortable reading
   =========================================== */

@media (min-width: 992px) {
    /* Post cards in feed - generous horizontal padding for reading comfort */
    .reflect2-post-card {
        padding: 1.5rem 2.25rem;
        margin-bottom: 1.25rem;
    }
    
    /* Permalink page - generous padding for focused reading */
    .permalink-header {
        padding: 20px 32px;
    }
    
    .permalink-content {
        padding: 24px 32px;
    }
    
    .permalink-actions {
        padding: 14px 32px;
    }
    
    .permalink-prompt {
        padding: 16px 32px;
    }
    
    /* Prompt card - more padding for curriculum content */
    .reflect2-prompt-card .card-header {
        padding: 1.25rem 2rem;
    }
    
    .reflect2-prompt-card .card-body {
        padding: 1.75rem 2rem;
    }
    
    /* Homework form area */
    .reflect2-form {
        padding: 0 1rem;
    }
    
    /* Day 0 content sections */
    .day0-section .card-body {
        padding: 1.5rem 2rem;
    }
    
    /* Comments section */
    .permalink-comments {
        padding: 20px 32px;
    }
}

/* Extra generous spacing on very wide screens (1200px+) */
@media (min-width: 1200px) {
    .reflect2-post-card {
        padding: 1.75rem 2.75rem;
        margin-bottom: 1.5rem;
    }
    
    .permalink-content {
        padding: 28px 44px;
    }
    
    .permalink-header {
        padding: 24px 44px;
    }
    
    .permalink-actions {
        padding: 16px 44px;
    }
    
    .permalink-prompt {
        padding: 18px 44px;
    }
    
    .permalink-comments {
        padding: 24px 44px;
    }
    
    .reflect2-prompt-card .card-body {
        padding: 2rem 2.75rem;
    }
}

/* Maximum comfort on ultrawide (1400px+) */
@media (min-width: 1400px) {
    .reflect2-post-card {
        padding: 2rem 3rem;
    }
    
    .permalink-content {
        padding: 32px 52px;
    }
    
    .permalink-header {
        padding: 28px 52px;
    }
    
    .permalink-actions {
        padding: 18px 52px;
    }
    
    .reflect2-prompt-card .card-body {
        padding: 2.25rem 3rem;
    }
}

/* On smaller screens, remove centering constraints */
@media (max-width: 992px) {
    .reflect2-main,
    .reflect2-nav,
    .reflect2-post-card,
    .reflect2-pinned-post .card,
    .reflect2-quote .card,
    .reflect2-search-header,
    .reflect2-profile-warning .alert,
    .reflect2-explore-more,
    .reflect2-prompt-card,
    .reflect2-sort-menu,
    .reflect2-form,
    .reflect2-edit,
    .reflect2-homework,
    .reflect2-canvas-form,
    .reflect2-day0,
    .reflect2-edit-comment,
    .reflect2-thanks,
    .reflect2-day0-thanks,
    .reflect2-quotes,
    .reflect2-empty-state,
    .reflect2-add-post-cta,
    .reflect2-lang-pref,
    .reflect2-no-posts,
    .surface-container .status {
        max-width: none;
    }
}

/* ===========================================
   SMALL SCREEN OPTIMIZATIONS (< 576px)
   Tighter spacing to maximize content area
   =========================================== */

/* Avatar column - default (desktop) */
.reflect2-avatar-col {
    margin-right: 1rem;  /* 16px */
}

.reflect2-avatar-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

/* Larger avatar variant (for pinned posts) */
.reflect2-avatar-img-lg {
    width: 56px;
    height: 56px;
}

/* Small screens - reduce avatar size and spacing */
@media (max-width: 575px) {
    /* Tighter card padding */
    .reflect2-post-card {
        padding: 1rem 0.875rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }
    
    /* Smaller avatar */
    .reflect2-avatar-img {
        width: 40px;
        height: 40px;
    }
    
    /* Large avatar also scales down */
    .reflect2-avatar-img-lg {
        width: 44px;
        height: 44px;
    }
    
    /* Less margin between avatar and content */
    .reflect2-avatar-col {
        margin-right: 0.625rem;  /* 10px */
    }
    
    /* Slightly smaller text for density */
    .reflect2-post-body {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Compact actions row */
    .reflect2-actions {
        font-size: 0.85rem;
        margin-top: 0.625rem;
    }
    
    /* Quick reply form tighter */
    .reflect2-quick-reply {
        padding: 6px 0;
    }
    
    /* Author name smaller */
    .reflect2-post-card .text-muted {
        font-size: 0.9rem;
    }
    
    /* Pinned post card body tighter */
    .reflect2-pinned-post .card-body {
        padding: 1rem;
    }
}

/* Extra small screens (< 400px) - even tighter */
@media (max-width: 399px) {
    .reflect2-post-card {
        padding: 0.875rem 0.75rem;
    }
    
    .reflect2-avatar-img {
        width: 36px;
        height: 36px;
    }
    
    .reflect2-avatar-img-lg {
        width: 40px;
        height: 40px;
    }
    
    .reflect2-avatar-col {
        margin-right: 0.5rem;  /* 8px */
    }
    
    .reflect2-post-body {
        font-size: 0.95rem;
    }
    
    .reflect2-pinned-post .card-body {
        padding: 0.875rem;
    }
}

/* ===========================================
   SELF-PACED POD STYLES
   =========================================== */

/* Status Cards (homework page) */
.sp-status-card {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.sp-status-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.sp-status-card p {
    color: #666;
    margin-bottom: 0.5rem;
}

.sp-status-card .sp-icon {
    font-size: 3rem;
    display: block;
}

/* Deadline passed - coral/warning tone */
.sp-status-card.sp-deadline-passed {
    background: rgba(212, 133, 106, 0.12);
}

.sp-status-card.sp-deadline-passed .sp-icon {
    color: #d4856a;
}

/* Completed - sage/success tone, compact banner */
.sp-status-card.sp-completed {
    background: rgba(127, 163, 127, 0.15);
    padding: 1.5rem 1.5rem;
    border-radius: 12px;
}

.sp-status-card.sp-completed h3 {
    font-size: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.4rem;
}

.sp-status-card.sp-completed p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sp-status-card.sp-completed .sp-icon {
    color: #7fa37f;
    font-size: 2rem;
}

.sp-status-card.sp-completed .btn-outline-secondary {
    color: #5a6650;
    border-color: #5a6650;
}
.sp-status-card.sp-completed .btn-outline-secondary:hover,
.sp-status-card.sp-completed .btn-outline-secondary:focus {
    background-color: #5a6650;
    border-color: #5a6650;
    color: #fff;
}

/* Waiting state - clean white with subtle shadow */
.sp-status-card.sp-waiting {
    background: #fff;
    box-shadow: 0 4px 20px rgba(45, 106, 106, 0.08);
}

.sp-status-card.sp-waiting .sp-icon {
    color: #5a6650;
}

/* Intro Banner (day0 page) */
.sp-intro-banner {
    background: linear-gradient(135deg, rgba(45, 106, 106, 0.08) 0%, rgba(127, 163, 127, 0.1) 100%);
    border-radius: 12px;
    border-left: 4px solid #2d6a6a;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.sp-intro-banner h5 {
    color: #2d6a6a;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.sp-intro-banner ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    color: #555;
}

.sp-intro-banner ul li {
    margin-bottom: 0.35rem;
}

.sp-intro-banner a {
    color: #666;
    text-decoration: underline;
    font-size: 0.9rem;
}

.sp-intro-banner a:hover {
    color: #2d6a6a;
}

/* Archive Badge (feed post cards) */
.sp-archive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background-color: #6c757d;
    color: #fff;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.sp-archive-badge i {
    font-size: 0.65rem;
}

/* Disabled action states for archived posts */
.reflect2-actions .sp-action-disabled {
    cursor: default;
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive adjustments for status cards */
@media (max-width: 575px) {
    .sp-status-card {
        padding: 2rem 1.25rem;
    }
    
    .sp-status-card h3 {
        font-size: 1.25rem;
    }
    
    .sp-status-card .sp-icon {
        font-size: 2.5rem;
    }
    
    .sp-intro-banner {
        padding: 1rem 1.25rem;
    }
}

/* ======================================
   Comments Modal Styling (Updated Jan 2026)
   ====================================== */

#cmtModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#cmtModal .modal-header {
    background: var(--ss-cream, #faf6f1);
    border-bottom: 1px solid #e9ecef;
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cmtModal .modal-header .close {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
}

#cmtModal .modal-header .btn-outline-secondary {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

#cmtModal .modal-title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-weight: 600;
    color: #2d3436;
}

#cmtModal .modal-body {
    padding: 1.5rem;
    max-height: 55vh;
    overflow-y: auto;
}

#cmtModal .modal-footer {
    background: var(--ss-cream, #faf6f1);
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 16px 16px;
    padding: 0.75rem 1.25rem;
}

#cmtModal .modal-footer .reflect2-modal-comment-form {
    margin: 0;
    padding: 0;
}

#cmtModal .modal-footer .form-control {
    border: 1px solid #e9ecef;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#cmtModal .modal-footer .form-control:focus {
    border-color: #2d6a6a;
    box-shadow: 0 0 0 2px rgba(45, 106, 106, 0.1);
}

#cmtModal .modal-footer .btn-info {
    background: #2d6a6a;
    border-color: #2d6a6a;
}

#cmtModal .modal-footer .btn-info:hover {
    background: #1a4a4a;
    border-color: #1a4a4a;
}

/* Hide the inline comment form from ajax_getAllCmt since we have one in footer */
#cmtModalBody .modal-comment-form {
    display: none !important;
}

/* Make images responsive in modal */
#cmtModalBody img {
    max-width: 100%;
    height: auto;
}

/* Comment items in modal - match permalink list style */
#cmtModalBody .reflect2-comment {
    padding: 1rem 0;
    margin-bottom: 0;
}

#cmtModalBody .reflect2-comment:last-child {
    border-bottom: none !important;
}

/* Remove max-height from comments list since modal body handles scrolling */
#cmtModalBody .comments-list {
    max-height: none !important;
    overflow-y: visible !important;
}

/* Responsive adjustments for modal */
@media (max-width: 768px) {
    #cmtModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #cmtModal .modal-body {
        max-height: 45vh;
        padding: 1rem;
    }
    
    #cmtModal .modal-footer {
        padding: 0.75rem 1rem;
    }
}


/* ===========================================
   EVENT PILL (homework/index completion banner)
   Mirrors the dashboard's .pod-event-badge so members
   recognize it at a glance when moving between pages.
   =========================================== */

.reflect2-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    background: linear-gradient(135deg, #D4856A 0%, #C46A50 100%);
    color: #fff !important;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 999px;
    text-decoration: none !important;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(212, 133, 106, 0.35);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.reflect2-event-pill i {
    font-size: 0.7rem;
}

.reflect2-event-pill:hover,
.reflect2-event-pill:focus {
    background: linear-gradient(135deg, #C46A50 0%, #B05540 100%);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 133, 106, 0.45);
}

/* On very narrow screens keep the date visible (unlike the dashboard,
   where the date pill is secondary). If the row gets cramped, wrap. */
.reflect2-status-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .reflect2-event-pill {
        font-size: 0.68rem;
        padding: 3px 9px;
    }
}


/* ===========================================
   EVENT RSVP BANNER
   =========================================== */

.reflect2-rsvp-banner {
    margin-top: 12px;
    padding: 0 4px;
}

.reflect2-rsvp-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #fff7ed, #fff1e0);
    border: 1px solid #f5dfc0;
    border-radius: 8px;
}

.reflect2-rsvp-text {
    font-size: 0.88rem;
    color: #7a5a2e;
    white-space: nowrap;
}

.reflect2-rsvp-text i {
    margin-right: 6px;
    font-size: 0.92rem;
    color: #c67a30;
}

.reflect2-rsvp-btn {
    display: inline-block;
    padding: 5px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff !important;
    background: linear-gradient(135deg, #e8874a, #d4703a);
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s;
}

.reflect2-rsvp-btn:hover,
.reflect2-rsvp-btn:focus,
.reflect2-rsvp-btn:active {
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #d4703a, #c26030);
    box-shadow: 0 2px 6px rgba(212, 112, 58, 0.3);
}

@media (max-width: 480px) {
    .reflect2-rsvp-inner {
        flex-direction: column;
        gap: 8px;
        padding: 10px 14px;
        text-align: center;
    }
    
    .reflect2-rsvp-text {
        white-space: normal;
    }
}

/* ===========================================
   COMMENT HEART FEEDBACK
   =========================================== */

/* Filled state for comment hearts (after click or already-hearted) */
.cmt-heart.cmt-heart-liked i {
    color: #C62828 !important;
}

/* Subtle single-throb pulse for "already hearted" acknowledgment */
@keyframes cmt-heart-pulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.25); }
    60%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.cmt-heart-pulse i {
    animation: cmt-heart-pulse 0.4s ease-in-out;
}

/* ===========================================
   COMMENT UX ENHANCEMENTS
   =========================================== */

/* Highlight animation for anchor-linked or newly-posted comments */
@keyframes cmt-highlight-fade {
    0%   { background-color: rgba(255, 236, 179, 0.5); }
    100% { background-color: transparent; }
}

.cmt-highlight {
    animation: cmt-highlight-fade 2.5s ease-out forwards;
    border-radius: 6px;
}

/* @mention chip in replies */
.cmt-mention {
    color: #17a2b8;
    font-weight: 600;
    font-size: 0.88em;
}

/* Show more replies link in collapsed threads */
.replies-show-more {
    text-align: center;
    padding: 6px 0;
    margin: 2px 0;
}

.replies-show-more a {
    font-size: 0.82rem;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.replies-show-more a:hover {
    color: #17a2b8;
}

/* === EXPLORE STYLES — BEGIN (v0.6) ================================== */

/* Explore button in feed actions row */
.reflect2-explore-btn {
    transition: color 0.15s ease;
}
.reflect2-explore-btn:hover {
    color: #5a6650 !important;
}

/* Candidate question options */
.explore-candidates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.explore-candidate {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
    background: #fbfaf5;
    border: 1px solid #f0ece4;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0;
    font-weight: normal;
}

.explore-candidate:hover {
    border-color: #c8b090;
    background: #f8f5ee;
}

.explore-candidate:has(input:checked),
.explore-candidate.explore-candidate-selected {
    border-color: #5a6650;
    background: #f2f0e8;
    box-shadow: 0 0 0 1px #5a6650;
}

.explore-candidate:has(input:checked) .explore-candidate-text,
.explore-candidate.explore-candidate-selected .explore-candidate-text {
    color: #3a3428;
    font-weight: 500;
}

.explore-candidate input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #5a6650;
}

.explore-candidate-text {
    font-size: 0.9rem;
    color: #3a3428;
    line-height: 1.5;
}

.explore-candidate-custom {
    border-style: dashed;
    background: #fff;
}

.explore-custom-textarea,
.explore-note-textarea {
    border: 1px solid #e5ddcb;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: none;
}

.explore-custom-textarea:focus,
.explore-note-textarea:focus {
    border-color: #c8b090;
    box-shadow: 0 0 0 2px rgba(200, 176, 144, 0.15);
}

@media (max-width: 640px) {
    #exploreModal .modal-dialog {
        margin: 0.5rem;
    }
    .explore-candidate {
        padding: 0.6rem 0.7rem;
    }
    .explore-candidate-text {
        font-size: 0.85rem;
    }
}

/* === EXPLORE STYLES — END =========================================== */

/* === BOT COMMENT STYLES — BEGIN (v0.6 Phase 3) ====================== */

.pod-bot-comment {
    background: #faf8f3;
    border: 1px solid #f0ece4;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin-top: 0.5rem;
}

.pod-bot-comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.pod-bot-comment-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.pod-bot-comment-label {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
}

.pod-bot-comment-question {
    font-size: 0.9rem;
    color: #5a5040;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f5f0e6;
    border-radius: 6px;
}

.pod-bot-comment-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #3a3428;
}

.pod-bot-comment-body p {
    margin-bottom: 0.6rem;
}

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

.pod-bot-comment-cta {
    margin-top: 0.85rem;
    text-align: right;
}

.pod-bot-discuss-btn {
    display: inline-block;
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: underline;
}

.pod-bot-discuss-btn:hover,
.pod-bot-discuss-btn:focus {
    color: #0056b3;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .pod-bot-comment {
        padding: 0.85rem;
    }
    .pod-bot-comment-body {
        font-size: 0.88rem;
    }
}

/* === BOT COMMENT STYLES — END ======================================= */

/* === DISCOVERY COMMENT STYLES — BEGIN (v0.6 Phase 5) ================ */

.pod-bot-discovery {
    padding: 0.25rem 0;
}

.pod-bot-discovery-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #3a3428;
}

.pod-bot-discovery-body p {
    margin-bottom: 0.6rem;
}

.pod-bot-discovery-body p:last-child {
    margin-bottom: 0;
}

.pod-bot-discovery-attribution {
    border-top: 1px solid #f0ece4;
    padding-top: 0.5rem;
}

/* === DISCOVERY COMMENT STYLES — END ================================= */

/* =====================================================================
   === POD BOT STYLES — BEGIN (v0.5a) ==================================

   Rendered by pod_bot_render_post_html() in
   /var/www/bin/funcs/hourly/pod/bot-post.inc

   v0.5a (attribution flip): the human whose reflection raised the
   question authors the post. Their quote is the centerpiece; the bot's
   take is a small annotation card below.

   To update: replace everything between this BEGIN marker and the END
   marker at the bottom. The marker comments are intentional — they
   make it easy to regenerate this block cleanly in future.
   ===================================================================== */

.pod-bot-post {
    /* inherits .reflect2-post body padding */
}

/* ---------- The author's excerpt — the centerpiece ---------- */

.pod-bot-excerpt {
    margin: 0.25rem 0 0.4rem 0;
    padding: 0.85rem 1.15rem;
    background: #fbfaf5;
    border-left: 3px solid #c8b090;
    border-radius: 4px;
    font-size: 1.02em;
    color: #3a3428;
    line-height: 1.6;
    font-style: italic;
}

.pod-bot-excerpt-attrib {
    margin: 0 0 1.25rem 0;
    color: #a59a85;
    font-size: 0.85rem;
    text-align: right;
    font-style: italic;
}

.pod-bot-excerpt-attrib a {
    color: #8a7a5e;
    text-decoration: underline;
    text-decoration-color: #e5ddcb;
    text-underline-offset: 2px;
}

.pod-bot-excerpt-attrib a:hover {
    color: #5a4a20;
    text-decoration-color: #c8b090;
}

/* ---------- Bot's annotation card — quieter, smaller ---------- */

.pod-bot-annotation {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 6px;
    font-size: 0.93rem;
}

.pod-bot-annotation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Hard-pin the bot avatar so large photo_url images don't blow up the
   layout. !important deliberately — this is a defensive constraint. */
.pod-bot-annotation-avatar {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    max-width: 22px;
    border-radius: 50%;
    flex: 0 0 auto;
    opacity: 0.85;
    object-fit: cover;
    border: 0;
}

.pod-bot-annotation-label {
    font-size: 0.78rem;
    color: #a59a85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.pod-bot-annotation-body {
    color: #5a5246;
    line-height: 1.6;
    margin-bottom: 0.85rem;
}

.pod-bot-annotation-body p {
    margin: 0 0 0.75rem 0;
}

.pod-bot-annotation-body p:last-child {
    margin-bottom: 0;
}

.pod-bot-annotation-cta {
    text-align: right;
    margin-top: 0.5rem;
}

/* "Continue this conversation →" pill */
.pod-bot-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    color: #5a4a20 !important;
    text-decoration: none !important;
    border: 1px solid #c8b090;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.18s ease;
    background: linear-gradient(135deg, #fff7ed, #fff1e0);
    box-shadow: 0 1px 2px rgba(160, 130, 80, 0.08);
}

.pod-bot-continue-btn:hover {
    background: linear-gradient(135deg, #fff1e0, #ffe7cc);
    border-color: #a58a5a;
    color: #3a2d10 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(160, 130, 80, 0.18);
    text-decoration: none !important;
}

.pod-bot-continue-btn i {
    font-size: 0.8rem;
    transition: transform 0.18s ease;
    color: #8a7a5e;
}

.pod-bot-continue-btn:hover i {
    transform: translateX(3px);
    color: #5a4a20;
}

/* ---------- Bot-authored fallback (rare — day-0 intros) ---------- */

.pod-bot-botauthored .pod-bot-excerpt {
    /* When there's no human-attributed quote, .pod-bot-excerpt is used
       to render the question. Same visual treatment. */
    font-style: normal;
}

/* ---------- Mobile tweaks ---------- */

@media (max-width: 640px) {
    .pod-bot-excerpt {
        padding: 0.7rem 0.9rem;
        font-size: 0.98em;
    }
    .pod-bot-annotation {
        padding: 0.75rem 0.9rem;
    }
    .pod-bot-continue-btn {
        font-size: 0.84rem;
        padding: 0.45rem 0.85rem;
    }
}

/* === POD BOT STYLES — END =========================================== */
