/**
 * Software Discussion System - Friendly Chat Interface
 * Modern SaaS community style (Circle/Discord inspired)
 */

/* Override Astra Theme Container Padding - Full Width */
body .ast-container,
body .ast-container-fluid,
.ast-container,
.ast-container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
}

.sm-discussion-page .ast-container,
.sm-discussion-page .ast-container-fluid,
.sm-discussion-page .site-content .ast-container,
.sm-discussion-page .site-content .ast-container-fluid,
.sm-discussion-single-page .ast-container,
.sm-discussion-single-page .ast-container-fluid,
.sm-discussion-single-page .site-content .ast-container,
.sm-discussion-single-page .site-content .ast-container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Remove any wrapper padding */
.sm-discussion-page .site-content,
.sm-discussion-page .ast-separate-container .ast-article-single,
.sm-discussion-page .ast-separate-container .ast-article-post,
.sm-discussion-single-page .site-content,
.sm-discussion-single-page .ast-separate-container .ast-article-single,
.sm-discussion-single-page .ast-separate-container .ast-article-post {
    padding: 0 !important;
    margin: 0 !important;
}

.sm-discussion-page #primary,
.sm-discussion-page .entry-content,
.sm-discussion-single-page #primary,
.sm-discussion-single-page .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset & Base */
.sm-discussion-page {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sm-discussion-page * {
    box-sizing: border-box;
}

/* Header */
.sm-discussion-header {
    background: #003049;
    color: #fff;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sm-discussion-header-content {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sm-discussion-software-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sm-discussion-software-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sm-discussion-software-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #fff;
}

.sm-discussion-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.sm-discussion-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sm-discussion-back-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Main Layout - 2 Column Grid */
.sm-discussion-layout {
    max-width: 100%;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    padding: 1.5rem 2rem;
    min-height: calc(100vh - 180px);
    box-sizing: border-box;
}

/* Sidebar */
.sm-discussion-sidebar {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 320px;
    flex-shrink: 0;
}

.sm-sidebar-header {
    margin-bottom: 1.5rem;
}

.sm-sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* Category Navigation */
.sm-category-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: block;
}

/* Hide mobile select on desktop */
.sm-category-nav-mobile {
    display: none;
}

.sm-category-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    padding-left: 0.625rem;
    margin-bottom: 0.375rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.875rem;
    border-left: 4px solid transparent;
    white-space: nowrap;
}

.sm-category-item:hover {
    background: #f7fafc;
    color: #2d3748;
    transform: translateX(2px);
}

.sm-category-item.active {
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sm-cat-icon {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Icon colors for each category */
.sm-category-item[data-category="all"] .sm-cat-icon {
    color: #003049;
}

.sm-category-item[data-category="general"] .sm-cat-icon {
    color: #64748b;
}

.sm-category-item[data-category="ideas"] .sm-cat-icon {
    color: #f59e0b;
}

.sm-category-item[data-category="qna"] .sm-cat-icon {
    color: #0284c7;
}

.sm-category-item[data-category="bugs"] .sm-cat-icon {
    color: #dc2626;
}

/* Icon color when active - white */
.sm-category-item.active .sm-cat-icon {
    color: #ffffff;
    transform: scale(1.1);
}

.sm-cat-label {
    flex: 1;
}

.sm-cat-count {
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(0,0,0,0.08);
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}

/* All Discussions - Dark Blue */
.sm-category-item[data-category="all"] {
    border-left: 4px solid #003049 !important;
}

.sm-category-item[data-category="all"]:hover {
    background: rgba(0, 48, 73, 0.08) !important;
    border-left-color: #003049 !important;
}

.sm-category-item[data-category="all"].active {
    background: linear-gradient(135deg, #003049 0%, #004d66 100%) !important;
    border-left-color: #001f2e !important;
}

.sm-category-item[data-category="all"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* General - Gray */
.sm-category-item[data-category="general"] {
    border-left: 4px solid #64748b !important;
}

.sm-category-item[data-category="general"]:hover {
    background: rgba(100, 116, 139, 0.08) !important;
    border-left-color: #64748b !important;
}

.sm-category-item[data-category="general"].active {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    border-left-color: #475569 !important;
}

.sm-category-item[data-category="general"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Ideas & Requests - Orange/Amber */
.sm-category-item[data-category="ideas"] {
    border-left: 4px solid #f59e0b !important;
}

.sm-category-item[data-category="ideas"]:hover {
    background: rgba(245, 158, 11, 0.08) !important;
    border-left-color: #f59e0b !important;
}

.sm-category-item[data-category="ideas"].active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-left-color: #d97706 !important;
}

.sm-category-item[data-category="ideas"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Q&A - Blue */
.sm-category-item[data-category="qna"] {
    border-left: 4px solid #0284c7 !important;
}

.sm-category-item[data-category="qna"]:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    border-left-color: #0284c7 !important;
}

.sm-category-item[data-category="qna"].active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-left-color: #0369a1 !important;
}

.sm-category-item[data-category="qna"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Bug Reports - Red */
.sm-category-item[data-category="bugs"] {
    border-left: 4px solid #dc2626 !important;
}

.sm-category-item[data-category="bugs"]:hover {
    background: rgba(220, 38, 38, 0.08) !important;
    border-left-color: #dc2626 !important;
}

.sm-category-item[data-category="bugs"].active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    border-left-color: #b91c1c !important;
}

.sm-category-item[data-category="bugs"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Official Announcements - Purple/Gold (Special) */
.sm-category-item[data-category="announcements"] {
    border-left: 4px solid #9333ea !important;
}

.sm-category-item[data-category="announcements"]:hover {
    background: rgba(147, 51, 234, 0.08) !important;
    border-left-color: #9333ea !important;
}

.sm-category-item[data-category="announcements"].active {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%) !important;
    border-left-color: #7e22ce !important;
}

.sm-category-item[data-category="announcements"].active .sm-cat-count {
    background: rgba(255, 255, 255, 0.25) !important;
}

.sm-category-item[data-category="announcements"] .sm-cat-icon {
    color: #9333ea;
}

/* New Post Button */
.sm-new-post-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: #003049;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 48, 73, 0.25);
}

.sm-new-post-btn:hover {
    background: #004d66;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.35);
}

.sm-new-post-btn .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
}

/* Main Feed */
.sm-discussion-feed {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 600px;
    width: 100%;
    border: 1px solid #e2e8f0;
    overflow: visible;
    max-height: none;
}

/* Feed Header */
.sm-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

#sm-feed-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#sm-feed-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, #003049 0%, #0284c7 100%);
    border-radius: 2px;
}

