/* ============================================================
   GLPbase Forum — Consolidated CSS
   Covers: forum home, category, thread, new-thread, search-results
   ============================================================ */

/* ------------------------------------------------------------
   1. Kadence Overrides (hide theme elements)
   ------------------------------------------------------------ */
.entry-hero-container-inner,
.entry-header,
.wp-block-kadence-header,
h1.entry-title,
.kadence-breadcrumbs,
.entry-hero-section-overlay,
.entry-hero,
.page-hero-section,
.hero-section-overlay { display: none !important }
.entry-content { padding-top: 0 !important; margin-top: 0 !important }
.site-main { padding-top: 0 !important }
.content-wrap { padding-top: 0 !important }
body.forum-page { display: block !important; max-width: none !important; width: 100% !important }
body.forum-page .glpb-main { width: 100% !important; max-width: none !important }
.page .content-area { margin-top: 0 !important; margin-bottom: 0 !important }
.page .entry-content-wrap { padding: 0 !important }

/* ------------------------------------------------------------
   2. Base / Shared
   ------------------------------------------------------------ */
* { box-sizing: border-box; margin: 0; padding: 0 }

/* --- Breadcrumb (shared across pages) --- */
.breadcrumb { max-width: 960px; margin: 0 auto; padding: 8px 24px; font-size: 14px; color: #888 }
.breadcrumb a { color: #3A7CA5; text-decoration: none }
.breadcrumb-bar { max-width: 960px; margin: 0 auto; padding: 8px 24px; font-size: 14px; color: #888 }
.breadcrumb-bar a { color: #3A7CA5; text-decoration: none }
.breadcrumb-bar a:hover { color: #C4A265 }

/* --- Small avatar (forum home + category list) --- */
.tb-avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: #1B2838; color: #C4A265; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; flex-shrink: 0; overflow: hidden; vertical-align: middle }
.tb-avatar-sm img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 48px 24px; color: #7A7A7A; font-size: 16px }

/* --- Reaction counts (forum home, category, thread) --- */
.reaction-counts { display: flex; gap: 6px; flex-shrink: 0; align-items: center; margin: 0 4px; flex-wrap: wrap }
.reaction-count { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; color: #555; background: #f5f3ee; border-radius: 12px; padding: 3px 10px; cursor: default }
.reaction-count .rc-emoji { font-size: 16px }
.reaction-count .rc-num { font-weight: 600 }

/* --- Pin / Bookmark button (forum home, category) --- */
.pin-btn { position: absolute; top: 10px; right: 10px; background: none; border: none; cursor: pointer; color: #ccc; transition: color .2s; padding: 6px; line-height: 1; z-index: 2 }
.pin-btn:hover { color: #C4A265 }
.pin-btn.pinned { color: #d32f2f }
.pin-btn .pin-icon { display: block }
.pin-btn .pin-tip { display: none; position: absolute; top: -28px; right: 0; background: #1B2838; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 4px; white-space: nowrap }
.pin-btn:hover .pin-tip { display: block }

/* --- Emoji picker (new-thread, thread reply/edit) --- */
.emoji-picker-popup { display: none; position: absolute; bottom: 110%; left: 0; background: #fff; border: 1px solid #E5DFD8; border-radius: 12px; padding: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.15); z-index: 200; width: 340px; max-height: 320px; overflow-y: auto }
.emoji-picker-popup.open { display: block }
.emoji-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #999; font-weight: 600; padding: 6px 2px 4px; margin-top: 4px }
.emoji-section-label:first-child { margin-top: 0 }
.emoji-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px }
.emoji-grid button { background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; border-radius: 6px; line-height: 1; transition: transform .15s, background .15s }
.emoji-grid button:hover { transform: scale(1.3); background: rgba(196,162,101,.1) }

/* --- Editor toolbar & upload preview (new-thread, thread reply/edit) --- */
.editor-toolbar { display: flex; gap: 8px; margin-top: 8px; align-items: center; position: relative }
.toolbar-btn { background: none; border: 1px solid #E5DFD8; border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; line-height: 1.2; transition: all .2s; font-family: 'Inter', sans-serif; color: #7A7A7A; display: inline-flex; align-items: center; gap: 5px }
.toolbar-btn[data-emoji-picker] { position: relative }
.toolbar-btn:hover { border-color: #C4A265; background: rgba(196,162,101,.08); color: #C4A265 }
.toolbar-btn .tb-icon { font-size: 16px; line-height: 1 }
.toolbar-btn .tb-label { font-size: 12px; font-weight: 500 }
.upload-preview { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px }
.upload-preview img { max-width: 80px; max-height: 80px; border-radius: 6px; border: 1px solid #E5DFD8; object-fit: cover }
.upload-status { font-size: 12px; color: #7A7A7A; margin-top: 4px }

/* --- Login prompt box (new-thread, thread page) --- */
.login-prompt-box { background: #f9f7f2; border: 1px solid #E5DFD8; border-radius: 12px; padding: 40px 24px; text-align: center; font-size: 15px; color: #666 }
.login-prompt-box a { color: #C4A265; font-weight: 600; text-decoration: none }

/* --- Section label (shared) --- */
.section-label { font-size: 15px; text-transform: uppercase; letter-spacing: 2px; color: #C4A265; font-weight: 600; margin-bottom: 14px; margin-top: 20px }

/* --- Guidelines link (category page) --- */
.guidelines-link { text-align: center; padding: 40px 0 0; font-size: 13px }
.guidelines-link a { color: #999; text-decoration: none }
.guidelines-link a:hover { color: #C4A265 }

/* ------------------------------------------------------------
   3. Forum Home Page
   ------------------------------------------------------------ */
.forum-hero { background: linear-gradient(135deg, #1B2838 0%, #2a3f55 100%); padding: 44px 24px 36px; text-align: center }
.forum-hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 36px; font-weight: 700; color: #fff; margin-bottom: 6px }
.forum-hero p { color: rgba(255,255,255,.6); font-size: 18px; margin-bottom: 20px }

.forum-search { max-width: 540px; margin: 0 auto; display: flex; gap: 8px }
.forum-search input { flex: 1; padding: 13px 18px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 18px; font-family: 'Inter', sans-serif }
.forum-search input::placeholder { color: rgba(255,255,255,.4) }
.forum-search button { padding: 13px 28px; background: #C4A265; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 17px; cursor: pointer; font-family: 'Inter', sans-serif }
.forum-search button:hover { background: #b8953a }

.forum-wrap { max-width: 960px; margin: 0 auto; padding: 24px 24px 48px }

/* --- Category rows --- */
.cat-list { margin-bottom: 32px }
.cat-row { display: flex; align-items: center; background: #fff; border: 1px solid #E5DFD8; border-radius: 8px; margin-bottom: 6px; text-decoration: none; transition: border-color .2s, box-shadow .2s; padding: 16px 20px; gap: 14px }
.cat-row:hover { border-color: #C4A265; box-shadow: 0 2px 8px rgba(196,162,101,.08) }
.cat-row-icon { width: 38px; height: 38px; background: #1B2838; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.cat-row-icon svg { width: 18px; height: 18px }
.cat-row-name { flex: 1; min-width: 0 }
.cat-row-name h3 { font-family: 'Playfair Display', serif; font-size: 21px; color: #1B2838; font-weight: 700; line-height: 1.3 }
.cat-row-name .cat-row-desc { font-size: 15px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cat-row-stats { display: flex; gap: 18px; flex-shrink: 0; text-align: center }
.cat-stat { min-width: 52px }
.cat-stat-num { font-size: 19px; font-weight: 700; color: #1B2838; line-height: 1 }
.cat-stat-label { font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: .3px }
.cat-row-last { flex-shrink: 0; width: 220px; text-align: right; overflow: hidden }
.cat-row-last .last-title { font-size: 14px; color: #1B2838; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3 }
.cat-row-last .last-meta { font-size: 12px; color: #999 }

/* --- Recent threads list (forum home) --- */
.recent-threads { margin-top: 8px }
.thread-item { display: flex; align-items: center; text-decoration: none; background: #fff; border: 1px solid #E5DFD8; border-radius: 8px; padding: 16px 18px; margin-bottom: 6px; transition: all .2s; gap: 14px; position: relative }
.thread-item:hover { border-color: #C4A265; box-shadow: 0 2px 12px rgba(196,162,101,.1) }
.thread-left { flex: 1; min-width: 0 }
.thread-item .thread-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px }
.thread-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C4A265; background: rgba(196,162,101,.1); padding: 3px 10px; border-radius: 4px }
.thread-item h4 { font-family: 'Playfair Display', serif; font-size: 21px; color: #1B2838; font-weight: 700; margin-bottom: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.thread-item .thread-excerpt { font-size: 15px; color: #888; line-height: 1.4; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.thread-stats { display: flex; gap: 24px; flex-shrink: 0; text-align: center; margin: 0 24px }
.thread-stats .ts { font-size: 13px; color: #888 }
.thread-stats .ts strong { display: block; font-size: 19px; color: #1B2838 }
.thread-last { flex-shrink: 0; width: 210px; text-align: right; overflow: hidden }
.thread-last .last-title { font-size: 14px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3 }
.thread-last .last-meta { font-size: 12px; color: #999 }
.author-link { font-size: 15px; color: #7A7A7A }
.search-clear { font-size: 13px; color: #3A7CA5; text-decoration: none; margin-left: 12px }

/* ------------------------------------------------------------
   4. Category Page
   ------------------------------------------------------------ */
.cat-hero { background: linear-gradient(135deg, #1B2838 0%, #2a3f55 100%); padding: 28px 24px 24px; text-align: center }
.cat-hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 34px; font-weight: 700; color: #fff; margin-bottom: 8px }
.cat-hero .login-area { font-size: 14px; color: rgba(255,255,255,.5) }
.cat-hero .login-area a { color: #C4A265; text-decoration: none; font-weight: 600 }
.cat-hero .btn-new { display: inline-block; background: #C4A265; color: #1B2838; padding: 9px 22px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; font-family: 'Inter', sans-serif }
.cat-hero .btn-new:hover { background: #b8953a }

.cat-wrap { max-width: 960px; margin: 0 auto; padding: 16px 24px 48px }

/* --- New thread CTA box (category pages) --- */
.new-thread-cta { background: linear-gradient(135deg, rgba(196,162,101,.08) 0%, rgba(196,162,101,.03) 100%); border: 1px dashed rgba(196,162,101,.4); border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 20px }
.new-thread-cta p { font-size: 15px; color: #7A7A7A; margin-bottom: 12px }
.new-thread-cta .btn-new-thread { display: inline-block; background: #C4A265; color: #1B2838; padding: 11px 28px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; font-family: 'Inter', sans-serif; transition: background .2s }
.new-thread-cta .btn-new-thread:hover { background: #b8953a }
.new-thread-cta .cta-login { font-size: 14px; color: #999 }
.new-thread-cta .cta-login a { color: #C4A265; font-weight: 600; text-decoration: none }

/* --- Subcategory rows --- */
.subcat-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E5DFD8; border-radius: 8px; padding: 14px 16px; margin-bottom: 5px; text-decoration: none; transition: border-color .2s, box-shadow .2s }
.subcat-row:hover { border-color: #C4A265; box-shadow: 0 2px 8px rgba(196,162,101,.08) }
.subcat-row h3 { font-family: 'Inter', sans-serif; font-size: 18px; color: #1B2838; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.subcat-row .ss { font-size: 13px; color: #888; flex-shrink: 0; min-width: 60px; text-align: center }
.subcat-row .ss strong { font-size: 15px; color: #1B2838; display: block }
.subcat-row .subcat-last { flex-shrink: 0; width: 210px; text-align: right; overflow: hidden }
.subcat-row .last-title { font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.subcat-row .last-meta { font-size: 12px; color: #999 }
.subcat-chevron { color: #ccc; flex-shrink: 0 }
.subcat-row:hover .subcat-chevron { color: #C4A265 }

/* --- Thread list items (category page) --- */
.thread-list-item { display: flex; align-items: center; gap: 14px; text-decoration: none; background: #fff; border: 1px solid #E5DFD8; border-radius: 8px; padding: 16px 18px; margin-bottom: 6px; transition: all .2s; position: relative }
.thread-list-item:hover { border-color: #C4A265; box-shadow: 0 2px 12px rgba(196,162,101,.1) }
.tl-left { flex: 1; min-width: 0 }
.thread-list-item h3 { font-family: 'Playfair Display', serif; font-size: 21px; color: #1B2838; font-weight: 700; margin-bottom: 3px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.thread-list-item .tl-meta { font-size: 15px; color: #7A7A7A; display: flex; gap: 8px; align-items: center; margin-bottom: 6px }
.thread-list-item .tl-subcat { display: inline-block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: #3A7CA5; background: rgba(58,124,165,.08); padding: 2px 8px; border-radius: 3px; margin-right: 4px }
.thread-list-item .tl-excerpt { font-size: 15px; color: #888; line-height: 1.4; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tl-stats { display: flex; gap: 24px; flex-shrink: 0; text-align: center; margin: 0 24px }
.tl-stats .ts { font-size: 13px; color: #888 }
.tl-stats .ts strong { display: block; font-size: 19px; color: #1B2838 }
.tl-last { flex-shrink: 0; width: 210px; text-align: right; overflow: hidden }
.tl-last .last-title { font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3 }
.tl-last .last-meta { font-size: 12px; color: #999 }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px }
.pagination button { padding: 8px 16px; border: 1px solid #E5DFD8; border-radius: 6px; background: #fff; color: #1B2838; font-size: 14px; cursor: pointer; font-family: 'Inter', sans-serif }
.pagination button:hover { border-color: #C4A265 }
.pagination button.active { background: #C4A265; color: #1B2838; border-color: #C4A265; font-weight: 600 }

/* ------------------------------------------------------------
   5. Thread Page
   ------------------------------------------------------------ */
.thread-hero { background: linear-gradient(135deg, #1B2838 0%, #2a3f55 100%); padding: 18px 24px 16px }
.thread-hero-inner { max-width: 800px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px }
.thread-hero .breadcrumb { font-size: 13px }
.thread-hero .breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none }
.thread-hero .breadcrumb a:hover { color: #C4A265 }
.thread-hero .breadcrumb span { color: rgba(255,255,255,.3); margin: 0 6px }
.thread-hero .thread-badge { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C4A265; background: rgba(196,162,101,.15); padding: 3px 10px; border-radius: 4px; margin-left: 8px }

.subscribe-btn { padding: 6px 14px; border: 1px solid rgba(196,162,101,.4); border-radius: 6px; background: transparent; color: #C4A265; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all .2s; display: none; white-space: nowrap }
.subscribe-btn:hover,
.subscribe-btn.active { background: #C4A265; color: #1B2838 }

.thread-wrap { max-width: 800px; margin: 0 auto; padding: 32px 24px 48px }

/* --- Thread post --- */
.thread-post { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #f0ece4 }
.thread-post h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 700; color: #1B2838; margin-bottom: 16px; line-height: 1.35 }
.thread-post .tp-author { display: flex; align-items: center; gap: 10px; margin-bottom: 16px }
.tb-avatar { width: 42px; height: 42px; border-radius: 50%; background: #1B2838; color: #C4A265; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; overflow: hidden }
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }
.tp-author-info { font-size: 14px; color: #7A7A7A; flex: 1 }
.tp-author-info strong { color: #1B2838; display: block; font-size: 16px }
.tp-author-date { font-size: 13px; color: #7A7A7A; text-align: right; flex-shrink: 0 }
.tp-content { font-family: 'Inter', sans-serif; font-size: 17px; color: #383838; line-height: 1.75 }
.tp-content p { margin-bottom: 14px }

/* --- Replies --- */
.replies-label { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: #C4A265; font-weight: 600; margin-bottom: 14px }
.reply-item { display: flex; gap: 10px; padding: 16px 0; border-top: 1px solid #f0ece4 }
.reply-item .tb-avatar { width: 34px; height: 34px; font-size: 13px }
.reply-body { flex: 1; min-width: 0 }
.reply-body .rb-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; flex-wrap: wrap }
.reply-body .rb-header strong { font-size: 15px; color: #1B2838 }
.reply-body .rb-header .rb-date { font-size: 13px; color: #7A7A7A; margin-left: auto }
.reply-body .rb-text { font-size: 16px; color: #383838; line-height: 1.7 }
.reply-body .rb-text p { margin-bottom: 6px }

/* --- Reply form --- */
.reply-form-wrap { display: flex; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #f0ece4 }
.reply-form-wrap .tb-avatar { width: 32px; height: 32px; font-size: 12px; margin-top: 2px }
.reply-form-inline { flex: 1 }
.reply-form-inline textarea { width: 100%; min-height: 80px; padding: 10px 12px; border: 1px solid #E5DFD8; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; resize: vertical; color: #383838 }
.reply-form-inline textarea:focus { outline: none; border-color: #C4A265 }
.reply-form-inline .rf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px }
.reply-form-inline .rf-submit { padding: 8px 20px; background: #C4A265; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif }
.reply-form-inline .rf-submit:hover { background: #b8953a }
.reply-form-inline .rf-submit:disabled { opacity: .5; cursor: default }
.rf-error { color: #d32f2f; font-size: 13px; margin-top: 6px; display: none }
.pending-notice { background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #856404 }

/* --- Reaction bar (thread page) --- */
.reaction-bar { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap }
.reaction-trigger { position: relative; display: inline-block }
.reaction-btn { background: none; border: 1px solid #E5DFD8; border-radius: 20px; padding: 5px 14px; font-size: 14px; cursor: pointer; font-family: 'Inter', sans-serif; color: #888; transition: all .2s; display: flex; align-items: center; gap: 4px }
.reaction-btn:hover { border-color: #C4A265; color: #C4A265 }
.reaction-btn.reacted { border-color: #C4A265; color: #C4A265; background: rgba(196,162,101,.08) }
.reaction-popup { display: none; position: absolute; bottom: 110%; left: 0; background: #fff; border: 1px solid #E5DFD8; border-radius: 16px; padding: 12px 16px; box-shadow: 0 4px 24px rgba(0,0,0,.18); z-index: 100 }
.reaction-popup.show { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 340px }
.reaction-popup button { background: none; border: none; font-size: 28px; cursor: pointer; padding: 8px; border-radius: 10px; transition: transform .15s, background .15s; line-height: 1 }
.reaction-popup button:hover { transform: scale(1.3); background: rgba(196,162,101,.12) }

/* --- Report / Edit / Block buttons --- */
.report-btn { background: none; border: none; color: #999; font-size: 12px; cursor: pointer; padding: 4px 8px; font-family: 'Inter', sans-serif; transition: color .2s }
.report-btn:hover { color: #d32f2f }
.report-form { background: #f9f7f2; border: 1px solid #E5DFD8; border-radius: 8px; padding: 14px; margin-top: 8px; display: none }
.report-form select { width: 100%; padding: 8px 10px; border: 1px solid #E5DFD8; border-radius: 6px; font-size: 13px; font-family: 'Inter', sans-serif; margin-bottom: 8px }
.report-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #E5DFD8; border-radius: 6px; font-size: 13px; font-family: 'Inter', sans-serif; min-height: 50px; resize: vertical; margin-bottom: 8px }
.report-form .report-actions { display: flex; gap: 8px; justify-content: flex-end }
.report-form button { padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; border: none }
.report-submit { background: #d32f2f; color: #fff }
.report-cancel { background: #E5DFD8; color: #1B2838 }
.report-success { color: #2e7d32; font-size: 12px; margin-top: 6px }
.edit-btn { background: none; border: none; color: #999; font-size: 12px; cursor: pointer; padding: 4px 8px; font-family: 'Inter', sans-serif; transition: color .2s }
.edit-btn:hover { color: #C4A265 }
.block-btn { background: none; border: none; color: #999; font-size: 12px; cursor: pointer; padding: 4px 8px; font-family: 'Inter', sans-serif; transition: color .2s }
.block-btn:hover { color: #d32f2f }
.blocked-placeholder { padding: 12px 16px; background: #f5f5f5; border: 1px solid #eee; border-radius: 8px; color: #999; font-size: 13px; font-style: italic; margin-bottom: 6px }

/* --- Edit area --- */
.edit-area textarea { width: 100%; min-height: 150px; padding: 12px; border: 1px solid #E5DFD8; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 15px; color: #383838; resize: vertical; line-height: 1.75 }
.edit-area textarea:focus { outline: none; border-color: #C4A265 }
.edit-actions { display: flex; gap: 8px; margin-top: 8px }
.edit-save { padding: 8px 20px; background: #C4A265; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif }
.edit-cancel { padding: 8px 20px; background: #E5DFD8; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif }
.edited-indicator { color: #999; font-size: 11px; font-style: italic; margin-left: 8px }

/* --- Mod toolbar --- */
.mod-toolbar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: #f9f7f2; border: 1px solid #E5DFD8; border-radius: 8px; margin-bottom: 20px }
.mod-btn { padding: 6px 14px; border: 1px solid #E5DFD8; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; background: #fff; color: #1B2838; transition: all .2s }
.mod-btn:hover { border-color: #C4A265; color: #C4A265 }
.mod-btn.active { background: #C4A265; color: #1B2838; border-color: #C4A265 }
.mod-btn.danger { background: #d32f2f; color: #fff; border-color: #d32f2f }

/* --- Thread notices --- */
.thread-notice { padding: 10px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px }
.thread-notice.locked { background: #fff3cd; border: 1px solid #ffc107; color: #856404 }
.thread-notice.pinned { background: rgba(196,162,101,.1); border: 1px solid rgba(196,162,101,.3); color: #C4A265 }
.thread-notice.slow { background: #e8f4fd; border: 1px solid #bee5eb; color: #0c5460 }

/* --- Poll styles --- */
.poll-box { background: #f9f7f2; border: 1px solid #E5DFD8; border-radius: 10px; padding: 20px; margin-top: 16px }
.poll-question { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 700; color: #1B2838; margin-bottom: 14px }
.poll-option { position: relative; border: 1px solid #E5DFD8; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; transition: all .2s; background: #fff; overflow: hidden }
.poll-option:hover { border-color: #C4A265 }
.poll-option.voted { border-color: #C4A265; background: rgba(196,162,101,.06) }
.poll-option-bar { position: absolute; top: 0; left: 0; height: 100%; background: rgba(196,162,101,.12); border-radius: 7px; transition: width .4s ease }
.poll-option.voted .poll-option-bar { background: rgba(196,162,101,.22) }
.poll-option-inner { position: relative; display: flex; justify-content: space-between; align-items: center; z-index: 1 }
.poll-option-label { font-size: 14px; color: #383838; font-weight: 500 }
.poll-option-pct { font-size: 13px; color: #7A7A7A; font-weight: 600; min-width: 42px; text-align: right }
.poll-total { font-size: 12px; color: #7A7A7A; margin-top: 6px; text-align: right }
.poll-check { color: #C4A265; font-weight: 700; margin-right: 6px; display: none }
.poll-option.voted .poll-check { display: inline }
.poll-create-btn { padding: 8px 18px; background: transparent; border: 1px solid rgba(196,162,101,.4); border-radius: 8px; color: #C4A265; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all .2s }
.poll-create-btn:hover { background: #C4A265; color: #1B2838 }
.poll-form { background: #f9f7f2; border: 1px solid #E5DFD8; border-radius: 10px; padding: 18px; margin-top: 12px; display: none }
.poll-form input[type=text] { width: 100%; padding: 9px 12px; border: 1px solid #E5DFD8; border-radius: 6px; font-size: 13px; font-family: 'Inter', sans-serif; margin-bottom: 8px; color: #383838 }
.poll-form input[type=text]:focus { outline: none; border-color: #C4A265 }
.poll-form label { font-size: 12px; color: #7A7A7A; font-weight: 600; display: block; margin-bottom: 4px }
.poll-form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px }
.poll-form .poll-submit { padding: 8px 18px; background: #C4A265; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif }
.poll-form .poll-submit:disabled { opacity: .5; cursor: default }
.poll-form .poll-cancel { padding: 8px 18px; background: #E5DFD8; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: 'Inter', sans-serif }
.poll-form .poll-add-opt { background: none; border: none; color: #C4A265; font-size: 12px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; padding: 4px 0 }
.poll-form .poll-add-opt:hover { text-decoration: underline }
.poll-error { color: #d32f2f; font-size: 13px; margin-top: 6px; display: none }

/* ------------------------------------------------------------
   6. New Thread Page
   ------------------------------------------------------------ */
.new-hero { background: linear-gradient(135deg, #1B2838 0%, #2a3f55 100%); padding: 48px 24px 40px; text-align: center }
.new-hero .breadcrumb { font-size: 13px; margin-bottom: 12px }
.new-hero .breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none }
.new-hero .breadcrumb a:hover { color: #C4A265 }
.new-hero .breadcrumb span { color: rgba(255,255,255,.3); margin: 0 6px }
.new-hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 30px; font-weight: 700; color: #fff }

.new-wrap { max-width: 680px; margin: 0 auto; padding: 32px 24px 48px }
.new-form { background: #fff; border: 1px solid #E5DFD8; border-radius: 12px; padding: 28px 24px }
.form-group { margin-bottom: 18px }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #1B2838; margin-bottom: 6px }
.form-group select,
.form-group input,
.form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid #E5DFD8; border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; color: #383838 }
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: #C4A265 }
.form-group textarea { min-height: 180px; resize: vertical; line-height: 1.6 }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px }
.btn-submit { padding: 12px 28px; background: #C4A265; color: #1B2838; border: none; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: 'Inter', sans-serif }
.btn-submit:hover { background: #b8953a }
.btn-submit:disabled { opacity: .5; cursor: default }
.btn-cancel { padding: 12px 20px; background: transparent; color: #7A7A7A; border: 1px solid #E5DFD8; border-radius: 8px; font-size: 14px; cursor: pointer; text-decoration: none; font-family: 'Inter', sans-serif; display: inline-flex; align-items: center }
.form-error { color: #d32f2f; font-size: 13px; margin-top: 8px; display: none }
.form-success { background: #e8f5e9; border: 1px solid #4caf50; border-radius: 8px; padding: 20px; text-align: center; font-size: 14px; color: #2e7d32; margin-top: 16px; display: none }
.form-success a { color: #C4A265; font-weight: 600; text-decoration: none }
.form-pending { background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; padding: 20px; text-align: center; font-size: 14px; color: #856404; margin-top: 16px; display: none }
.form-pending a { color: #C4A265; font-weight: 600; text-decoration: none }

/* ------------------------------------------------------------
   7. Search Page
   ------------------------------------------------------------ */
.search-hero { background: linear-gradient(135deg, #1B2838 0%, #2a3f55 100%); padding: 48px 24px 40px; text-align: center }
.search-hero h1 { font-family: 'Playfair Display', serif; font-size: 34px; font-weight: 700; color: #fff; margin-bottom: 16px; line-height: 1.2 }
.search-hero .search-form { max-width: 560px; margin: 0 auto; display: flex; gap: 10px }
.search-hero .search-form input[type="search"] { flex: 1; padding: 12px 20px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: #fff; font-size: 15px; outline: none; transition: all 0.2s }
.search-hero .search-form input[type="search"]::placeholder { color: rgba(255,255,255,0.5) }
.search-hero .search-form input[type="search"]:focus { border-color: #C4A265; background: rgba(255,255,255,0.15); box-shadow: 0 2px 12px rgba(196,162,101,0.15) }
.search-hero .search-form button { padding: 12px 28px; border-radius: 50px; border: none; background: #C4A265; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap }
.search-hero .search-form button:hover { background: #b08e50; transform: translateY(-1px) }

.search-container { max-width: 820px; margin: 0 auto; padding: 28px 24px 60px }
.search-status { font-size: 15px; color: #888; margin-bottom: 24px }
.search-status strong { color: #1B2838 }

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

.search-card { background: #fff; border: 1px solid #E5DFD8; border-radius: 12px; padding: 24px 28px; transition: all 0.2s; text-decoration: none; display: block; box-shadow: 0 1px 6px rgba(0,0,0,0.06) }
.search-card:hover { border-color: #C4A265; box-shadow: 0 4px 16px rgba(196,162,101,0.12); transform: translateY(-2px) }
.search-card .card-category { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #C4A265; margin-bottom: 8px; background: rgba(196,162,101,0.1); padding: 3px 10px; border-radius: 4px }
.search-card .card-title { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: #1B2838; margin-bottom: 8px; line-height: 1.3; border-bottom: none }
.search-card .card-excerpt { font-size: 14.5px; color: #666; line-height: 1.6; margin: 0 }
.search-card:hover .card-title { color: #3A7CA5 }

.search-empty { text-align: center; padding: 60px 24px }
.search-empty h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: #1B2838; margin-bottom: 12px }
.search-empty p { font-size: 15px; color: #888; margin-bottom: 24px; line-height: 1.6 }
.search-empty .browse-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px }
.search-empty .browse-links a { display: inline-block; padding: 10px 20px; background: #fff; border: 1px solid #E5DFD8; border-radius: 8px; color: #1B2838; font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.2s }
.search-empty .browse-links a:hover { border-color: #C4A265; background: rgba(196,162,101,0.05) }

.search-loading { text-align: center; padding: 40px 24px; color: #888; font-size: 15px }

.search-section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: #C4A265; font-weight: 600; margin: 28px 0 12px }
.search-section-label:first-child { margin-top: 0 }
.forum-result-meta { font-size: 12px; color: #7A7A7A; margin-top: 6px }

/* ------------------------------------------------------------
   8. Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  /* Forum home */
  .forum-hero h1 { font-size: 28px }
  .forum-hero { padding: 36px 16px 28px }
  .forum-wrap { padding: 20px 16px 40px }
  .cat-row { flex-wrap: wrap; gap: 10px }
  .cat-row-last { width: 100%; text-align: left }
  .thread-item { flex-wrap: wrap }
  .thread-stats { gap: 12px; margin: 0; width: 100% }
  .thread-last { width: 100%; text-align: left }
  .forum-search { flex-wrap: wrap }
  .forum-search button { width: 100% }

  /* Category page */
  .cat-hero h1 { font-size: 24px }
  .cat-hero { padding: 20px 16px 16px }
  .cat-wrap { padding: 12px 16px 40px }
  .thread-list-item,
  .subcat-row { flex-wrap: wrap }
  .tl-last,
  .subcat-row .subcat-last { width: 100%; text-align: left }
  .tl-stats { margin: 0; width: 100% }

  /* Thread page */
  .thread-hero { padding: 14px 16px 12px }
  .thread-post h1 { font-size: 21px }
  .thread-wrap { padding: 20px 16px 40px }
  .tp-content img,
  .rb-text img { max-width: 100%; height: auto }
  .reaction-popup { left: auto; right: 0; max-width: calc(100vw - 32px); flex-wrap: wrap }
  .emoji-picker-popup { left: auto; right: 0; max-width: calc(100vw - 32px) }

  /* New thread page */
  .new-hero { padding: 36px 16px 28px }
  .new-hero h1 { font-size: 24px }
  .new-wrap { padding: 20px 16px 40px }
  .new-form { padding: 20px 16px }

  /* Search page */
  .search-hero h1 { font-size: 24px }
  .search-hero { padding: 36px 16px 32px }
  .search-hero .search-form { flex-direction: column }
  .search-hero .search-form button { width: 100% }
  .search-container { padding: 20px 16px 40px }
  .search-card { padding: 18px 20px }
  .search-card .card-title { font-size: 17px }
}
