/* ================================================================
   DoiHinhTFT — Plugin: Mẹo TFT v3  |  tips.css
   ================================================================ */

.dhtft-tips-app {
  --tip-bg:     #0f1428;
  --tip-border: rgba(212,184,150,.12);
  --tip-gold:   #d4b896;
  --tip-text:   #e6e6e6;
  --tip-muted:  rgba(230,230,230,.42);
  --tip-radius: 10px;
  font-family: 'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,sans-serif;
  color: var(--tip-text);
}

/* ── Toolbar ── */
.dhtft-tips-toolbar { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.dhtft-tips-search-wrap { position:relative; max-width:360px; }
.dhtft-search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--tip-muted); pointer-events:none; width:16px; height:16px; }
.dhtft-tips-search { width:100%; background:var(--tip-bg); border:1px solid var(--tip-border); border-radius:8px; padding:9px 14px 9px 38px; font-size:14px; color:var(--tip-text); outline:none; transition:border-color .2s; font-family:inherit; }
.dhtft-tips-search:focus { border-color:rgba(212,184,150,.4); }
.dhtft-tips-search::placeholder { color:var(--tip-muted); }
.dhtft-filter-bar { display:flex; flex-wrap:wrap; gap:7px; }
.dhtft-filter-btn { display:inline-flex; align-items:center; gap:5px; padding:6px 14px; border-radius:20px; border:1px solid var(--tip-border); background:var(--tip-bg); color:var(--tip-muted); font-size:13px; font-weight:600; cursor:pointer; transition:all .18s; font-family:inherit; }
.dhtft-filter-btn:hover { border-color:rgba(212,184,150,.3); color:var(--tip-text); }
.dhtft-filter-btn.active { background:rgba(212,184,150,.12); border-color:rgba(212,184,150,.4); color:var(--tip-gold); }
.dhtft-filter-count { font-size:10px; opacity:.55; font-weight:400; }

/* ── Grid ── */
.dhtft-tips-grid { display:grid; gap:14px; grid-template-columns:repeat(3,1fr); }
.dhtft-tips-grid[data-cols="2"] { grid-template-columns:repeat(2,1fr); }
.dhtft-tips-grid[data-cols="1"] { grid-template-columns:1fr; }
@media(max-width:900px){ .dhtft-tips-grid { grid-template-columns:repeat(2,1fr) !important; } }
@media(max-width:580px){ .dhtft-tips-grid { grid-template-columns:1fr !important; } }
/* Full-width archive */
.dhtft-archive-wrap .dhtft-tips-grid { grid-template-columns:repeat(3,1fr); }
@media(max-width:1100px){ .dhtft-archive-wrap .dhtft-tips-grid { grid-template-columns:repeat(2,1fr); } }
@media(max-width:600px){  .dhtft-archive-wrap .dhtft-tips-grid { grid-template-columns:1fr; } }

/* ── Card ── */
.dhtft-tip-card { background:var(--tip-bg); border:1px solid var(--tip-border); border-radius:var(--tip-radius); display:flex; flex-direction:column; position:relative; overflow:visible; transition:border-color .2s,transform .2s; }
.dhtft-tip-card:hover { border-color:rgba(212,184,150,.28); transform:translateY(-2px); }
.dhtft-tip-card--highlight { border-color:rgba(212,184,150,.55); box-shadow:0 0 18px rgba(212,184,150,.08); }
.dhtft-tip-card--highlight::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--tip-gold),transparent); border-radius:10px 10px 0 0; }
.dhtft-diff--pro  { border-color:rgba(167,139,250,.3); }
.dhtft-diff--hard { border-color:rgba(251,113,113,.25); }
.dhtft-diff--easy { border-color:rgba(52,211,153,.25); }