/* Search Box - Enhanced Professional Style */
.sm-discussion-search-wrapper,
.sm-search-box {
    position: relative;
    flex: 1;
    max-width: 450px;
}

.sm-feed-header .sm-search-box {
    position: relative;
}

.sm-discussion-search-wrapper .dashicons,
.sm-search-box .dashicons,
.sm-feed-header .sm-search-box .dashicons,
.sm-feed-header .sm-search-box .dashicons-search {
    position: absolute !important;
    right: 1rem !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #64748b;
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    z-index: 2;
}

.sm-discussion-search-input,
.sm-search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.125rem;
    border: 2px solid #cbd5e0 !important;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 400;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    outline: none !important;
    box-shadow: none !important;
}

.sm-discussion-search-input::placeholder,
.sm-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.sm-discussion-search-input:hover,
.sm-search-input:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.sm-discussion-search-input:focus,
.sm-search-input:focus {
    outline: none !important;
    border-color: #003049 !important;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 48, 73, 0.12), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.sm-discussion-search-input:focus + .dashicons,
.sm-search-input:focus ~ .dashicons {
    color: #003049;
}

/* Search box loading state */
.sm-discussion-search-wrapper.loading .sm-discussion-search-input,
.sm-search-box.loading .sm-search-input {
    background-image: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Discussion Table List */
.sm-discussion-table-wrapper {
    overflow-x: hidden;
    overflow-y: visible;
    max-height: none;
}

.sm-discussion-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none !important;
    table-layout: fixed;
}

.sm-discussion-table * {
    border-left: none !important;
    border-right: none !important;
}

.sm-discussion-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #cbd5e0;
}

.sm-discussion-table th {
    padding: 1.125rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.8125rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #cbd5e0;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    position: relative;
}

.sm-discussion-table th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #003049;
    transition: width 0.3s ease;
}

.sm-discussion-table th:hover::after {
    width: 100%;
}

.sm-col-topic {
    width: 50%;
}

.sm-col-replies,
.sm-col-views {
    width: 15%;
    text-align: center;
}

.sm-col-activity {
    width: 20%;
    text-align: right;
}

.sm-discussion-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    cursor: pointer;
}

.sm-discussion-table tbody tr:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0, 48, 73, 0.08);
    transform: translateX(4px);
    border-left: 3px solid #003049;
}

.sm-discussion-table tbody tr:last-child {
    border-bottom: none;
}

.sm-discussion-table td {
    padding: 1.25rem;
    vertical-align: middle;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
}

.sm-discussion-row {
    cursor: pointer;
}

.sm-topic-cell {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.sm-topic-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sm-topic-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
}

