/**
 * Tensor Core v2.0.0 — Componentes Editoriais, Caixa de Prompt (Referência 1),
 * Skills, Publicidade Segura e Central de Privacidade.
 */

.tensor-prompt-box {
  background: var(--tensor-surface, #FFFFFF);
  border: 1px solid #CFE0FF;
  border-radius: 18px;
  padding: 18px;
  margin: 24px 0;
  box-shadow: 0 6px 22px rgba(0, 91, 255, 0.06);
}

html.tensor-dark .tensor-prompt-box {
  border-color: var(--tensor-border, #22324F);
}

.tensor-prompt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tensor-prompt-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tensor-prompt-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #005BFF 0%, #0088FF 100%);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 91, 255, 0.25);
}

.tensor-prompt-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--tensor-dark, #071B38);
}

html.tensor-dark .tensor-prompt-title {
  color: #FFFFFF;
}

.tensor-prompt-desc,
.tensor-prompt-compat {
  margin: 2px 0 0;
  font-size: 0.8125rem;
  color: var(--tensor-text-muted, #55657E);
}

.tensor-prompt-timer-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #005BFF;
  background: #EBF3FF;
  border: 1px solid #CFE0FF;
  padding: 6px 12px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.tensor-prompt-body {
  background: var(--tensor-bg, #F4F7FC);
  border: 1px solid var(--tensor-border, #DCE5F2);
  border-radius: 13px;
  padding: 15px 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.tensor-prompt-body.is-clamped {
  max-height: 156px;
  overflow: hidden;
}

.tensor-prompt-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.86rem;
  line-height: 1.62;
  color: var(--tensor-text, #0F172A);
}

.tensor-prompt-expand-btn {
  background: transparent;
  border: 0;
  color: #005BFF;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 0 10px;
  cursor: pointer;
}

.tensor-prompt-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tensor-prompt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.16s ease, opacity 0.16s ease;
}

.tensor-prompt-btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.tensor-prompt-btn-primary {
  background: linear-gradient(180deg, #0E6EFF 0%, #0050E0 100%);
  color: #FFFFFF;
}

.tensor-prompt-btn-primary:hover:not(:disabled) {
  background: #0047CC;
  color: #FFFFFF;
}

.tensor-prompt-btn-outline {
  background: var(--tensor-surface, #FFFFFF);
  color: #005BFF;
  border-color: #93C5FD;
}

.tensor-prompt-btn-outline:hover:not(:disabled) {
  background: #EEF4FF;
  border-color: #005BFF;
}

.tensor-prompt-status {
  margin: 10px 0 0;
  min-height: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #16A34A;
}

/* Blocos Editoriais Complementares */
.tensor-callout {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--tensor-border, #E2E8F0);
  margin: 20px 0;
  background: var(--tensor-bg, #F4F7FC);
}

.tensor-callout-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: #005BFF;
}

.tensor-callout-warning .tensor-callout-title {
  color: #DC2626;
}

.tensor-pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.tensor-pros-col,
.tensor-cons-col {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--tensor-border, #E2E8F0);
  background: var(--tensor-surface, #FFFFFF);
}

.tensor-accordion-item {
  border: 1px solid var(--tensor-border, #E2E8F0);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  background: var(--tensor-surface, #FFFFFF);
}

.tensor-accordion-item summary {
  font-weight: 700;
  cursor: pointer;
}

.tensor-accordion-body {
  margin-top: 10px;
  color: var(--tensor-text-muted, #64748B);
}

.tensor-code-box {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1E293B;
  margin: 20px 0;
  background: #0B1220;
}

.tensor-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #111C33;
  color: #93C5FD;
  font-size: 0.75rem;
  font-weight: 700;
}

.tensor-code-copy {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Publicidade segura com separação e anti-CLS */
.tensor-ad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--tensor-bg, #F4F7FC);
}

.tensor-ad-disclosure {
  font-size: 0.7rem;
  color: var(--tensor-text-muted, #64748B);
  margin-bottom: 6px;
}

.tensor-ad-device-desktop { display: none; }
@media (min-width: 1024px) {
  .tensor-ad-device-desktop { display: flex; }
  .tensor-ad-device-mobile { display: none; }
}

/* Banner de Cookies & Central de Preferências (sem dark patterns) */
.tensor-cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  background: var(--tensor-surface, #FFFFFF);
  border: 1px solid var(--tensor-border, #E2E8F0);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(7, 27, 56, 0.16);
  padding: 16px;
  max-width: 960px;
  margin-inline: auto;
}

.tensor-cookie-banner[hidden],
.tensor-privacy-modal[hidden] {
  display: none !important;
}

.tensor-cookie-text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--tensor-text, #101828);
}

.tensor-cookie-actions,
.tensor-privacy-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tensor-cookie-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--tensor-border, #E2E8F0);
}

.tensor-cookie-btn-primary {
  background: #005BFF;
  border-color: #005BFF;
  color: #FFFFFF;
}

.tensor-cookie-btn-equal {
  background: #071B38;
  border-color: #071B38;
  color: #FFFFFF;
}

.tensor-cookie-btn-outline,
.tensor-cookie-btn-ghost {
  background: var(--tensor-surface, #FFFFFF);
  color: var(--tensor-text, #101828);
}

.tensor-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tensor-privacy-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 27, 56, 0.6);
}

.tensor-privacy-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--tensor-surface, #FFFFFF);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(7, 27, 56, 0.22);
}

.tensor-privacy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tensor-privacy-head h2 {
  margin: 0;
  font-size: 1.125rem;
}

.tensor-privacy-close {
  min-width: 40px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--tensor-border, #E2E8F0);
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}

.tensor-privacy-cat {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--tensor-border, #E2E8F0);
  border-radius: 12px;
  margin-bottom: 10px;
}

.tensor-privacy-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.tensor-privacy-cat p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--tensor-text-muted, #64748B);
}

.tensor-privacy-links {
  display: flex;
  gap: 14px;
  margin: 12px 0 16px;
  font-size: 0.8125rem;
}

.tensor-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.tensor-library-card {
  background: var(--tensor-surface, #FFFFFF);
  border: 1px solid var(--tensor-border, #E2E8F0);
  border-radius: 14px;
  padding: 16px;
}

/* Cartão responsivo no fluxo de leitura. */
.tensor-skill-article-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 680px;
  margin: 16px auto;
  padding: 10px;
  border: 1px solid #cfe0f7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 9px rgb(17 51 93 / 6%);
  container-type: inline-size;
}

.tensor-skill-article-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 6px;
  align-items: center;
  overflow-wrap: anywhere;
}

.tensor-skill-article-card img.tensor-skill-article-icon {
  display: block;
  width: 42px;
  height: 42px;
  max-width: 100%;
  margin: 0;
  border-radius: 8px;
  object-fit: cover;
}

.tensor-skill-article-info { min-width: 0; }

.tensor-skill-article-card .tensor-skill-article-title {
  margin: 0;
  color: #091c37;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.22;
}

.tensor-skill-article-card .tensor-skill-article-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 2px 0 0;
  color: #4d617b;
  font-size: .82rem;
  line-height: 1.3;
}

.tensor-skill-article-details, .tensor-skill-platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.tensor-skill-article-details { grid-column: 1 / -1; }

.tensor-skill-chip, .tensor-skill-article-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #e9f2ff;
  color: #1852a0;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.36;
}

.tensor-skill-chip svg { width: 12px; height: 12px; flex: none; }
.tensor-skill-chip.is-chatgpt { background: #e5f7f0; color: #12664b; }
.tensor-skill-chip.is-claude { background: #fcf1e9; color: #984827; }
.tensor-skill-article-compatibility { color: #4d617b; font-size: .75rem; line-height: 1.35; }

.tensor-skill-article-card a.tensor-skill-article-action {
  box-sizing: border-box;
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #0754cf;
  color: #fff;
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.tensor-skill-article-action svg { width: 16px; height: 16px; flex: none; }
.tensor-skill-article-card a.tensor-skill-article-action:hover { background: #0046b6; color: #fff; }
.tensor-skill-article-card a.tensor-skill-article-action:focus-visible { outline: 2px solid #0754cf; outline-offset: 2px; }

@container (max-width: 250px) {
  .tensor-skill-article-details, .tensor-skill-article-details .tensor-skill-platforms { gap: 3px; }
  .tensor-skill-article-details :is(.tensor-skill-chip, .tensor-skill-article-meta) { padding-inline: 4px; }
  .tensor-skill-article-details .tensor-skill-chip svg { width: 11px; height: 11px; }
}

@container (min-width: 470px) {
  .tensor-skill-article-layout { grid-template-columns: 50px minmax(0, 1fr) fit-content(40%); column-gap: 10px; row-gap: 3px; }
  .tensor-skill-article-card img.tensor-skill-article-icon { grid-area: 1 / 1 / 3 / 2; width: 50px; height: 50px; }
  .tensor-skill-article-info { grid-area: 1 / 2 / 2 / 3; align-self: end; }
  .tensor-skill-article-info:last-of-type { grid-row-end: 3; align-self: center; }
  .tensor-skill-article-details { grid-area: 2 / 2 / 3 / 3; align-self: start; }
  .tensor-skill-article-card a.tensor-skill-article-action { grid-area: 1 / 3 / 3 / 4; padding-inline: 12px; }
}

html.tensor-dark .tensor-skill-article-card { background: #14233e; border-color: #334665; }
html.tensor-dark .tensor-skill-article-card .tensor-skill-article-title { color: #edf4ff; }
html.tensor-dark .tensor-skill-article-card :is(.tensor-skill-article-desc, .tensor-skill-article-compatibility) { color: #bdcce1; }

.tensor-skill-download-main [data-tensor-download-link] { text-decoration:none; }
[data-tensor-download-link][hidden], [data-tensor-download-action][hidden] { display:none!important; }
.tensor-skill-download-main [data-tensor-ad-slot] { max-width:100%; }
.tensor-skill-step-text { white-space: pre-line; }
[data-tensor-ad-slot="tensor_skill_ads_03"] {
  width: min(860px, calc(100% - 32px));
  margin-inline: auto;
}
.single-post :is(.tensor-single-article,.tensor-single-inner,.tensor-article-content,.tensor-article-body) {
  min-width:0;
  overflow-wrap:anywhere;
}
@media(max-width:1023px) {
  .single-post .tensor-layout-grid { grid-template-columns:minmax(0,1fr); }
}
