/* tonibunaiasu.ro, unealta Știe, faza S (18.10.2026).
   Totul stă sub .tb-stie: fără reguli pe body sau :root. Jetoanele vin din paleta Astra (--ast-global-color-*),
   cu valoarea de rezervă scrisă lângă. Eroul copiază regulile din tb-aspect (Contact): 64/52/40 px, padding 120/96/64.
   Butoanele copiază setările Astra ale butonului (astra-settings): coral #ff6d59, text #292020, contur 2px, rază 6px,
   16px/600, padding 15/30; sub 922px 15px și 14/28; sub 545px 12/24. Greutatea maximă e 600: site-ul încarcă Work Sans 400-600. */

.tb-stie {
  --s-primary: #ff6d59;
  --s-primary-hover: #ff8573;
  --s-on-primary: var(--ast-global-color-7, #292020);
  --s-bg: var(--ast-global-color-4, #f8f1f1);
  --s-surface: #fff;
  --s-border: #eadfdf;
  --s-line: var(--ast-global-color-6, #b7b7b7);
  --s-title: var(--ast-global-color-2, #000);
  --s-text: var(--ast-global-color-3, #5b5b5b);
  --s-strong: var(--ast-global-color-7, #292020);
  --s-accent: var(--ast-global-color-0, #c43d2b);
  --s-accent-active: var(--ast-global-color-1, #a33224);
  --s-serif: "Instrument Serif", Georgia, serif;
  --s-sans: "Work Sans", "Helvetica Neue", sans-serif;
  --s-transition: 180ms cubic-bezier(.16, 1, .3, 1);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  background: var(--s-surface);
  color: var(--s-text);
  font-family: var(--s-sans);
}
.tb-stie *, .tb-stie *::before, .tb-stie *::after { box-sizing: border-box; }
.tb-stie [hidden] { display: none !important; }
.tb-stie p { margin: 0; }
.tb-stie svg { flex-shrink: 0; }
.tb-stie-in { max-width: 1280px; margin: 0 auto; padding: 0 40px; }

/* Subsolul: tb-aspect îi lasă 64px jos pentru butonul plutitor. Pe pagina Știe butonul lipsește. */
@media (min-width: 922px) { .tb-stie-pagina .site-footer { padding-bottom: 0; } }

/* ── Eroul, ca pe Contact ── */
.tb-stie .tb-stie-erou { background: var(--s-bg); padding: 120px 0; }
.tb-stie .tb-stie-eticheta {
  font-family: var(--s-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--s-text);
  margin: 0 0 20px;
}
.tb-stie .tb-stie-titlu {
  font-family: var(--s-serif);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--s-title);
  max-width: 820px;
  margin: 0 0 20px;
  text-align: left;
}
/* #c43d2b pe #f8f1f1 = 4,65:1 (calculat din hex), peste pragul de 4,5:1 pentru text mic. */
.tb-stie .tb-stie-titlu em { font-style: italic; color: var(--s-accent); }
.tb-stie .tb-stie-intro { font-size: 19px; line-height: 1.65; color: var(--s-text); max-width: 640px; }

/* ── Secțiunea uneltei ── */
.tb-stie .tb-stie-unealta { background: var(--s-surface); padding: 100px 0; }
.tb-stie-stiva { max-width: 860px; display: flex; flex-direction: column; gap: 32px; }

/* ── Butonul site-ului ── */
.tb-stie .stie-btn-explain,
.tb-stie .stie-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--s-primary);
  color: var(--s-on-primary);
  border: 2px solid var(--s-primary);
  border-radius: 6px;
  padding: 15px 30px;
  font-family: var(--s-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1em;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--s-transition), border-color var(--s-transition);
}
.tb-stie .stie-btn-explain:hover,
.tb-stie .stie-btn-explain:focus,
.tb-stie .stie-btn-primary:hover,
.tb-stie .stie-btn-primary:focus {
  background: var(--s-primary-hover);
  border-color: var(--s-primary-hover);
  color: var(--s-on-primary);
  box-shadow: none;
}
.tb-stie .stie-btn-explain:focus-visible,
.tb-stie .stie-btn-primary:focus-visible { outline: 2px solid var(--s-strong); outline-offset: 2px; }
.tb-stie .stie-btn-explain:disabled,
.tb-stie .stie-btn-explain:disabled:hover {
  background: var(--s-primary);
  border-color: var(--s-primary);
  opacity: .6;
  cursor: not-allowed;
}
.tb-stie .stie-btn-explain .stie-spinner { display: none; }
.tb-stie .stie-btn-explain.loading .stie-spinner { display: block; animation: stie-spin .8s linear infinite; }
.tb-stie .stie-btn-explain.loading .stie-btn-text { display: none; }
@keyframes stie-spin { to { transform: rotate(360deg); } }

/* ── Cardul de intrare ── */
.tb-stie .stie-card {
  width: 100%;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
}
.tb-stie .stie-card-toolbar {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 24px;
  background: var(--s-bg);
  border-bottom: 1px solid var(--s-border);
  flex-wrap: wrap;
}
.tb-stie .stie-toolbar-label,
.tb-stie .stie-history-title,
.tb-stie .stie-admin-header {
  font-family: var(--s-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--s-text);
}
.tb-stie .stie-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-stie .stie-pill,
.tb-stie .stie-pill:focus {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  font-family: var(--s-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  color: var(--s-text);
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: 9999px;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--s-transition), color var(--s-transition), border-color var(--s-transition);
}
.tb-stie .stie-pill:hover { color: var(--s-strong); border-color: var(--s-strong); background: var(--s-surface); }
.tb-stie .stie-pill.active,
.tb-stie .stie-pill.active:hover,
.tb-stie .stie-pill.active:focus { color: #fff; background: var(--s-strong); border-color: var(--s-strong); font-weight: 600; }
.tb-stie .stie-pill:focus-visible { outline: 2px solid var(--s-strong); outline-offset: 2px; }

.tb-stie .stie-input-wrap { padding: 24px; }
.tb-stie .stie-textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--s-line);
  border-radius: 4px;
  background: var(--s-surface);
  box-shadow: none;
  font-family: var(--s-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--s-strong);
}
.tb-stie .stie-textarea::placeholder { color: var(--s-text); opacity: .8; }
.tb-stie .stie-textarea:focus { outline: none; border-color: var(--s-strong); box-shadow: 0 0 0 1px var(--s-strong); }
.tb-stie .stie-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--s-border);
}
.tb-stie .stie-char { font-size: 14px; color: var(--s-text); }

/* ── Răspunsul ── */
.tb-stie .stie-response-wrap {
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.tb-stie .stie-response-wrap.visible { opacity: 1; transform: none; }
.tb-stie .stie-response-card {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: 20px;
  box-shadow: none;
  overflow: hidden;
}
.tb-stie .stie-response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--s-bg);
  border-bottom: 1px solid var(--s-border);
}
.tb-stie .stie-response-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-stie .stie-response-domain { font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--s-accent); }
.tb-stie .stie-response-time { font-size: 14px; color: var(--s-text); }
.tb-stie .stie-btn-copy,
.tb-stie .stie-btn-copy:focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--s-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  color: var(--s-text);
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  transition: color var(--s-transition), border-color var(--s-transition);
}
.tb-stie .stie-btn-copy:hover { color: var(--s-strong); border-color: var(--s-strong); background: var(--s-surface); }
.tb-stie .stie-btn-copy:focus-visible { outline: 2px solid var(--s-strong); outline-offset: 2px; }
.tb-stie .stie-response-body { padding: 32px; }
.tb-stie .stie-response-query {
  font-family: var(--s-serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.5;
  color: var(--s-text);
  border-left: 2px solid var(--s-primary);
  padding-left: 16px;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}

/* ── Textul generat (markdown randat de stie.js) ── */
.tb-stie .stie-md { overflow-wrap: break-word; }
.tb-stie .stie-md h2 {
  font-family: var(--s-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--s-title);
  margin: 32px 0 12px;
  padding: 0;
  border: 0;
}
.tb-stie .stie-md h3 {
  font-family: var(--s-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--s-title);
  margin: 24px 0 8px;
}
.tb-stie .stie-md > :first-child { margin-top: 0; }
.tb-stie .stie-md p { font-size: 16px; line-height: 1.75; color: var(--s-text); max-width: 68ch; margin: 0 0 16px; }
.tb-stie .stie-md ul,
.tb-stie .stie-md ol { margin: 0 0 16px; padding-left: 24px; max-width: 68ch; }
.tb-stie .stie-md li { font-size: 16px; line-height: 1.75; color: var(--s-text); margin-bottom: 8px; }
.tb-stie .stie-md strong { font-weight: 600; color: var(--s-strong); }
.tb-stie .stie-md em { font-style: italic; }
.tb-stie .stie-md code {
  font-family: "Courier New", monospace;
  font-size: .875em;
  background: var(--s-bg);
  border: 1px solid var(--s-border);
  border-radius: 4px;
  padding: 1px 5px;
}
.tb-stie .stie-md blockquote {
  border-left: 3px solid var(--s-primary);
  padding: 8px 16px;
  background: var(--s-bg);
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
}
.tb-stie .stie-md blockquote p { margin: 0; }
.tb-stie .stie-md hr { border: 0; border-top: 1px solid var(--s-border); margin: 24px 0; }
.tb-stie .stie-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--s-primary);
  vertical-align: middle;
  margin-left: 2px;
  animation: stie-blink .9s step-end infinite;
}
@keyframes stie-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Istoricul sesiunii ── */
.tb-stie .stie-history { width: 100%; }
.tb-stie .stie-history-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--s-text); }
.tb-stie .stie-history-list { display: flex; flex-direction: column; gap: 8px; }
.tb-stie .stie-history-item,
.tb-stie .stie-history-item:focus {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 20px;
  text-align: left;
  font-family: var(--s-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  color: var(--s-strong);
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: 20px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color var(--s-transition);
}
.tb-stie .stie-history-item:hover { border-color: var(--s-strong); background: var(--s-surface); color: var(--s-strong); }
.tb-stie .stie-history-item:focus-visible { outline: 2px solid var(--s-strong); outline-offset: 2px; }
.tb-stie .stie-history-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--s-primary); flex-shrink: 0; margin-top: 8px; }
.tb-stie .stie-history-text { flex: 1; min-width: 0; }
.tb-stie .stie-history-query { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-stie .stie-history-meta { display: block; font-size: 14px; color: var(--s-text); margin-top: 2px; }

/* ── Mesajul „nu e configurată” ── */
.tb-stie .stie-api-banner { width: 100%; background: var(--s-bg); border: 1px solid var(--s-border); border-radius: 20px; padding: 20px 24px; }
.tb-stie .stie-api-banner-text strong { display: block; font-size: 16px; font-weight: 600; color: var(--s-strong); }
.tb-stie .stie-api-banner-text p { font-size: 16px; line-height: 1.65; color: var(--s-text); margin-top: 4px; }

/* ── Panoul de administrare (doar pentru administratorii WP) ── */
.tb-stie .stie-admin-panel { width: 100%; background: var(--s-surface); border: 1px dashed var(--s-line); border-radius: 20px; overflow: hidden; }
.tb-stie .stie-admin-header { display: flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--s-bg); border-bottom: 1px solid var(--s-border); }
.tb-stie .stie-admin-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.tb-stie .stie-form-group { display: flex; flex-direction: column; gap: 8px; }
.tb-stie .stie-form-label { font-size: 14px; font-weight: 600; color: var(--s-strong); margin: 0; }
.tb-stie .stie-form-input,
.tb-stie .stie-form-select {
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--s-line);
  border-radius: 4px;
  background: var(--s-surface);
  box-shadow: none;
  font-family: var(--s-sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--s-strong);
}
/* Astra dă câmpurilor select o înălțime fixă; textul ieșea tăiat jos. */
.tb-stie .stie-form-select { height: auto; min-height: 48px; }
.tb-stie .stie-form-input:focus,
.tb-stie .stie-form-select:focus { outline: none; border-color: var(--s-strong); box-shadow: 0 0 0 1px var(--s-strong); }
.tb-stie .stie-admin-actiuni { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tb-stie .stie-admin-status { font-size: 14px; color: var(--s-text); }
.tb-stie .stie-admin-status.is-ok { color: var(--s-strong); font-weight: 600; }
.tb-stie .stie-admin-status.is-eroare { color: var(--s-accent-active); font-weight: 600; }

/* ── Eroarea din răspuns ── */
.tb-stie .stie-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--s-bg);
  border: 1px solid var(--s-border);
  border-radius: 6px;
  font-size: 16px;
  color: var(--s-accent-active);
}

