/*
Theme Name: Chatohh
Theme URI: https://chatohh.com
Author: Chatohh
Author URI: https://chatohh.com
Description: Chatohh — modern finance-blog theme with GDPR cookie consent, Don’t Miss popup, social widgets, Rank Math compatibility, and US/UK/Canada money tools.
Version: 1.3.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chatohh
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles
*/

/* Base styles live in assets/css/main.css. Overlay/share rail also here so they always load. */

.ch-share,
.ch-share__list,
.ch-share__list li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.ch-share__list {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ch-share__label {
  margin: 0 0 8px;
  font-weight: 700;
  color: #0f172a;
}
.ch-share__btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: #eef3f8 !important;
  color: #0f172a !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 8px 12px !important;
  font: 700 13px/1 Inter, system-ui, sans-serif !important;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: none !important;
}

.ch-share-rail { display: none !important; }

.ch-author {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #f8fafc;
}
.ch-author__avatar img,
.ch-author .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ch-author__label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ff6b00;
}
.ch-author__name { margin: 0 0 6px; font-size: 18px; }
.ch-author__name a { color: #0f172a; }
.ch-author__bio { margin: 0; color: #64748b; }

.ch-popup {
  position: fixed !important;
  right: 16px !important;
  bottom: 24px !important;
  z-index: 9980 !important;
  width: min(300px, calc(100vw - 24px));
  background: #fff !important;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .16);
  padding: 14px;
}
.ch-popup[hidden] { display: none !important; }
.ch-popup.is-in { display: block !important; }
.ch-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
}
.ch-popup .ch-widget { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.ch-popup__card img { width: 100%; height: 110px; object-fit: cover; border-radius: 12px; display: block; }
.ch-popup__title { display: block; font-weight: 800; color: #0f172a; margin-top: 8px; }

.ch-consent {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: rgba(11, 18, 32, .45);
  padding: 12px;
}
.ch-consent[hidden] { display: none !important; }
.ch-consent__panel {
  width: min(960px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
}

@media (max-width: 900px) {
  .ch-share-rail { display: none !important; }
  .ch-popup { bottom: 96px !important; }
}

.ch-author {
  display: flex !important;
  gap: 16px;
  align-items: center !important;
}
.ch-author__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex: 0 0 72px;
}
.ch-author img,
.ch-author .avatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.ch-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #0078F2;
  background: #fff;
  color: #0f172a;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  margin-right: 8px;
}
.ch-theme-toggle__moon { display: none; }
html[data-theme="dark"] .ch-theme-toggle {
  background: #141c2e;
  color: #f8fafc;
  border-color: #4da3ff;
}
html[data-theme="dark"] .ch-theme-toggle__sun { display: none; }
html[data-theme="dark"] .ch-theme-toggle__moon { display: block; }

.ch-home-cats { display: grid; gap: 28px; padding-bottom: 40px; }
.ch-catbox {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.ch-catbox__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.ch-catbox__head h2 { margin: 0; font-size: 22px; color: #0f172a; }
.ch-catbox__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ch-mini-box {
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.ch-mini-box a { color: inherit; display: block; }
.ch-mini-box img,
.ch-mini-box__ph {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: linear-gradient(145deg, #dff0ff, #ffe8d6);
}
.ch-mini-box h3 { margin: 10px 12px 6px; font-size: 16px; color: #0f172a; }
.ch-mini-box p { margin: 0 12px 14px; font-size: 13px; color: #64748b; }

@media (max-width: 900px) {
  .ch-catbox__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ch-catbox__grid { grid-template-columns: 1fr; }
}

html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background: #0b1220;
  color: #d5deea;
}
html[data-theme="dark"] .ch-header,
html[data-theme="dark"] .ch-header-search {
  background: rgba(11,18,32,.9);
  border-color: #243049;
}
html[data-theme="dark"] .ch-nav__list a,
html[data-theme="dark"] .ch-card__title a,
html[data-theme="dark"] .ch-pagehead h1,
html[data-theme="dark"] .ch-article h1,
html[data-theme="dark"] .ch-catbox__head h2,
html[data-theme="dark"] .ch-mini-box h3,
html[data-theme="dark"] .ch-author__name a {
  color: #f1f5f9;
}
html[data-theme="dark"] .ch-article,
html[data-theme="dark"] .ch-card,
html[data-theme="dark"] .ch-widget,
html[data-theme="dark"] .ch-catbox,
html[data-theme="dark"] .ch-mini-box,
html[data-theme="dark"] .ch-stat,
html[data-theme="dark"] .ch-comments,
html[data-theme="dark"] .ch-popup,
html[data-theme="dark"] .ch-consent__panel,
html[data-theme="dark"] .ch-consent-modal__box,
html[data-theme="dark"] .ch-author {
  background: #141c2e !important;
  border-color: #243049 !important;
  color: #d5deea;
}
html[data-theme="dark"] .ch-search-toggle,
html[data-theme="dark"] .ch-nav-toggle,
html[data-theme="dark"] .ch-share__btn {
  background: #1c2740 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .ch-card__excerpt,
html[data-theme="dark"] .ch-mini-box p,
html[data-theme="dark"] .ch-author__bio {
  color: #94a3b8;
}

.ch-footer .ch-social--circles,
.ch-footer .ch-social {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none !important;
}
.ch-footer .ch-social li { margin: 0 !important; list-style: none !important; }
.ch-footer .ch-social__btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 1px solid #3d4b63 !important;
  background: transparent !important;
  color: #c5d0e0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.ch-footer .ch-social__btn:hover {
  border-color: #ff6b00 !important;
  color: #fff !important;
}
.ch-footer__brand p { max-width: 28ch; color: #9aa8bd; }
