/*
 * Cheshire - Base Stylesheet
 * Layout and component styles for the forum frontend.
 * No inline styles in PHP files - all CSS lives here.
 * @see templates/themes/default/
 */

/* ── Reset & base ── */
.cheshire-wrap *{box-sizing:border-box}
.cheshire-wrap{font-family:sans-serif;line-height:1.5;color:#333;max-width:960px;margin:0 auto}

/* ── Breadcrumb ── */
.cheshire-breadcrumb{font-size:.85rem;color:#777;margin-bottom:1rem}
.cheshire-breadcrumb a{color:#3D6B8C;text-decoration:none}
.cheshire-breadcrumb a:hover{text-decoration:underline}

/* ── Category ── */
.cheshire-category{margin-bottom:1.5rem}
.cheshire-category-title{font-size:1.1rem;font-weight:700;padding:.5rem 0;border-bottom:2px solid #3D6B8C;margin-bottom:.5rem}

/* ── Forum row ── */
.cheshire-forum-row{display:grid;grid-template-columns:2rem 1fr auto auto;gap:.5rem;align-items:center;padding:.6rem 0;border-bottom:1px solid #eee}
.cheshire-forum-name{font-weight:600;color:#2E4057;text-decoration:none}
.cheshire-forum-name:hover{text-decoration:underline}
.cheshire-forum-description{font-size:.82rem;color:#777;margin:.1rem 0 0}
.cheshire-forum-stats{font-size:.8rem;color:#999;text-align:right;white-space:nowrap}

/* ── Thread list ── */
.cheshire-thread-row{display:grid;grid-template-columns:1fr auto auto;gap:.5rem;align-items:center;padding:.6rem 0;border-bottom:1px solid #eee}
.cheshire-thread-title{font-weight:600;color:#2E4057;text-decoration:none}
.cheshire-thread-title:hover{text-decoration:underline}
.cheshire-badge-solved{background:#27AE60;color:#fff;font-size:.72rem;padding:.1rem .4rem;border-radius:3px;margin-left:.4rem}
.cheshire-tag{display:inline-block;background:#3D6B8C;color:#fff;font-size:.72rem;padding:.1rem .4rem;border-radius:3px;margin:.1rem;text-decoration:none}

/* ── Post ── */
.cheshire-post{border:1px solid #eee;border-radius:6px;margin-bottom:1rem;overflow:hidden}
.cheshire-post-author{background:#f5f5f5;padding:.5rem .8rem;font-size:.85rem;font-weight:600;border-bottom:1px solid #eee}
.cheshire-post-body{padding:.8rem}
.cheshire-post-actions{padding:.4rem .8rem;border-top:1px solid #eee;font-size:.82rem}
.cheshire-btn-like,.cheshire-btn-quote{background:none;border:1px solid #ddd;border-radius:4px;padding:.2rem .6rem;cursor:pointer;margin-right:.4rem;font-size:.8rem}
.cheshire-btn-like:hover,.cheshire-btn-quote:hover{background:#f0f0f0}

/* ── Quick reply ── */
.cheshire-quick-reply{margin-top:1.5rem}
.cheshire-quick-reply textarea{width:100%;padding:.6rem;border:1px solid #ccc;border-radius:6px;min-height:80px;font-family:inherit}
.cheshire-quick-reply button{margin-top:.4rem;padding:.5rem 1rem;background:#2E4057;color:#fff;border:none;border-radius:5px;cursor:pointer}

/* ── Guest notice ── */
.cheshire-guest-notice{background:#EBF5FB;border:1px solid #AED6F1;border-radius:5px;padding:.7rem;margin-top:.5rem;font-size:.88rem}
.cheshire-guest-notice a{color:#2E4057;font-weight:600}

/* ── Auth forms ── */
.cheshire-auth-form{max-width:400px;margin:2rem auto}
.cheshire-auth-form h1{margin-bottom:1rem}
.cheshire-auth-form label{display:block;margin:.6rem 0 .2rem;font-size:.88rem;font-weight:600}
.cheshire-auth-form input{width:100%;padding:.5rem;border:1px solid #ccc;border-radius:5px}
.cheshire-auth-form button{margin-top:.8rem;padding:.6rem 1.2rem;background:#2E4057;color:#fff;border:none;border-radius:5px;cursor:pointer;font-weight:600}
.cheshire-error{background:#FDEDEC;border:1px solid #C0392B;border-radius:5px;padding:.6rem;margin:.6rem 0;font-size:.88rem;color:#7B241C}

/* ── Pagination ── */
.cheshire-pagination{margin:1rem 0;display:flex;gap:.4rem;flex-wrap:wrap}
.cheshire-pagination a{padding:.3rem .7rem;border:1px solid #ddd;border-radius:4px;color:#2E4057;text-decoration:none;font-size:.88rem}
.cheshire-pagination a.active,.cheshire-pagination a:hover{background:#2E4057;color:#fff;border-color:#2E4057}

/* ── Tag cloud ── */
.cheshire-tag-cloud{line-height:2.2;padding:.5rem 0}
.cheshire-tag-count{font-size:.75em;color:rgba(255,255,255,.7)}

/* ── Delete Button ── */
.cheshire-btn-delete{background:none;border:1px solid #C0392B;color:#C0392B;border-radius:4px;padding:.2rem .5rem;cursor:pointer;font-size:.8rem}
.cheshire-btn-delete:hover{background:#C0392B;color:#fff}
.cheshire-thread-actions{display:inline-block}

/* ── Search ── */
.cheshire-search-form{display:flex;gap:.5rem;margin:1rem 0}
.cheshire-search-form input{flex:1;padding:.5rem;border:1px solid #ccc;border-radius:5px}
.cheshire-search-form button{padding:.5rem 1rem;background:#2E4057;color:#fff;border:none;border-radius:5px;cursor:pointer}
.cheshire-search-result{padding:.7rem 0;border-bottom:1px solid #eee}
.cheshire-search-type{background:#3D6B8C;color:#fff;font-size:.72rem;padding:.1rem .4rem;border-radius:3px;margin-right:.4rem}
.cheshire-search-forum{font-size:.82rem;color:#777}
.cheshire-search-excerpt{font-size:.85rem;color:#666;margin:.3rem 0 0}

/* ── Edit button + timestamp ── */
.cheshire-btn-edit{background:none;border:1px solid #3D6B8C;color:#3D6B8C;border-radius:4px;padding:.2rem .5rem;cursor:pointer;font-size:.8rem;text-decoration:none;margin-right:.3rem}
.cheshire-btn-edit:hover{background:#3D6B8C;color:#fff}
.cheshire-edited{font-size:.75rem;color:#aaa;margin-left:.5rem;font-style:italic}

/* ── Post subject ── */
.cheshire-post-subject{font-weight:600;color:#2E4057;padding:.3rem .8rem;border-bottom:1px solid #eee;font-size:.9rem}
.cheshire-reply-subject{width:100%;padding:.4rem;border:1px solid #ccc;border-radius:5px;margin-bottom:.4rem;box-sizing:border-box}

/* ── Report button ── */
.cheshire-btn-report{background:none;border:1px solid #E67E22;color:#E67E22;border-radius:4px;padding:.2rem .5rem;font-size:.8rem;text-decoration:none;margin-left:.3rem}
.cheshire-btn-report:hover{background:#E67E22;color:#fff}

/* ── Reported post ── */
.cheshire-post-reported{border:1px dashed #E67E22;border-radius:6px;margin-bottom:1rem}
.cheshire-post-reported-notice{padding:.6rem 1rem;color:#E67E22;font-size:.88rem;font-style:italic}

/* ── Topbar (login/logout bar) ── */
.cheshire-topbar{display:flex;justify-content:flex-end;gap:.8rem;padding:.4rem 0;font-size:.85rem;border-bottom:1px solid #eee;margin-bottom:.8rem}
.cheshire-btn-login,.cheshire-btn-register,.cheshire-btn-logout{padding:.2rem .6rem;border-radius:4px;text-decoration:none;font-size:.82rem}
.cheshire-btn-login{background:#2E4057;color:#fff}
.cheshire-btn-register{border:1px solid #2E4057;color:#2E4057}
.cheshire-btn-logout{border:1px solid #aaa;color:#666}

/* ── Password strength bar ── */
.cheshire-pw-strength-wrap{height:4px;background:#eee;border-radius:2px;margin:.3rem 0 .6rem}
#cheshire-pw-strength{height:4px;width:0;border-radius:2px;transition:width .3s,background .3s}

/* ── MFA Instructions ── */
.cheshire-mfa-instructions{background:#EBF5FB;border:1px solid #AED6F1;border-radius:6px;padding:1rem;margin:.8rem 0;font-size:.9rem}
.cheshire-mfa-instructions ol{margin:.5rem 0 0 1.2rem;padding:0}
.cheshire-mfa-instructions li{margin:.4rem 0}
.cheshire-backup-codes{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}
.cheshire-backup-codes li code{background:#f0f0f0;padding:.3rem .6rem;border-radius:4px;font-family:monospace;font-size:.9rem}
