/* ======================================================
   bearer_monitor.css
====================================================== */

/* ---- STATUS BAR ---- */
.bm-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05);
  margin-bottom: 12px;
  flex-wrap: wrap;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}

.bm-sb-left  { display:flex; align-items:center; gap:10px; }
.bm-sb-state { font-size:13px; font-weight:900; color:rgba(255,255,255,.90); }
.bm-sb-right { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.bm-sb-meta  { font-size:11px; font-weight:700; color:rgba(233,238,248,.38); }
.bm-sb-meta span { color:rgba(233,238,248,.75); font-weight:800; }

.bm-countdown { font-size:13px; font-weight:900; color:#00aa25; font-variant-numeric:tabular-nums; }
.bm-countdown.warn    { color:#fcaf17; }
.bm-countdown.expired { color:#e8001d; }

/* ---- ERROR BANNER ---- */
.bm-error-banner {
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(232,0,29,.30);
  background: rgba(232,0,29,.07);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,100,100,.85);
  margin-bottom: 12px;
  gap: 8px;
  align-items: center;
}
.bm-error-banner.visible { display:flex; }

/* ---- BEARER HIGHLIGHT ---- */
.bm-bearer-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0,170,37,.28);
  background: linear-gradient(135deg, rgba(0,170,37,.10) 0%, rgba(0,170,37,.04) 100%);
  box-shadow: 0 0 0 1px rgba(0,170,37,.06), 0 8px 24px rgba(0,0,0,.25);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bm-bearer-hl-left  { display:flex; align-items:center; gap:12px; }

.bm-bearer-hl-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(0,170,37,.14);
  border: 1px solid rgba(0,170,37,.30);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,220,60,.90);
  font-size: 15px;
  flex-shrink: 0;
}

.bm-bearer-hl-title { font-size:14px; font-weight:900; color:rgba(255,255,255,.92); }
.bm-bearer-hl-sub   { margin-top:3px; font-size:11px; font-weight:700; color:rgba(233,238,248,.42); }

.bm-bearer-hl-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(0,170,37,.35);
  background: rgba(0,170,37,.12);
  font-size: 12px; font-weight: 800;
  color: rgba(234,255,239,.85);
  white-space: nowrap;
}
.bm-bearer-hl-badge.err {
  border-color: rgba(232,0,29,.35);
  background: rgba(232,0,29,.10);
  color: rgba(255,160,160,.85);
}

/* ---- ACCORDION ---- */
.bm-accordion {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,.20);
  margin-bottom: 10px;
}

.bm-acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.bm-acc-head:hover { background: rgba(255,255,255,.03); }

.bm-acc-head-left {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233,238,248,.60);
}

.bm-acc-head-left i { font-size:12px; color:rgba(0,170,37,.75); }

.bm-acc-count {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 10px; font-weight: 800;
  color: rgba(233,238,248,.45);
  letter-spacing: .04em;
  text-transform: none;
}

.bm-acc-chevron {
  font-size: 11px;
  color: rgba(233,238,248,.35);
  transition: transform .35s cubic-bezier(.16,1,.3,1), color .2s;
  flex-shrink: 0;
}

/* collapsed state */
.bm-accordion-collapsed .bm-acc-chevron { transform: rotate(-90deg); }

/* body - animated with max-height */
.bm-acc-body {
  padding: 12px;
  overflow: hidden;
  max-height: 2000px;
  transition: max-height .35s cubic-bezier(.16,1,.3,1),
              padding   .25s cubic-bezier(.16,1,.3,1),
              opacity   .25s ease;
  opacity: 1;
}

.bm-accordion-collapsed .bm-acc-body {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* ---- TOKEN FIELD LIST (no individual cards, just rows) ---- */
.bm-field-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  user-select: none;
  -webkit-user-select: none;
}

.bm-field-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.bm-field-row:last-child { border-bottom: none; }
.bm-field-row:first-child { border-top: 1px solid rgba(0,170,37,.20); }

.bm-field-key {
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233,238,248,.38);
  white-space: nowrap;
  flex: 0 0 220px;
}

.bm-field-spacer {
  flex: 1;
}

.bm-field-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px; color: rgba(233,238,248,.60);
  line-height: 1.55;
  letter-spacing: .02em;
  pointer-events: none;
  text-align: left;
  flex: 0 0 360px;
  white-space: nowrap;
  overflow: hidden;
}

.bm-field-val .bm-prefix  { color: rgba(252,175,23,.75); font-weight:700; }
.bm-field-val .bm-visible { color: rgba(233,238,248,.85); font-weight:700; }
.bm-field-val .bm-dots    { color: rgba(233,238,248,.22); letter-spacing:.05em; }
.bm-field-val .bm-suffix  { color: rgba(233,238,248,.85); font-weight:700; }
.bm-field-val .bm-missing { color:rgba(232,0,29,.55); font-style:italic; font-size:11px; }

/* bearer row highlight */
.bm-field-row.bm-row-bearer {
  background: rgba(0,170,37,.04);
}
.bm-field-row.bm-row-bearer .bm-field-key {
  color: rgba(0,220,60,.60);
}

/* ---- COOKIE GRID ---- */
.bm-cookie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
  user-select: none;
  -webkit-user-select: none;
}

.bm-cookie-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 9px 12px;
}

.bm-cookie-key {
  font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: rgba(233,238,248,.35);
  margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bm-cookie-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px; color: rgba(233,238,248,.50);
  word-break: break-all; line-height: 1.5;
  pointer-events: none;
}

.bm-cookie-val .bm-visible { color:rgba(233,238,248,.78); font-weight:700; }
.bm-cookie-val .bm-dots    { color:rgba(233,238,248,.20); letter-spacing:.04em; }
.bm-cookie-val .bm-suffix  { color:rgba(233,238,248,.78); font-weight:700; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .bm-sb-right { flex-direction:column; align-items:flex-start; gap:4px; }
  .bm-cookie-grid { grid-template-columns:1fr; }
  .bm-field-key { flex: 0 0 140px; }
}

/* ---- ACCORDION ANIMATIONS ---- */

/* hover: head gets slightly brighter */
.bm-acc-head:hover .bm-acc-head-left { color: rgba(233,238,248,.80); }
.bm-acc-head:hover .bm-acc-chevron   { color: rgba(0,170,37,.75); }

/* flash border on open */
.bm-accordion-flash {
  animation: bm-acc-flash .4s ease forwards;
}
@keyframes bm-acc-flash {
  0%   { border-color: rgba(0,170,37,.55); box-shadow: 0 0 0 2px rgba(0,170,37,.18), 0 8px 18px rgba(0,0,0,.20); }
  100% { border-color: rgba(255,255,255,.08); box-shadow: 0 8px 18px rgba(0,0,0,.20); }
}

/* ripple */
.bm-acc-head { position: relative; overflow: hidden; }

.bm-acc-ripple {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(0,170,37,.12);
  animation: bm-ripple .5s cubic-bezier(.16,1,.3,1) forwards;
  pointer-events: none;
}

@keyframes bm-ripple {
  from { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  to   { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* ---- LOADING SPINNER ---- */
.bm-spin-icon {
  display: inline-flex;
  align-items: center;
}

.bm-spin-icon i {
  animation: bmSpin .8s linear infinite;
  font-size: 11px;
}

@keyframes bmSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.bm-badge-wait {
  border-color: rgba(245,158,11,.35) !important;
  background: rgba(245,158,11,.10) !important;
  color: rgba(255,220,140,.90) !important;
}

.bm-sb-state {
  display: flex;
  align-items: center;
  gap: 6px;
}