/* ── Tabletă ── */
@media (max-width: 1024px) {
  .tb-stie .tb-stie-erou { padding: 96px 0; }
  .tb-stie .tb-stie-titlu { font-size: 52px; }
}
@media (max-width: 921px) {
  .tb-stie .stie-btn-explain,
  .tb-stie .stie-btn-primary { font-size: 15px; padding: 14px 28px; }
}
/* ── Mobil: margine laterală 24px, ca pe Acasă și Contact ── */
@media (max-width: 767px) {
  .tb-stie-in { padding: 0 24px; }
  .tb-stie .tb-stie-erou { padding: 64px 0; }
  .tb-stie .tb-stie-eticheta { font-size: 14px; margin-bottom: 15px; }
  .tb-stie .tb-stie-titlu { font-size: 40px; margin-bottom: 15px; }
  .tb-stie .tb-stie-intro { font-size: 17px; }
  .tb-stie .tb-stie-unealta { padding: 48px 0 64px; }
  .tb-stie .stie-card-toolbar { padding: 16px; }
  .tb-stie .stie-input-wrap { padding: 16px; }
  .tb-stie .stie-input-footer { padding: 12px 16px; }
  .tb-stie .stie-response-header { padding: 12px 16px; }
  .tb-stie .stie-response-body { padding: 20px 16px; }
  .tb-stie .stie-admin-body { padding: 16px; }
  .tb-stie .stie-admin-header { padding: 12px 16px; }
  .tb-stie .stie-md h2 { font-size: 24px; }
  .tb-stie .stie-md h3 { font-size: 20px; }
}
@media (max-width: 544px) {
  .tb-stie .stie-btn-explain,
  .tb-stie .stie-btn-primary { padding: 12px 24px; }
}
