/* CIVIC_DATA_UI_V1 (PREVIEW 2026-10-07): official-data card + civic progress label + official source row.
   Loaded after the chat stack; uses only the chat's own tokens so light (warm stone) and dark follow. */

/* 1. Progress row while a connector runs: same row as web search, institution named. */
.agentic-step.civic:not(.has-logo) .agentic-label::before {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin: 0 7px -2px 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.3-7 9.5-4-1.2-7-5-7-9.5V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.3-7 9.5-4-1.2-7-5-7-9.5V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .85;
}

/* 2. "Data resmi" card under the answer text. */
.civic-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 520px;
  margin: 14px 0 4px;
  padding: 11px 14px 11px 12px;
  border: 1px solid var(--brd-2);
  border-radius: 12px;
  background: var(--bg-1);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.civic-card:hover { border-color: var(--brd-3); background: var(--bg-2); }
[data-theme="dark"] .civic-card { background: var(--bg-2); }
[data-theme="dark"] .civic-card:hover { background: var(--bg-3); }
.civic-card + .civic-card { margin-top: 8px; }
.civic-card-ico {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--tx-2);
}
.civic-card-ico svg { width: 16px; height: 16px; }
/* Official logo: white tile in both themes so dark-blue/green emblems stay legible on dark. */
.civic-card-ico.civic-logo-tile { width: 38px; height: 38px; border-radius: 9px; background: #fff; border: 1px solid var(--brd-2); padding: 3px; }
.civic-card-ico.civic-logo-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.civic-logo-sm {
  width: 15px; height: 15px; object-fit: contain;
  margin: 0 7px -3px 0; border-radius: 3px; background: #fff; padding: 1px;
}
.civic-card-main { min-width: 0; flex: 1; line-height: 1.35; }
.civic-card-top { font-size: .84rem; color: var(--tx); }
.civic-card-top b { font-weight: 600; }
.civic-card-tag { color: var(--tx-3); font-weight: 500; }
.civic-card-sub { font-size: .76rem; color: var(--tx-3); margin-top: 2px; }
.civic-card-dom { white-space: nowrap; }
.civic-card:hover .civic-card-dom { color: var(--tx-2); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 520px) { .civic-card { max-width: none; } }

/* 3. Official source pinned first in the sources list, with a small tag. */
.ws-src-row.official .ws-src-domain::after {
  content: attr(data-official);
  margin-left: 7px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--brd-2);
  font-size: .66rem;
  font-weight: 500;
  color: var(--tx-2);
  vertical-align: 1px;
}

/* Official row in the sources list uses the institution logo instead of the letter fallback. */
.ws-src-row.official .civic-src-logo {
  width: 16px; height: 16px; object-fit: contain; flex-shrink: 0;
  border-radius: 3px; background: #fff; padding: 1px;
}

/* 4. ADINAYA booking card: a transaction receipt, not "official data" -- own header + fields. */
.booking-card {
  max-width: 520px;
  margin: 14px 0 4px;
  border: 1px solid var(--brd-2);
  border-radius: 12px;
  background: var(--bg-1);
  overflow: hidden;
}
[data-theme="dark"] .booking-card { background: var(--bg-2); }
.booking-head { display: flex; align-items: center; gap: 11px; padding: 11px 14px 10px 12px; border-bottom: 1px solid var(--brd); }
.booking-head .civic-card-ico.civic-logo-tile { width: 38px; height: 38px; }
.booking-title { font-size: .84rem; color: var(--tx); line-height: 1.35; }
.booking-title b { font-weight: 600; }
.booking-ok { color: var(--green); font-weight: 600; }
.booking-sub { font-size: .76rem; color: var(--tx-3); margin-top: 1px; }
.booking-body { padding: 10px 14px 12px; }
.booking-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-3); }
.booking-code-label { font-size: .7rem; color: var(--tx-3); }
.booking-code-val { font-family: var(--mono, ui-monospace, monospace); font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: var(--tx); }
.booking-copy { border: 1px solid var(--brd-2); background: var(--bg-1); color: var(--tx-2); border-radius: 7px; padding: 4px 9px; font-size: .72rem; cursor: pointer; }
.booking-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.booking-grid div span { display: block; font-size: .7rem; color: var(--tx-3); }
.booking-grid div b { font-size: .82rem; font-weight: 500; color: var(--tx); }
.booking-note { margin-top: 10px; font-size: .74rem; color: var(--tx-3); line-height: 1.45; }
@media (max-width: 520px) { .booking-card { max-width: none; } .booking-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
