/* ===========================================================
 *  DASHBOARD BROADCAST WHATSAPP
 *  Style overrides di atas dashboard-patriot.css.
 * =========================================================== */

/* ============= TIPS ANTI-SPAM BANNER ============= */
.bc-tips {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.bc-tips__summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13.5px;
  color: #78350f;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.bc-tips__summary::-webkit-details-marker { display: none; }
.bc-tips__summary > svg { flex-shrink: 0; color: #c39a3c; }
.bc-tips__summary > span { flex: 1; line-height: 1.45; }
.bc-tips__summary::after {
  content: "▾";
  color: #b45309;
  transition: transform 180ms ease;
  font-size: 14px;
}
.bc-tips[open] .bc-tips__summary::after { transform: rotate(180deg); }
.bc-tips__body {
  padding: 4px 16px 16px;
  border-top: 1px solid #fde68a;
  background: #fef9e7;
}
.bc-tips__list {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #5a3700;
  font-size: 12.5px;
  line-height: 1.55;
}
.bc-tips__list li { margin-bottom: 6px; }
.bc-tips__list strong { color: #3d2400; }
.bc-tips__list em { color: #92400e; font-style: italic; }

/* ============= MESSAGE COMPOSER ============= */
.bc-composer {
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.bc-composer__multi-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: rgba(195, 154, 60, 0.18);
  color: #8a6612;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 1px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bc-composer__lead code {
  background: rgba(28, 60, 122, 0.08);
  color: #1c3c7a;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11.5px;
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
}
.bc-composer__meta code {
  background: rgba(28, 60, 122, 0.08);
  color: #1c3c7a;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
}

/* ============= VARIANT TABS ============= */
.bc-variants {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  background: #f7f8fb;
  padding: 4px;
  border-radius: 10px 10px 0 0;
  border: 1.5px solid #e5e8ef;
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.bc-variants::-webkit-scrollbar { height: 4px; }
.bc-variant-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7385;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.bc-variant-tab:hover { background: rgba(28, 60, 122, 0.06); color: #1c3c7a; }
.bc-variant-tab.is-active {
  background: #fff;
  color: #0d1326;
  box-shadow: 0 1px 3px rgba(11, 19, 48, 0.08);
}
.bc-variant-tab__num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(28, 60, 122, 0.1);
  color: #1c3c7a;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.bc-variant-tab.is-active .bc-variant-tab__num {
  background: linear-gradient(135deg, #1c3c7a, #14224d);
  color: #ead29c;
}
.bc-variant-tab__label { font-size: 12.5px; }
.bc-composer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bc-composer__title {
  margin: 0 0 4px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #0d1326;
}
.bc-composer__lead {
  margin: 0;
  font-size: 12.5px;
  color: #6b7385;
  line-height: 1.45;
  max-width: 70ch;
}
.bc-textarea {
  width: 100%;
  min-height: 220px;
  padding: 14px 16px;
  background: #fafbfd;
  border: 1.5px solid #e5e8ef;
  border-radius: 0 0 10px 10px;
  border-top: 1px solid #e5e8ef;
  font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #0d1326;
  resize: vertical;
  box-sizing: border-box;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bc-textarea:focus {
  outline: none;
  border-color: #1c3c7a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28, 60, 122, 0.12);
}
.bc-composer__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 11.5px;
  color: #6b7385;
  margin-top: 8px;
}
.bc-hint { font-style: italic; }

/* ============= TOOLBAR ============= */
.bc-toolbar__actions {
  flex-wrap: wrap;
  gap: 8px;
}
.bc-toolbar__actions .select { min-width: 130px; }

/* ============= BLAST BUTTON WRAP + RATE METER ============= */
.bc-blast-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: stretch;
}
.bc-blast-wrap .btn { width: 100%; }
.bc-blast-wrap .btn.is-cooldown {
  background: #94a3b8;
  border-color: #94a3b8;
  cursor: not-allowed;
}
.bc-blast-wrap .btn.is-running {
  background: #b45309;
  border-color: #b45309;
  cursor: progress;
}
.bc-blast-meta {
  font-size: 10.5px;
  color: #6b7385;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1px 4px;
}
.bc-blast-meta.is-warn  { color: #b45309; }
.bc-blast-meta.is-danger {
  color: #b8261c;
  font-weight: 700;
  animation: bc-pulse 1.4s ease-in-out infinite;
}
@keyframes bc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ============= TABLE ROW STATUS BADGES ============= */
.bc-sent-badge {
  display: inline-flex; align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bc-sent-badge.is-sent {
  background: rgba(15, 118, 110, 0.12);
  color: #0F766E;
}
.bc-sent-badge.is-pending {
  background: rgba(195, 154, 60, 0.16);
  color: #8a6612;
}
.bc-sent-badge svg { flex-shrink: 0; }

.bc-status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bc-status-pill.is-pending  { background: rgba(195, 154, 60, 0.16); color: #8a6612; }
.bc-status-pill.is-verified { background: rgba(15, 118, 110, 0.12); color: #0F766E; }
.bc-status-pill.is-rejected { background: rgba(216, 67, 50, 0.12); color: #b8261c; }

.bc-cell-meta {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.bc-cell-meta__alamat {
  font-size: 12.5px;
  color: #4b5466;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bc-cell-meta__phone {
  font-size: 12px;
  color: #6b7385;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.bc-kota-pill {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(28, 60, 122, 0.1);
  color: #1c3c7a;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.bc-wa-btn {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 140ms ease, transform 80ms ease;
  box-shadow: 0 2px 6px -2px rgba(18, 140, 126, 0.4);
}
.bc-wa-btn:hover { opacity: 0.92; color: #fff; }
.bc-wa-btn:active { transform: translateY(1px); }
.bc-wa-btn.is-sent {
  background: linear-gradient(135deg, #84cc70 0%, #4d8c5e 100%);
  opacity: 0.85;
}
.bc-wa-btn.is-disabled {
  background: #d4d8e0;
  color: #777e8c;
  cursor: not-allowed;
  box-shadow: none;
}

.bc-blast-note {
  background: #fff7ed;
  border: 1px solid #fcd9b6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px !important;
  line-height: 1.5;
}

/* ============= MOBILE — broadcast specific tweaks ============= */
@media (max-width: 720px) {
  .bc-tips { margin: 0 14px 12px; }
  .bc-tips__summary { font-size: 12.5px; padding: 10px 12px; }
  .bc-tips__list { font-size: 12px; }

  .bc-composer {
    margin: 0 14px;
    padding: 14px 16px;
    border-radius: 14px;
  }
  .bc-composer__head { flex-direction: column; gap: 8px; }
  .bc-composer__title { font-size: 15px; }
  .bc-textarea {
    font-size: 13px;
    min-height: 180px;
    border-radius: 0 0 10px 10px;
  }
  .bc-variant-tab { padding: 6px 10px; font-size: 11.5px; }
  .bc-variant-tab__label { display: none; }
  .bc-variant-tab.is-active .bc-variant-tab__label { display: inline; font-size: 11.5px; }

  /* Mobile filter chips: hide desktop select + bigger blast button */
  .bc-toolbar__actions .select { display: none; }
  .bc-toolbar__actions .btn--primary { display: none; }
  .bc-toolbar__actions .btn--secondary { flex: 1 1 100%; }

  /* Table cards (mobile) — specificity .pt-table.bc-table tbody tr (0,2,2)
     biar menang vs rule generic .pt-table tbody tr di dashboard-mobile.css. */
  .pt-table.bc-table tbody tr {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name    kota"
      "meta    meta"
      "status  wa";
    gap: 8px 12px;
  }
  .pt-table.bc-table tbody td.pt-td--num                { display: none; }
  .pt-table.bc-table tbody td[data-label="Nama"]        { grid-area: name; }
  .pt-table.bc-table tbody td[data-label="Kota"]        { grid-area: kota; text-align: right; }
  .pt-table.bc-table tbody td[data-label="Alamat / WhatsApp"] { grid-area: meta; }
  .pt-table.bc-table tbody td[data-label="Status TEP"]  { grid-area: status; align-self: end; }
  .pt-table.bc-table tbody td.pt-cell-actions           {
    grid-area: wa;
    margin-top: 0; padding-top: 0; border-top: none;
    justify-content: flex-end; align-self: end;
  }

  .bc-wa-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 12.5px;
  }
}