.sm-topic-avatar:first-child {
    margin-left: 0;
}

.sm-topic-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sm-topic-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sm-topic-title a {
    color: #0f172a;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sm-topic-title a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #003049;
    transition: width 0.3s ease;
}

.sm-topic-title a:hover {
    color: #003049;
    text-decoration: none;
}

.sm-topic-title a:hover::after {
    width: 100%;
}

.sm-topic-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #718096;
    overflow: hidden;
    flex-wrap: wrap;
}

.sm-topic-author {
    font-weight: 500;
}

.sm-topic-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.sm-topic-category.general {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    border-color: #7dd3fc;
}

.sm-topic-category.ideas {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border-color: #fcd34d;
}

.sm-topic-category.qna {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-color: #93c5fd;
}

.sm-topic-category.announcements {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7e22ce;
    border-color: #d8b4fe;
}

.sm-topic-category.bugs {
    background: #fee2e2;
    color: #dc2626;
}

.sm-topic-category.announcements {
    background: #e0e7ff;
    color: #4f46e5;
}

.sm-replies-cell,
.sm-views-cell {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.sm-replies-cell {
    color: #0369a1;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    padding: 0.5rem !important;
}

.sm-views-cell {
    color: #64748b;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    padding: 0.5rem !important;
}

.sm-activity-cell {
    text-align: right;
}

.sm-activity-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.sm-activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.sm-activity-avatar:hover {
    transform: scale(1.1);
    border-color: #003049;
    box-shadow: 0 4px 8px rgba(0,48,73,0.2);
}

.sm-activity-time {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.sm-activity-time {
    font-size: 0.875rem;
    color: #718096;
}

.sm-loading-row td {
    padding: 3rem 1rem;
}

/* Empty State for Table */
.sm-empty-row td {
    padding: 3rem 1rem;
    text-align: center;
}

/* Discussion List (old style - keep for single page) */
.sm-discussion-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Discussion Card - Chat Style with category color accent */
.sm-chat-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-left: 4px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sm-chat-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Category-specific left border colors for cards */
.sm-chat-card[data-category="general"] {
    border-left-color: #64748b;
}

.sm-chat-card[data-category="ideas"] {
    border-left-color: #f59e0b;
}

.sm-chat-card[data-category="qna"] {
    border-left-color: #0284c7;
}

.sm-chat-card[data-category="bugs"] {
    border-left-color: #dc2626;
}

/* Enhanced hover effect with category color */
.sm-chat-card[data-category="general"]:hover {
    border-left-color: #475569;
    box-shadow: -4px 0 0 0 #64748b, 0 4px 12px rgba(0,0,0,0.08);
}

.sm-chat-card[data-category="ideas"]:hover {
    border-left-color: #d97706;
    box-shadow: -4px 0 0 0 #f59e0b, 0 4px 12px rgba(0,0,0,0.08);
}

.sm-chat-card[data-category="qna"]:hover {
    border-left-color: #0369a1;
    box-shadow: -4px 0 0 0 #0284c7, 0 4px 12px rgba(0,0,0,0.08);
}

.sm-chat-card[data-category="bugs"]:hover {
    border-left-color: #b91c1c;
    box-shadow: -4px 0 0 0 #dc2626, 0 4px 12px rgba(0,0,0,0.08);
}

/* Announcements card styling */
.sm-chat-card[data-category="announcements"] {
    border-left-color: #9333ea;
    background: linear-gradient(to right, rgba(147, 51, 234, 0.02) 0%, #ffffff 100%);
}

.sm-chat-card[data-category="announcements"]:hover {
    border-left-color: #7e22ce;
    box-shadow: -4px 0 0 0 #9333ea, 0 4px 12px rgba(147, 51, 234, 0.15);
    background: linear-gradient(to right, rgba(147, 51, 234, 0.04) 0%, #ffffff 100%);
}

/* Card Header */
.sm-chat-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sm-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.sm-chat-meta {
    flex: 1;
    min-width: 0;
}

.sm-chat-author-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}

.sm-chat-author {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9375rem;
}

.sm-vendor-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: #003049;
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.sm-chat-time {
    color: #a0aec0;
    font-size: 0.8125rem;
}

/* Category Badge - Matches sidebar category colors exactly */
.sm-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

/* General - Gray (matches sidebar #64748b) */
.sm-cat-badge.general {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border-color: #64748b;
}

.sm-cat-badge.general:hover {
    background: rgba(100, 116, 139, 0.2);
    border-color: #475569;
}

/* Ideas & Requests - Orange/Amber (matches sidebar #f59e0b) */
.sm-cat-badge.ideas {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border-color: #f59e0b;
}

.sm-cat-badge.ideas:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #d97706;
}

/* Q&A - Blue (matches sidebar #0284c7) */
.sm-cat-badge.qna {
    background: rgba(2, 132, 199, 0.12);
    color: #0369a1;
    border-color: #0284c7;
}

.sm-cat-badge.qna:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0369a1;
}

/* Bug Reports - Red (matches sidebar #dc2626) */
.sm-cat-badge.bugs {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    border-color: #dc2626;
}

.sm-cat-badge.bugs:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: #b91c1c;
}

