.as-forum-admin,
.as-forum-admin *,
.as-forum-admin *::before,
.as-forum-admin *::after,
.as-forum-frontend,
.as-forum-frontend *,
.as-forum-frontend *::before,
.as-forum-frontend *::after { box-sizing: border-box; }

.as-forum-admin { font-family: Arial, sans-serif; color: #222; background: #fff; padding: 15px; }
.as-forum-header { margin-bottom: 1em; border-bottom: 2px solid #007acc; }
.as-forum-header h3 { margin: 0 0 8px; color: #007acc; }
.as-forum-layout { display: flex; gap: 20px; width: 100%; }
.as-forum-sidebar { width: 220px; flex: 0 0 220px; background: #f5f5f5; padding: 15px; border-radius: 6px; }
.as-forum-sidebar ul { list-style: none; margin: 0; padding: 0; }
.as-forum-sidebar li { margin-bottom: 1em; }
.as-forum-sidebar li:last-child { margin-bottom: 0; }
.as-forum-sidebar a { display: block; padding: 8px 12px; border-radius: 4px; text-decoration: none; color: #fff; font-weight: bold; background: #1794DD; }
.as-forum-sidebar a:hover, .as-forum-sidebar a.active { background: #FDEAB3; color: #000; }
.as-forum-sidebar-info { margin-top: 20px; padding: 10px; border: 1px solid #ccd6df; border-radius: 6px; background: #fff; }
.as-forum-sidebar-info h4 { margin: 0 0 10px; color: #007acc; font-size: 1em; }
.as-forum-sidebar-info > ul { margin: 0; padding: 0; }
.as-forum-sidebar-info > ul > li { margin: 0 0 10px; padding: 0 0 10px; border-bottom: 1px solid #e3e7eb; }
.as-forum-sidebar-info > ul > li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.as-forum-sidebar-info > ul > li > a { padding: 0; color: #007acc; background: transparent; font-weight: bold; }
.as-forum-sidebar-info > ul > li > a:hover { color: #000; background: transparent; }
.as-forum-sidebar-info small { display: block; margin-top: 3px; color: #666; line-height: 1.3; }
.as-forum-sidebar-info p { margin: 0; color: #666; font-size: .9em; }
.as-forum-content { flex: 1 1 auto; min-width: 0; }
.as-forum-footer { margin-top: 2em; text-align: center; font-size: .9em; color: #666; background: #EAEAEA; padding: 10px; }
.as-forum-footer p { margin: 0; }

.as-forum-box { margin-bottom: 18px; padding: 16px; border: 1px solid #d7dde3; border-radius: 6px; background: #fff; }
.as-forum-box h3 { margin: 0 0 14px; color: #007acc; }
.as-forum-statistics { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 14px; }
.as-forum-statistics div { padding: 18px; text-align: center; border-radius: 6px; background: #f2f6fa; }
.as-forum-statistics strong { display: block; font-size: 1.8em; color: #007acc; }
.as-forum-statistics span { color: #555; }
.as-forum-form label { display: block; margin: 0 0 13px; font-weight: bold; }
.as-forum-form input[type="text"], .as-forum-form input[type="number"], .as-forum-form textarea, .as-forum-form select { display: block; width: 100%; margin-top: 5px; padding: 8px; border: 1px solid #bfc8d1; border-radius: 4px; font: inherit; }
.as-forum-form .as-forum-check { font-weight: normal; }
.as-forum-form .as-forum-check input { margin-right: 6px; }
.as-forum-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.as-forum-table-wrap { overflow-x: auto; }
.as-forum-table { width: 100%; border-collapse: collapse; }
.as-forum-table th, .as-forum-table td { padding: 9px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.as-forum-table th { background: #f2f6fa; }
.as-forum-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.as-forum-actions form { margin: 0; }
.as-forum-button, .as-forum-admin button { display: inline-block; padding: 7px 10px; border: 0; border-radius: 4px; background: #1794DD; color: #fff; text-decoration: none; cursor: pointer; font: inherit; }
.as-forum-button:hover, .as-forum-admin button:hover { background: #FDEAB3; color: #000; }
.as-forum-admin button.danger { background: #b83a3a; }
.as-forum-success, .as-forum-error { padding: 10px 12px; margin-bottom: 14px; border-radius: 6px; }
.as-forum-success { background: #e9f7ef; border: 1px solid #9ed8b2; color: #1d5b31; }
.as-forum-error { background: #f8d7da; border: 1px solid #e0a2a8; color: #721c24; }
.as-forum-help { line-height: 1.55; }
.as-forum-shortcodes { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.as-forum-shortcodes code { display: inline-block; padding: 4px 6px; border-radius: 4px; background: #eef4f9; color: #1f4f75; }

.as-forum-shortcode-board { margin: 16px 0; padding: 16px; border: 1px solid #d7dde3; border-radius: 6px; background: #fff; }
.as-forum-shortcode-board > header { margin-bottom: 14px; border-bottom: 2px solid #007acc; }
.as-forum-shortcode-board > header h3 { margin: 0 0 6px; color: #007acc; }
.as-forum-shortcode-board > header p { margin: 0 0 10px; }
.as-forum-shortcode-more { margin: 14px 0 0; text-align: right; }
.as-forum-shortcode-more a { color: #007acc; font-weight: bold; }

.as-forum-list-sidebar { padding: 12px; border: 1px solid #ccd6df; border-radius: 6px; background: #fff; }
.as-forum-list-sidebar h3 { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 2px solid #007acc; color: #007acc; font-size: 1.05em; }
.as-forum-list-sidebar ul { margin: 0; padding: 0; list-style: none; }
.as-forum-list-sidebar .as-forum-sidebar-topic { margin: 0 0 13px; padding: 0 0 13px; border-bottom: 1px solid #d5dce3; }
.as-forum-list-sidebar .as-forum-sidebar-topic:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.as-forum-list-sidebar li a { color: #007acc; text-decoration: none; }
.as-forum-list-sidebar li a:hover { color: #000; }
.as-forum-list-sidebar .as-forum-sidebar-topic-title { display: block; margin-bottom: 7px; font-weight: bold; }
.as-forum-list-sidebar .as-forum-sidebar-posts { padding-left: 12px; border-left: 3px solid #dcecf7; }
.as-forum-list-sidebar .as-forum-sidebar-posts li { margin: 0 0 8px; padding: 0; border: 0; }
.as-forum-list-sidebar .as-forum-sidebar-posts li:last-child { margin-bottom: 0; }
.as-forum-list-sidebar .as-forum-sidebar-posts a { display: block; color: #333; font-size: .92em; line-height: 1.35; }
.as-forum-list-sidebar .as-forum-sidebar-posts small { display: block; margin-top: 2px; color: #777; font-size: .78em; line-height: 1.3; }
.as-forum-sidebar-more { display: block; margin-top: 10px; padding: 7px 9px; border-radius: 4px; background: #1794DD; color: #fff; text-align: center; text-decoration: none; font-weight: bold; }
.as-forum-sidebar-more:hover { background: #FDEAB3; color: #000; }

.as-forum-frontend { color: #222; background: #fff; padding: 16px; }
.as-forum-front-header { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 2px solid #007acc; }
.as-forum-front-header h2 { margin: 0 0 6px; color: #007acc; }
.as-forum-front-header p { margin: 0; }
.as-forum-breadcrumb { margin-bottom: 15px; padding: 9px 12px; background: #f2f6fa; border-radius: 4px; }
.as-forum-breadcrumb a { color: #007acc; }
.as-forum-board-row, .as-forum-topic-row { display: flex; justify-content: space-between; gap: 20px; padding: 15px; margin-bottom: 10px; border: 1px solid #d7dde3; border-radius: 6px; color: #222; text-decoration: none; background: #fafcfe; }
.as-forum-board-row:hover, .as-forum-topic-row:hover { border-color: #1794DD; background: #f1f8fd; }
.as-forum-board-row > span:first-child, .as-forum-topic-row > span:first-child { flex: 1; }
.as-forum-board-row > span:last-child, .as-forum-topic-row > span:last-child { min-width: 145px; text-align: right; }
.as-forum-board-row strong, .as-forum-topic-row strong { display: block; color: #007acc; font-size: 1.08em; }
.as-forum-board-row small, .as-forum-topic-row small { display: block; margin-top: 4px; color: #666; }
.as-forum-topic > h3, .as-forum-board > h3, .as-forum-compose > h3 { color: #007acc; }
.as-forum-post { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin-bottom: 12px; border: 1px solid #d7dde3; border-radius: 6px; overflow: hidden; }
.as-forum-post aside { padding: 14px; background: #f2f6fa; }
.as-forum-post aside strong, .as-forum-post aside span { display: block; }
.as-forum-post aside span { margin-top: 6px; color: #666; font-size: .9em; }
.as-forum-post aside small { display: block; margin-top: 5px; color: #777; font-size: .78em; }
.as-forum-author-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #d6dde3; }
.as-forum-author-actions form { margin: 0; }
.as-forum-author-actions .as-forum-compose-toggle,
.as-forum-author-actions button.danger { width: 100%; margin: 0; padding: 6px 8px; border: 0; border-radius: 4px; color: #fff; cursor: pointer; font: inherit; font-size: .85em; font-weight: normal; }
.as-forum-author-actions .as-forum-compose-toggle { background: #1794DD; }
.as-forum-author-actions .as-forum-compose-toggle:hover,
.as-forum-author-actions .as-forum-compose-toggle[aria-expanded="true"] { background: #FDEAB3; color: #000; }
.as-forum-author-actions button.danger { background: #b83a3a; }
.as-forum-author-actions button.danger:hover { background: #8f2929; }
.as-forum-post-body { min-height: 100px; padding: 16px; line-height: 1.55; }
.as-forum-post-body blockquote { margin: 10px 0; padding: 10px 14px; border-left: 4px solid #1794DD; background: #f5f5f5; }
.as-forum-replies { margin-left: 36px; padding-left: 16px; border-left: 3px solid #dbe9f4; }
.as-forum-replies .as-forum-post { box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.as-forum-own-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e1e5e9; }
.as-forum-own-actions .as-forum-compose-toggle { margin-top: 0; }
.as-forum-compose-toggle { margin-top: 20px; padding: 9px 14px; border: 0; border-radius: 4px; background: #1794DD; color: #fff; cursor: pointer; font: inherit; font-weight: bold; }
.as-forum-compose-toggle:hover, .as-forum-compose-toggle[aria-expanded="true"] { background: #FDEAB3; color: #000; }
.as-forum-compose { margin-top: 20px; padding: 16px; border: 1px solid #d7dde3; border-radius: 6px; background: #f8f9fa; }
.as-forum-compose[hidden] { display: none !important; }
.as-forum-post-edit { margin-top: 12px; }
.as-forum-compose label { display: block; margin-bottom: 12px; font-weight: bold; }
.as-forum-compose input, .as-forum-compose textarea, .as-forum-report input { display: block; width: 100%; margin-top: 5px; padding: 9px; border: 1px solid #bfc8d1; border-radius: 4px; font: inherit; }
.as-forum-compose .trumbowyg-box { width: 100%; margin-top: 5px; background: #fff; }
.as-forum-compose .trumbowyg-editor { position: relative; z-index: 2; min-height: 220px; background: #fff !important; color: #222 !important; cursor: text; pointer-events: auto !important; user-select: text !important; }
.as-forum-compose .trumbowyg-overlay { display: none !important; pointer-events: none !important; }
.as-forum-compose .trumbowyg-box.trumbowyg-disabled .trumbowyg-editor { opacity: 1 !important; pointer-events: auto !important; }
.as-forum-compose button, .as-forum-report button { padding: 8px 12px; border: 0; border-radius: 4px; background: #1794DD; color: #fff; cursor: pointer; }
.as-forum-compose button:hover, .as-forum-report button:hover { background: #FDEAB3; color: #000; }
.as-forum-hint { color: #555; font-size: .92em; }
.as-forum-closed { padding: 9px 12px; color: #721c24; background: #f8d7da; border-radius: 4px; }
.as-forum-report { margin-top: 20px; font-size: .9em; }
.as-forum-report summary { color: #666; cursor: pointer; }
.as-forum-report form { display: flex; gap: 8px; align-items: end; margin-top: 8px; }

@media (max-width: 760px) {
    .as-forum-layout { flex-direction: column; }
    .as-forum-sidebar { width: 100%; flex-basis: auto; }
    .as-forum-statistics, .as-forum-columns { grid-template-columns: 1fr; }
    .as-forum-post { grid-template-columns: 1fr; }
    .as-forum-replies { margin-left: 12px; padding-left: 10px; }
    .as-forum-board-row, .as-forum-topic-row { flex-direction: column; }
    .as-forum-board-row > span:last-child, .as-forum-topic-row > span:last-child { text-align: left; }
    .as-forum-report form { display: block; }
    .as-forum-report button { margin-top: 8px; }
}

.as-forum-board-row { padding-left: calc(15px + (var(--forum-depth, 0) * 22px)); }
.as-forum-board-depth-0 { --forum-depth: 0; }
.as-forum-board-depth-1 { --forum-depth: 1; }
.as-forum-board-depth-2 { --forum-depth: 2; }
.as-forum-board-depth-3 { --forum-depth: 3; }
.as-forum-board-depth-4 { --forum-depth: 4; }
.as-forum-board-depth-5 { --forum-depth: 5; }
.as-forum-subboards { margin: 16px 0 20px; padding: 12px; border: 1px solid #d7dde3; border-radius: 6px; background: #f8fbfd; }
.as-forum-subboards h4 { margin: 0 0 10px; color: #007acc; }
.as-forum-subboards .as-forum-board-row { background: #fff; }