/* ── Card Header ── */
.dhtft-card__header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px 10px; min-height:44px; }
.dhtft-card__icons { display:flex; align-items:center; gap:0; position:relative; }
.dhtft-card__meta { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.dhtft-card__patch { font-size:10px; font-weight:700; letter-spacing:.6px; color:var(--tip-gold); background:rgba(212,184,150,.1); border:1px solid rgba(212,184,150,.2); border-radius:4px; padding:1px 6px; }
.dhtft-card__time { display:flex; align-items:center; gap:4px; font-size:11.5px; color:var(--tip-muted); white-space:nowrap; }

/* ── Entity Icon (+20% = 41px) ── */
.dhtft-entity-icon {
  width: 41px;
  height: 41px;
  border-radius: 50%;
  border: 2px solid var(--entity-border, rgba(255,255,255,.15));
  overflow: hidden;
  margin-left: -7px;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transition: transform .18s;
  z-index: 1;
  background: #0a0d1a;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.dhtft-entity-icon:first-child { margin-left: 0; }
.dhtft-entity-icon:hover { transform: scale(1.3) translateY(-3px); z-index: 50; }
.dhtft-entity--item    { border-radius: 8px; }
.dhtft-entity--augment { border-radius: 8px; }
.dhtft-entity--trait   { border-radius: 50%; }
.dhtft-entity-icon img { width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }
.dhtft-entity-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:800; color:rgba(255,255,255,.7); }

/* ── Tooltip Layer ── */
.dhtft-tooltip-layer {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  min-width: 220px;
  max-width: 320px;
}

/* ══════════════════════════════════════════════════════
   TOOLTIP v2 STYLES  (nhân từ tft-tooltip-bridge v1.1)
   Áp dụng cho .dhtft-tooltip-layer / .dhtft-tt
══════════════════════════════════════════════════════ */
.dhtft-tooltip-layer,
.dhtft-tt {
  background: #12141d;
  border: 1px solid #2a3050;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.65), 0 0 0 1px rgba(200,155,60,.12);
  padding: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Be Vietnam Pro', sans-serif;
  font-size: 12px;
  color: #c8c0b0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s .15s;
}
.dhtft-tooltip-layer.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s 0s;
}

/* Hero image */
.ttb-hero-img { margin:-14px -16px 10px; height:110px; overflow:hidden; border-radius:10px 10px 0 0; position:relative; }
.ttb-hero-img img { width:100%; height:100%; object-fit:cover; object-position:top center; display:block;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }

/* Unit head */
.ttb-unit-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.ttb-unit-name { font-size:15px; font-weight:700; }
.ttb-unit-cost { padding:2px 7px; border-radius:4px; font-size:10px; font-weight:700; color:#111; }

/* Tags / Traits */
.ttb-tags { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:8px; }
.ttb-tag  { padding:2px 8px; border-radius:3px; font-size:10px; background:#1e2640; color:#7799cc; border:1px solid #2a3050; }

/* Stats */
.ttb-stats { display:flex; flex-wrap:wrap; gap:5px 10px; margin-bottom:8px; font-size:11px; color:#999; }
.ttb-stats span { white-space:nowrap; }

/* Skill */
.ttb-skill { display:flex; align-items:center; gap:8px; font-size:12px; color:#c89b3c; margin-bottom:4px; }
.ttb-skill-icon { width:28px; height:28px; border-radius:5px; border:1.5px solid rgba(200,155,60,.4); flex-shrink:0; }
.ttb-skill-type { font-size:10px; color:#666; background:#1a1d2a; border:1px solid #2a3050; border-radius:3px; padding:1px 5px; font-weight:400; vertical-align:middle; }
.ttb-skill-desc { font-size:11px; color:#aaa; line-height:1.65; }

/* Token styles (từ tup_parse_tokens) */
.ttb-skill-desc .tup-token-color  { font-weight:700; }
.ttb-skill-desc .tup-trait-phieu  {
  background: linear-gradient(90deg,#f472b6,#fb923c,#facc15,#4ade80,#60a5fa,#c084fc);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; font-weight:700;
}
.ttb-skill-desc .tup-token-icon   { width:13px; height:13px; vertical-align:middle; margin:0 1px; display:inline-block; }
.ttb-skill-desc .tup-skill-highlight {
  background:rgba(245,200,66,.1); border-left:3px solid #f5c842; border-radius:4px;
  padding:5px 9px; margin:5px 0; color:#fef9c3; font-size:11px; line-height:1.6; display:block;
}

/* Trait */
.ttb-trait-head { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.ttb-trait-icon { width:28px; height:28px; border-radius:5px; }
.ttb-trait-name { font-size:15px; font-weight:700; color:#e8e0d0; }
.ttb-trait-type { font-size:10px; color:#888; background:#1e2640; padding:2px 6px; border-radius:3px; }
.ttb-trait-desc { font-size:11px; color:#999; line-height:1.5; margin-bottom:8px; }
.ttb-tiers { margin-bottom:8px; }
.ttb-tier  { font-size:11px; color:#aaa; padding:3px 0; line-height:1.45; }
.ttb-tier-min { font-weight:700; color:#c89b3c; margin-right:4px; }

/* Mobile */
@media(max-width:768px){ .dhtft-tooltip-layer { max-width:calc(100vw - 20px); left:10px !important; } }

/* ── Card Body ── */
.dhtft-card__body { padding:0 14px 10px; flex:1; }
.dhtft-card__title { font-size:13px; font-weight:700; color:var(--tip-text); margin:0 0 5px; line-height:1.35; }
.dhtft-card__excerpt { font-size:13px; color:rgba(230,230,230,.65); line-height:1.6; margin:0; }

/* ── Card Footer ── */
.dhtft-card__footer { display:flex; align-items:center; justify-content:space-between; padding:8px 14px 10px; border-top:1px solid rgba(255,255,255,.04); gap:8px; }
.dhtft-card__source { font-size:11px; color:var(--tip-muted); }
.dhtft-card__actions { margin-left:auto; }
.dhtft-card__expand { width:26px; height:26px; border-radius:6px; border:1px solid var(--tip-border); background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--tip-muted); transition:all .2s; font-family:inherit; }
.dhtft-card__expand:hover { border-color:rgba(212,184,150,.3); color:var(--tip-gold); }
.dhtft-tip-card.is-expanded .dhtft-card__expand svg { transform:rotate(180deg); }
.dhtft-card__full { padding:0 14px 14px; font-size:13px; color:rgba(230,230,230,.7); line-height:1.7; border-top:1px solid rgba(255,255,255,.05); animation:dhtft-fade-in .2s ease; overflow:hidden; }
@keyframes dhtft-fade-in { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:none} }
.dhtft-card__badges { position:absolute; bottom:10px; right:12px; display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
.dhtft-card__badge { font-size:9px; font-weight:800; letter-spacing:.6px; padding:2px 7px; border-radius:3px; color:#fff; text-transform:uppercase; }

/* ── Load more ── */
.dhtft-tips-footer { text-align:center; margin-top:24px; }
.dhtft-load-more { display:inline-flex; align-items:center; gap:8px; padding:10px 28px; border:1px solid rgba(212,184,150,.3); border-radius:8px; background:rgba(212,184,150,.06); color:var(--tip-gold); font-size:14px; font-weight:600; cursor:pointer; transition:all .2s; font-family:inherit; }
.dhtft-load-more:hover { background:rgba(212,184,150,.12); border-color:rgba(212,184,150,.5); }
.dhtft-load-more.is-loading .dhtft-load-more__text { opacity:.4; }
.dhtft-load-more__spinner { display:none; width:14px; height:14px; border:2px solid rgba(212,184,150,.3); border-top-color:var(--tip-gold); border-radius:50%; animation:dhtft-spin .7s linear infinite; }
.dhtft-load-more.is-loading .dhtft-load-more__spinner { display:block; }
@keyframes dhtft-spin { to{transform:rotate(360deg)} }
.dhtft-tips-empty { color:var(--tip-muted); font-size:14px; }

/* ── Breadcrumbs ── */
.dhtft-breadcrumb { margin-top: 20px; margin-bottom: 18px; }
.dhtft-breadcrumb__list { display:flex; align-items:center; flex-wrap:wrap; gap:2px; list-style:none; padding:0; margin:0; }
.dhtft-breadcrumb__item { display:flex; align-items:center; gap:4px; }
.dhtft-breadcrumb__link { font-size:12px; color:rgba(212,184,150,.55); text-decoration:none; transition:color .15s; }
.dhtft-breadcrumb__link:hover { color:#d4b896; }
.dhtft-breadcrumb__sep { width:5px; height:8px; color:rgba(255,255,255,.18); flex-shrink:0; }
.dhtft-breadcrumb__current { font-size:12px; color:rgba(230,230,230,.38); }