/* Official Announcements - Purple (matches sidebar #9333ea) */
.sm-cat-badge.announcements {
    background: rgba(147, 51, 234, 0.12);
    color: #7e22ce;
    border-color: #9333ea;
    font-weight: 700;
}

.sm-cat-badge.announcements:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: #7e22ce;
}

/* Card Content */
.sm-chat-content {
    margin-bottom: 1rem;
}

.sm-chat-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.sm-chat-message {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.9375rem;
    margin: 0;
}

/* Attachment Display */
.sm-chat-attachment,
.sm-reply-attachment {
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-width: 500px;
}

.sm-attachment-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sm-chat-attachment:hover .sm-attachment-image,
.sm-reply-attachment:hover .sm-attachment-image {
    transform: scale(1.02);
}

.sm-chat-attachment a,
.sm-reply-attachment a {
    display: block;
    text-decoration: none;
}

@media (max-width: 768px) {
    .sm-chat-attachment,
    .sm-reply-attachment {
        max-width: 100%;
    }
}

/* Card Footer */
.sm-chat-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f7fafc;
}

.sm-chat-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #718096;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-chat-action:hover {
    background: #f7fafc;
    color: #4a5568;
}

.sm-chat-action.voted {
    background: #e6f2f5;
    color: #003049;
}

.sm-chat-action .dashicons {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

/* Replies Section */
.sm-chat-replies {
    margin-top: 1rem;
    padding-left: 3rem;
    border-left: 3px solid #e2e8f0;
}

.sm-reply-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.sm-reply-card:last-child {
    margin-bottom: 0;
}

.sm-reply-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
}

.sm-reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.sm-reply-author {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
}

.sm-reply-time {
    color: #a0aec0;
    font-size: 0.75rem;
}

.sm-reply-message {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.875rem;
    margin: 0;
}

/* Loading State */
.sm-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #a0aec0;
}

