/* AquaBidz buyer ↔ seller messages — seller dashboard (/dashboard/messages/), My Account → Messages, store/listing dialogs.
   Navy panels, white text, gold accents. Text pairs: #FFF on #0B1B33/#0E2D4D/#16395F (≥ 11:1), #C9D6E6 on #0B1B33 (≥ 11:1),
   #F5D27A on #0B1B33 (11.8:1), #06121F on the gold button (≥ 8.9:1). */
.tb-msg{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:16px;margin-top:14px;align-items:start}
.tb-msg-list,.tb-msg-thread,.tb-msg-empty{background:#0B1B33;border:1px solid rgba(212,175,55,.38);border-radius:14px;color:#fff}
.tb-msg-list ul{list-style:none;margin:0!important;padding:6px!important}
.tb-msg-list li{margin:0!important;padding:0!important;border:0!important}
.tb-msg-item{display:block;padding:12px 12px;border-radius:10px;color:#fff!important;text-decoration:none!important;border-left:3px solid transparent}
.tb-msg-item + .tb-msg-item,.tb-msg-list li + li .tb-msg-item{margin-top:2px}
.tb-msg-item:hover,.tb-msg-item:focus-visible{background:#132C4F}
.tb-msg-item:focus-visible{outline:2px solid #F5D27A;outline-offset:1px}
.tb-msg-item.is-current{background:#16395F;border-left-color:#F5D27A}
.tb-msg-item-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
.tb-msg-who{font-weight:700;color:#fff}
.tb-msg-item.is-unread .tb-msg-who::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#F5D27A;margin-right:7px;vertical-align:middle}
.tb-msg-snip{display:block;color:#C9D6E6;font-size:.9rem;margin-top:3px;overflow-wrap:anywhere}
.tb-msg-item.is-unread .tb-msg-snip{color:#fff;font-weight:600}
.tb-msg-when{display:block;color:#B4C6DC;font-size:.8rem;margin-top:3px}
.tb-msg-badge,.tb-nav-badge{display:inline-block;min-width:20px;padding:1px 7px;border-radius:999px;background:#F5D27A;color:#06121F!important;font-size:.75rem;font-weight:800;line-height:18px;text-align:center}
.tb-nav-badge{margin-left:6px;vertical-align:1px}
.tb-msg-thread{padding:16px;min-height:260px}
.tb-msg-pick{color:#C9D6E6;margin:40px 0;text-align:center}
.tb-msg-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;border-bottom:1px solid rgba(127,219,255,.22);padding-bottom:10px;margin-bottom:12px}
.tb-msg-head h2{margin:0!important;font-size:1.2rem!important;color:#fff!important;flex:1 1 auto}
.tb-msg-back{display:none;color:#7FDBFF!important;font-weight:600;flex-basis:100%}
.tb-msg-store{color:#7FDBFF!important;font-weight:600}
.tb-msg-bubbles{list-style:none;margin:0 0 14px!important;padding:0!important;display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow:auto}
.tb-msg-bubble{max-width:82%;padding:10px 13px;border-radius:14px;margin:0!important}
.tb-msg-bubble.is-theirs{align-self:flex-start;background:#132C4F;border:1px solid rgba(127,219,255,.28);border-bottom-left-radius:4px}
.tb-msg-bubble.is-mine{align-self:flex-end;background:#1B3F66;border:1px solid rgba(245,210,122,.45);border-bottom-right-radius:4px}
.tb-msg-bubble p{margin:0!important;color:#fff!important}
.tb-msg-meta{font-size:.8rem;color:#C9D6E6!important;margin-bottom:3px!important}
.tb-msg-meta strong{color:#F5D27A}
.tb-msg-body{overflow-wrap:anywhere;line-height:1.5}
.tb-msg-about{align-self:center;font-size:.82rem;color:#C9D6E6;background:#0E2D4D;border:1px solid rgba(212,175,55,.38);border-radius:999px;padding:3px 12px;margin:4px 0 0!important}
.tb-msg-about a{color:#F5D27A!important}
.tb-msg-reply label{display:block;font-weight:700;color:#fff!important;margin-bottom:6px}
.tb-msg-reply textarea,.tb-msg-dialog textarea{width:100%;background:#071427!important;color:#fff!important;border:1px solid rgba(127,219,255,.35)!important;border-radius:10px!important;padding:10px 12px!important;min-height:96px}
.tb-msg-hint{font-size:.82rem;color:#C9D6E6!important;margin:6px 0 10px!important}
.tb-msg-send,.tb-store-msg-btn{display:inline-flex;align-items:center;gap:7px;background:linear-gradient(135deg,#F5D27A 0%,#D4AF37 60%,#F5D27A 100%)!important;color:#06121F!important;border:0!important;border-radius:10px!important;padding:10px 18px!important;font-weight:800!important;cursor:pointer;min-height:44px;text-decoration:none!important}
.tb-msg-send:focus-visible,.tb-store-msg-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.tb-msg-empty{padding:18px 20px;margin-top:14px}
.tb-msg-empty p{color:#C9D6E6!important;margin:0 0 6px!important}.tb-msg-empty strong{color:#fff}
.tb-msg-flash{background:#0E3B2E;border:1px solid #34D399;color:#fff!important;border-radius:10px;padding:9px 12px;margin:10px 0!important}
.tb-msg-flash--err{background:#3B1020;border-color:#FF8A8A}
.tb-store-msg{list-style:none;margin-top:8px!important}
.tb-store-msg-btn{padding:7px 14px!important;min-height:40px;font-size:.92rem}
/* Dialog (store page — listing pages already load these from listing-page.css) */
.tb-msg-dialog.tb-dialog{max-width:min(560px,92vw);width:100%;border-radius:16px;border:1px solid rgba(212,175,55,.38);background:#0E2D4D;color:#fff;padding:18px}
.tb-msg-dialog::backdrop{background:rgba(0,0,0,.6)}
.tb-msg-dialog .tb-dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.tb-msg-dialog .tb-dialog-head h2{margin:0!important;font-size:1.15rem!important;color:#fff!important}
.tb-msg-dialog .tb-dialog-x{background:none!important;border:0!important;color:#fff!important;font-size:1.6rem!important;cursor:pointer;min-width:40px;min-height:40px}
.tb-msg-dialog label{color:#fff!important;font-weight:700;display:block;margin-bottom:6px}
.tb-msg-dialog .tb-muted{color:#C9D6E6!important;font-size:.85rem}
/* Phones: list first; when a thread is open show only the thread (with a back link). */
@media (max-width:760px){
  .tb-msg{grid-template-columns:1fr}
  .tb-msg--open .tb-msg-list,.tb-msg:not(.tb-msg--open) .tb-msg-thread{display:none}
  .tb-msg--open .tb-msg-back{display:inline-block}
  .tb-msg-bubble{max-width:92%}
  .tb-msg-bubbles{max-height:none}
}
/* Store header forces every child white (.dokan-single-store .profile-info *) — keep the gold button's dark text. */
.dokan-single-store .profile-info .tb-store-msg .tb-store-msg-btn,.dokan-single-store .profile-info .tb-store-msg .tb-store-msg-btn *{color:#06121F!important}