.sm-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #003049;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sm-loading-state p {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Empty State */
.sm-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.sm-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.sm-empty-state h3 {
    font-size: 1.25rem;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.sm-empty-state p {
    color: #718096;
    font-size: 0.9375rem;
    margin: 0;
}

/* Load More */
.sm-load-more-wrap {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f7fafc;
}

.sm-load-more-btn {
    padding: 0.75rem 2rem;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-load-more-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* Modal */
.sm-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sm-modal-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.sm-modal-small {
    max-width: 500px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid #f7fafc;
}

.sm-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.sm-modal-close {
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.sm-modal-close .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.sm-modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.sm-chat-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* File Upload Styles */
.sm-file-upload-wrapper {
    position: relative;
}

.sm-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sm-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    font-weight: 500;
}

.sm-file-label:hover {
    border-color: #003049;
    background: #edf2f7;
    color: #003049;
}

.sm-file-label .dashicons {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

.sm-file-text {
    font-size: 0.9375rem;
}

.sm-file-preview {
    position: relative;
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.sm-preview-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    background: #f7fafc;
}

.sm-remove-file {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-remove-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.sm-remove-file .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
}

.sm-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.sm-form-field label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9375rem;
}

.sm-label-icon {
    font-size: 1.125rem;
}

.sm-input-field,
.sm-textarea-field,
.sm-select-field {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #f7fafc;
}

.sm-input-field:focus,
.sm-textarea-field:focus,
.sm-select-field:focus {
    outline: none;
    border-color: #003049;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.sm-textarea-field {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.sm-select-field {
    cursor: pointer;
}

/* Form Actions */
.sm-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.sm-btn-cancel,
.sm-btn-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sm-btn-cancel {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.sm-btn-cancel:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.sm-btn-submit {
    background: #003049;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 48, 73, 0.25);
}

.sm-btn-submit:hover {
    background: #004d66;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.35);
}

.sm-btn-submit .dashicons,
.sm-btn-cancel .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
}

/* Notification Toast */
.sm-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
    font-weight: 500;
}

.sm-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.sm-toast-success {
    background: #d1fae5;
    border: 2px solid #6ee7b7;
    color: #065f46;
}

.sm-toast-error {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 1024px) {
    .sm-discussion-layout {
        grid-template-columns: 260px 1fr;
        padding: 1.5rem 1rem;
    }
    
    .sm-discussion-sidebar {
        width: 260px;
    }
}

@media (max-width: 768px) {
    /* Page Layout */
    .sm-discussion-page {
        padding: 0;
        margin: 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Header */
    .sm-discussion-header {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .sm-discussion-header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .sm-discussion-software-info {
        flex-direction: row;
        gap: 0.75rem;
        width: 100%;
    }
    
    .sm-discussion-software-logo {
        width: 48px;
        height: 48px;
    }
    
    .sm-discussion-software-name {
        font-size: 1.25rem;
    }
    
    .sm-discussion-subtitle {
        font-size: 0.875rem;
    }
    
    .sm-discussion-back-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }
    
    /* Layout */
    .sm-discussion-layout {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        width: 100%;
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* Sidebar */
    .sm-discussion-sidebar {
        position: static;
        padding: 1rem;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .sm-sidebar-header h3 {
        font-size: 1rem;
    }
    
    /* Hide horizontal scroll category nav on mobile */
    .sm-category-nav {
        display: none;
    }
    
    /* Show dropdown select for categories on mobile */
    .sm-category-nav-mobile {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .sm-category-select {
        width: 100%;
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        background: #003049;
        color: #fff;
        border: 2px solid #004d66;
        border-radius: 10px;
        font-size: 0.9375rem;
        font-weight: 600;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
        transition: all 0.2s ease;
    }
    
    .sm-category-select:focus {
        outline: none;
        border-color: #0284c7;
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
    }
    
    .sm-category-select option {
        background: #fff;
        color: #1a202c;
        padding: 0.75rem;
    }
    
    /* Webkit scrollbar styling for category nav */
    .sm-category-nav::-webkit-scrollbar {
        height: 6px;
    }
    
    .sm-category-nav::-webkit-scrollbar-track {
        background: #e2e8f0;
        border-radius: 3px;
    }
    
    .sm-category-nav::-webkit-scrollbar-thumb {
        background: #003049;
        border-radius: 3px;
    }
    
    .sm-category-nav::-webkit-scrollbar-thumb:hover {
        background: #004d66;
    }
    
    .sm-category-item {
        flex-shrink: 0;
        margin-bottom: 0;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .sm-cat-icon {
        font-size: 1rem;
    }
    
    .sm-cat-count {
        display: none;
    }
    
    .sm-new-post-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Feed */
    .sm-discussion-feed {
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
        border: none;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .sm-feed-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    #sm-feed-title {
        font-size: 1.125rem;
    }
    
    #sm-feed-title::before {
        height: 24px;
    }
    
    .sm-discussion-search-wrapper,
    .sm-search-box {
        max-width: none;
        width: 100%;
    }
    
    .sm-discussion-search-input,
    .sm-search-input {
        padding: 0.75rem 2.75rem 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .sm-discussion-search-wrapper .dashicons,
    .sm-search-box .dashicons {
        font-size: 1.125rem;
        width: 1.125rem;
        height: 1.125rem;
        right: 0.875rem !important;
    }
    
    /* Table */
    .sm-discussion-table-wrapper {
        overflow-x: hidden;
        width: 100%;
    }
    
    .sm-discussion-table {
        width: 100%;
    }
    
    .sm-discussion-table thead {
        display: none;
    }
    
    .sm-discussion-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 1rem;
        border-left: 3px solid #003049;
    }
    
    .sm-discussion-table tbody tr:hover {
        transform: none;
    }
    
    .sm-discussion-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        width: 100% !important;
    }
    
    .sm-topic-cell {
        margin-bottom: 0.75rem;
        width: 100%;
    }
    
    .sm-topic-avatars {
        display: none;
    }
    
    .sm-topic-content {
        width: 100%;
    }
    
    .sm-topic-title {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
    }
    
    .sm-topic-title a {
        white-space: normal;
        overflow: visible;
    }
    
    .sm-topic-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sm-topic-category {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
    
    .sm-replies-cell,
    .sm-views-cell,
    .sm-activity-cell {
        display: inline-block;
        width: auto !important;
        text-align: left;
        margin-right: 1rem;
        padding: 0.25rem 0.5rem !important;
        font-size: 0.875rem;
    }
    
    .sm-replies-cell::before {
        content: '💬 ';
    }
    
    .sm-views-cell::before {
        content: '👁 ';
    }
    
    .sm-activity-cell {
        width: 100% !important;
        margin-top: 0.5rem;
        padding-top: 0.75rem !important;
        border-top: 1px solid #f1f5f9;
    }
    
    .sm-activity-content {
        justify-content: flex-start;
        gap: 0.5rem;
    }
    
    .sm-activity-avatar {
        width: 28px;
        height: 28px;
    }
    
    .sm-activity-time {
        font-size: 0.8125rem;
    }
    
    /* Chat Cards */
    .sm-chat-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .sm-chat-header {
        gap: 0.75rem;
    }
    
    .sm-chat-avatar {
        width: 36px;
        height: 36px;
    }
    
    .sm-chat-title {
        font-size: 1rem;
    }
    
    .sm-chat-message {
        font-size: 0.875rem;
    }
    
    .sm-chat-footer {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .sm-chat-action {
        padding: 0.375rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    .sm-chat-replies {
        padding-left: 1rem;
        border-left-width: 2px;
    }
    
    /* Modal */
    .sm-modal-container {
        max-width: 95%;
        margin: 1rem;
        max-height: 85vh;
    }
    
    .sm-modal-header {
        padding: 1rem;
    }
    
    .sm-modal-header h3 {
        font-size: 1.125rem;
    }
    
    .sm-modal-body {
        padding: 1rem;
    }
    
    /* Form */
    .sm-form-actions {
        flex-direction: column;
    }
    
    .sm-btn-cancel,
    .sm-btn-submit {
        width: 100%;
        justify-content: center;
    }
    
    /* Loading & Empty States */
    .sm-loading-state,
    .sm-empty-state {
        padding: 2rem 1rem;
    }
    
    .sm-spinner {
        width: 36px;
        height: 36px;
    }
}

/* Sidebar Footer - Links (Roadmap & Guidelines) */
.sm-sidebar-footer {
    margin-top: auto;
    padding: 16px 0 0 0;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #c0c0c0;
}

.sm-sidebar-link:hover {
    background: #a8a8a8;
    color: #003049;
    text-decoration: none;
    transform: translateX(2px);
}

.sm-sidebar-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .sm-sidebar-footer {
        padding: 12px 0 0 0;
    }
    
    .sm-sidebar-link {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Community Guidelines Modal */
.sm-guidelines-modal .sm-modal-container {
    max-width: 600px;
}

.sm-guidelines-modal-header {
    background: #003049;
    color: #ffffff;
    text-align: center;
    padding: 24px 20px;
}

.sm-guidelines-modal-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

.sm-guidelines-modal-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
}

.sm-guidelines-modal-header h3 {
    color: #ffffff;
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 600;
}

.sm-guidelines-modal-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 13px;
}

.sm-guidelines-modal-body {
    padding: 0;
}

.sm-guidelines-content-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding: 24px;
    background: #f9fafb;
}

.sm-guideline-item-compact {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border-left: 3px solid #003049;
}

.sm-guideline-icon-compact {
    flex-shrink: 0;
}

.sm-guideline-icon-compact .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #003049;
}

.sm-guideline-text-compact h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.sm-guideline-text-compact p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.sm-guidelines-footer-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.sm-guidelines-footer-note a {
    color: #003049;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.sm-guidelines-footer-note a:hover {
    text-decoration: underline;
}

.sm-guidelines-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.sm-guidelines-actions button {
    flex: 1;
}

/* Scrollbar styling for guidelines */
.sm-guidelines-content-scroll::-webkit-scrollbar {
    width: 8px;
}

.sm-guidelines-content-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sm-guidelines-content-scroll::-webkit-scrollbar-thumb {
    background: #003049;
    border-radius: 4px;
}

.sm-guidelines-content-scroll::-webkit-scrollbar-thumb:hover {
    background: #004d66;
}

@media (max-width: 768px) {
    .sm-guidelines-modal .sm-modal-container {
        max-width: 95%;
        margin: 20px;
    }
    
    .sm-guidelines-content-scroll {
        max-height: 300px;
        padding: 16px;
    }
    
    .sm-guideline-item-compact {
        padding: 12px;
    }
    
    .sm-guidelines-actions {
        flex-direction: column;
    }
}

/* Login Modal Styles for Discussion Page */
#sm-discussion-login-modal .sm-modal-container {
    max-width: 500px;
}

#sm-discussion-login-modal .sm-login-required {
    background: #fff;
}

#sm-discussion-login-modal .sm-login-header {
    background: #003049;
    color: #fff;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
}

#sm-discussion-login-modal .sm-site-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

#sm-discussion-login-modal .sm-brand-name {
    color: #fff;
    font-size: 1.125rem;
    margin: 0;
}

#sm-discussion-login-modal .sm-review-subheading {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin: 0;
}

#sm-discussion-login-modal .sm-login-close-btn {
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#sm-discussion-login-modal .sm-login-close-btn:hover {
    opacity: 1;
}

#sm-discussion-login-modal .sm-login-content {
    padding: 2rem;
}

#sm-discussion-login-modal .sm-login-heading-inline {
    font-size: 1.25rem;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

#sm-discussion-login-modal .sm-login-paragraph-inline {
    color: #4a5568;
    margin: 0 0 1.5rem 0;
}

#sm-discussion-login-modal .sm-login-form input[type="text"],
#sm-discussion-login-modal .sm-login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

#sm-discussion-login-modal .sm-login-form input[type="text"]:focus,
#sm-discussion-login-modal .sm-login-form input[type="password"]:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

#sm-discussion-login-modal .sm-login-form input[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #003049;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#sm-discussion-login-modal .sm-login-form input[type="submit"]:hover {
    background: #004d66;
    transform: translateY(-1px);
}

#sm-discussion-login-modal .sm-social-login-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

#sm-discussion-login-modal .sm-social-login-divider span {
    background: #fff;
    padding: 0 1rem;
    color: #718096;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

#sm-discussion-login-modal .sm-social-login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

#sm-discussion-login-modal .sm-register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #4a5568;
    font-size: 0.9375rem;
}

#sm-discussion-login-modal .sm-register-link a {
    color: #003049;
    font-weight: 600;
    text-decoration: none;
}

#sm-discussion-login-modal .sm-register-link a:hover {
    text-decoration: underline;
}

/* Attachment Styles */
.sm-chat-attachment,
.sm-reply-attachment {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.sm-chat-attachment a,
.sm-reply-attachment a {
    display: block;
    text-decoration: none;
}

.sm-attachment-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.sm-attachment-image:hover {
    border-color: #003049;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.15);
}

.sm-chat-attachment {
    max-width: 400px;
}

.sm-reply-attachment {
    max-width: 300px;
}

@media (max-width: 768px) {
    .sm-chat-attachment,
    .sm-reply-attachment {
        max-width: 100%;
    }
}

/* Table Responsive Styles */
@media (max-width: 768px) {
    .sm-discussion-table thead {
        display: none;
    }
    
    .sm-discussion-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .sm-discussion-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
    }
    
    .sm-topic-cell {
        margin-bottom: 0.75rem;
    }
    
    .sm-replies-cell,
    .sm-views-cell,
    .sm-activity-cell {
        display: inline-block;
        width: auto;
        text-align: left;
        margin-right: 1rem;
    }
    
    .sm-replies-cell::before {
        content: '💬 ';
    }
    
    .sm-views-cell::before {
        content: '👁 ';
    }
    
    .sm-activity-content {
        justify-content: flex-start;
    }
}

/* Single Discussion Page Styles */
.sm-single-discussion-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 2rem;
}

.sm-discussion-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #718096;
}

.sm-discussion-breadcrumb a {
    color: #003049;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sm-discussion-breadcrumb a:hover {
    color: #004d66;
    text-decoration: underline;
}

.sm-discussion-breadcrumb .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.sm-single-discussion-post {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.sm-post-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sm-post-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    flex-shrink: 0;
}

.sm-post-meta {
    flex: 1;
}

.sm-post-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.sm-post-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #718096;
}

.sm-post-author {
    font-weight: 600;
    color: #2d3748;
}

.sm-post-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3748;
}

.sm-post-attachment {
    margin-top: 1.5rem;
    max-width: 500px;
}

.sm-post-attachment .sm-attachment-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sm-post-attachment .sm-attachment-image:hover {
    border-color: #003049;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sm-replies-section {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sm-replies-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f7fafc;
}

.sm-replies-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sm-single-reply {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 3px solid #003049;
}

.sm-single-reply .sm-reply-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.sm-single-reply .sm-reply-content {
    flex: 1;
}

.sm-single-reply .sm-reply-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sm-single-reply .sm-reply-author {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9375rem;
}

.sm-single-reply .sm-reply-time {
    color: #a0aec0;
    font-size: 0.8125rem;
}

.sm-single-reply .sm-reply-message {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.sm-reply-form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f7fafc;
}

.sm-reply-form-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
}

.sm-reply-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.sm-reply-textarea:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.sm-reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.sm-file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-file-upload-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.sm-file-input {
    display: none;
}

.sm-reply-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #003049;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-reply-submit-btn:hover {
    background: #004d66;
    transform: translateY(-1px);
}

.sm-login-prompt {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #003049 0%, #004d66 100%);
    border-radius: 16px;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 48, 73, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.sm-login-prompt p {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.6;
}

.sm-login-prompt a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sm-login-prompt a:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.sm-login-prompt a::before {
    content: "🔐 ";
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .sm-single-discussion-container {
        padding: 1rem;
        width: 100%;
    }
    
    .sm-discussion-breadcrumb {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }
    
    .sm-single-discussion-post,
    .sm-replies-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .sm-post-title {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    .sm-post-header {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .sm-post-avatar {
        width: 44px;
        height: 44px;
    }
    
    .sm-post-info {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.8125rem;
    }
    
    .sm-post-content {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .sm-replies-heading {
        font-size: 1.125rem;
    }
    
    .sm-single-reply {
        flex-direction: row;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .sm-single-reply .sm-reply-avatar {
        width: 36px;
        height: 36px;
    }
    
    .sm-single-reply .sm-reply-message {
        font-size: 0.875rem;
    }
    
    .sm-reply-form-section h3 {
        font-size: 1rem;
    }
    
    .sm-reply-textarea {
        font-size: 0.875rem;
        padding: 0.875rem;
    }
    
    .sm-reply-form-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .sm-file-upload-btn,
    .sm-reply-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Make attachments responsive on mobile */
    .sm-post-attachment,
    .sm-chat-attachment,
    .sm-reply-attachment {
        max-width: 100%;
        margin-top: 0.75rem;
    }
    
    .sm-post-attachment .sm-attachment-image,
    .sm-attachment-image {
        max-width: 100%;
        width: 100%;
    }
    
    .sm-login-prompt {
        padding: 2rem 1rem;
        margin-top: 1rem;
    }
    
    .sm-login-prompt p {
        font-size: 1rem;
    }
    
    .sm-login-prompt a {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Image Lightbox Modal */
.sm-image-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sm-image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.sm-image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 100000;
}

.sm-image-modal-close:hover,
.sm-image-modal-close:focus {
    color: #bbb;
}

.sm-discussion-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Share Button and Modal Styles */
.sm-post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.sm-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #003049 0%, #004d66 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 48, 73, 0.25);
}

.sm-share-btn:hover {
    background: linear-gradient(135deg, #004d66 0%, #006080 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.35);
}

.sm-share-btn .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
}

/* Share Modal */
.sm-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sm-share-modal.show {
    opacity: 1;
}

.sm-share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.sm-share-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sm-share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid #f7fafc;
}

.sm-share-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.sm-share-modal-close {
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-share-modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.sm-share-modal-close .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.sm-share-modal-body {
    padding: 1.5rem;
}

.sm-share-link-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sm-share-link-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    background: #f7fafc;
    color: #2d3748;
    font-family: monospace;
}

.sm-share-link-input:focus {
    outline: none;
    border-color: #003049;
    background: #fff;
}

.sm-copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: #003049;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sm-copy-link-btn:hover {
    background: #004d66;
    transform: translateY(-1px);
}

.sm-copy-link-btn .dashicons {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

.sm-share-social-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.sm-share-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #fff;
}

.sm-share-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.sm-share-social-btn .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
}

.sm-share-twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%);
    border-color: #1DA1F2;
}

.sm-share-twitter:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a6fb3 100%);
}

.sm-share-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0e5fc7 100%);
    border-color: #1877F2;
}

.sm-share-facebook:hover {
    background: linear-gradient(135deg, #0e5fc7 0%, #0a4a9c 100%);
}

.sm-share-linkedin {
    background: linear-gradient(135deg, #0A66C2 0%, #084d92 100%);
    border-color: #0A66C2;
}

.sm-share-linkedin:hover {
    background: linear-gradient(135deg, #084d92 0%, #063a6f 100%);
}

.sm-share-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
    border-color: #25D366;
}

.sm-share-whatsapp:hover {
    background: linear-gradient(135deg, #1da851 0%, #158a3f 100%);
}

/* Share Notification */
.sm-share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    max-width: 400px;
}

.sm-share-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.sm-share-notification-success {
    background: #d1fae5;
    border: 2px solid #6ee7b7;
    color: #065f46;
}

.sm-share-notification-error {
    background: #fee2e2;
    border: 2px solid #fca5a5;
    color: #991b1b;
}

.sm-share-notification .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sm-post-actions {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .sm-share-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .sm-share-modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .sm-share-modal-header,
    .sm-share-modal-body {
        padding: 1rem;
    }
    
    .sm-share-modal-header h3 {
        font-size: 1.125rem;
    }
    
    .sm-share-link-box {
        flex-direction: column;
    }
    
    .sm-copy-link-btn {
        width: 100%;
        justify-content: center;
    }
    
    .sm-share-social-buttons {
        grid-template-columns: 1fr;
    }
    
    .sm-share-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.875rem;
    }
}
