/* Reportar errores: Dialog / Field / Attachment de shadcn, adaptados al sitio. */
.header-report-btn {
  position: relative;
  z-index: 33;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-report-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.header-report-btn:hover, .header-report-btn[aria-expanded="true"] { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.footer-report-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.footer-report-link:hover { color: var(--primary-text); }

/* Por encima del aviso de cookies; el fondo queda inerte al abrir. */
.report-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgb(0 0 0 / .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.report-chat-backdrop.is-open { opacity: 1; pointer-events: auto; }
.report-chat-shell {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10021;
  width: min(624px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  visibility: hidden;
  transform: translate(-50%, calc(-50% + 6px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out, transform 180ms cubic-bezier(.16,1,.3,1);
}
.report-chat-shell.is-open { visibility: visible; transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.site-shell .report-chat-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--surface, #101513);
  color: var(--text, #f1f5f2);
  box-shadow: 0 24px 80px -24px rgb(0 0 0 / .8);
}
.report-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 20px; flex-shrink: 0; }
.report-chat-head-brand { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.report-chat-head-icon { display: grid; place-items: center; width: 24px; height: 28px; flex-shrink: 0; color: var(--text-soft); }
.report-chat-head-icon svg { width: 21px; height: 21px; }
.site-shell .report-chat-head-title { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
.report-chat-head-sub { margin: 5px 0 0; color: var(--text-soft); font-size: .875rem; line-height: 1.55; max-width: 48ch; }
.report-chat-close, .report-screenshot-lightbox-close, .report-chat-screenshot-remove {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 44px; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--text-soft); cursor: pointer;
}
.report-chat-close { margin: -8px -8px 0 0; }
.report-chat-close svg, .report-screenshot-lightbox-close svg, .report-chat-screenshot-remove svg { width: 18px; height: 18px; }
.report-chat-close:hover, .report-chat-screenshot-remove:hover { background: var(--surface-hover); color: var(--text); }
.report-chat-form { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.report-chat-body { display: grid; gap: 20px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; scrollbar-width: thin; scrollbar-color: #48544c transparent; }
.report-chat-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.report-chat-description-field, .report-chat-screenshot { min-width: 0; }
.report-chat-field-label { display: block; margin: 0 0 8px; font-size: .875rem; font-weight: 550; line-height: 1.5; color: var(--text); }
.report-chat-field-label .is-required { margin-left: 2px; color: var(--text-soft); }
.site-shell .report-chat-input {
  display: block; box-sizing: border-box; width: 100%; height: 124px; min-height: 100px; max-height: 240px;
  padding: 12px 14px; resize: vertical; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--bg, #080b0a); color: var(--text); font: inherit; font-size: .9375rem; line-height: 1.65;
  caret-color: var(--primary-text); transition: border-color 120ms ease;
}
.report-chat-input::placeholder { color: var(--text-faint, #909f96); opacity: 1; }
.site-shell .report-chat-input:focus { border-color: #659434; outline: 2px solid #659434; outline-offset: -2px; box-shadow: none; }
.report-chat-field-hint { margin: 6px 0 0; color: var(--text-faint); font-size: .75rem; line-height: 1.5; }
.report-chat-attachment-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; margin-bottom: 8px; }
.report-chat-attachment-heading .report-chat-field-label { margin: 0; }
.report-chat-file-types { color: var(--text-faint); font-size: .75rem; line-height: 1.5; }
.report-chat-screenshot-drop { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: #0d120f; }
.report-chat-screenshot-drop.is-dragover { border-color: var(--primary-text); background: #192219; }
.report-chat-screenshot-drop.is-missing { border-color: #e09b93; }
.report-chat-screenshot-hint { margin: 0; color: var(--text-soft); font-size: .8125rem; line-height: 1.5; text-align: center; }
.report-chat-screenshot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.report-chat-screenshot-btn, .report-chat-cancel, .report-chat-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-raised, #171d19); color: var(--text);
  font: inherit; font-size: .8125rem; font-weight: 550; line-height: 1.4; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.report-chat-screenshot-btn svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-soft); }
.report-chat-screenshot-btn:hover:not(:disabled), .report-chat-cancel:hover { background: var(--surface-hover); border-color: #526155; }
.report-chat-screenshot-btn:disabled, .report-chat-input:disabled, .report-chat-screenshot-remove:disabled { opacity: .55; cursor: default; }
.report-chat-screenshot-preview.is-empty { display: none; }
.report-chat-screenshot-preview.is-filled { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-raised, #171d19); }
.report-chat-screenshot-view { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: zoom-in; }
.report-chat-screenshot-view img { display: block; width: 64px; height: 48px; flex-shrink: 0; border-radius: 5px; object-fit: cover; background: var(--bg); }
.report-chat-attachment-copy { display: grid; gap: 3px; min-width: 0; }
.report-chat-screenshot-empty { color: var(--text); font-size: .8125rem; font-weight: 500; }
.report-chat-screenshot-view-label { color: var(--text-soft); font-size: .75rem; text-decoration: underline; text-underline-offset: 3px; }
.report-chat-screenshot-remove[hidden] { display: none; }
.report-chat-messages:empty { display: none; }
.report-chat-bubble { padding: 10px 12px; border: 1px solid #774d45; border-radius: 8px; background: #291c19; color: #f2bbb3; font-size: .8125rem; line-height: 1.55; overflow-wrap: anywhere; }
.report-chat-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; border-top: 1px solid var(--border); flex-shrink: 0; background: #141a16; }
.report-chat-meta { max-width: 25ch; margin: 0; color: var(--text-soft); font-size: .75rem; line-height: 1.55; }
.report-chat-footer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.report-chat-cancel { background: transparent; }
.report-chat-send { background: var(--primary, #76b900); color: #101907; border-color: transparent; }
.report-chat-send:hover:not(:disabled) { background: var(--primary-hover, #8dcc18); }
.report-chat-send:disabled { background: #29332b; color: #9faea3; border-color: var(--border); cursor: default; }
.report-chat-send.is-sending { gap: 10px; }
.report-chat-send.is-sending::after { content: ''; width: 14px; height: 14px; border: 2px solid #5d6e61; border-top-color: #dbe9de; border-radius: 50%; animation: report-send-spin .8s linear infinite; }
.report-screenshot-lightbox, .report-screenshot-capturing, .report-success-overlay { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; box-sizing: border-box; visibility: hidden; opacity: 0; pointer-events: none; background: rgb(0 0 0 / .85); transition: opacity 180ms ease-out; }
.report-screenshot-lightbox { z-index: 10022; }
.report-screenshot-capturing { z-index: 10023; }
.report-success-overlay { z-index: 10024; }
.report-screenshot-lightbox.is-open, .report-screenshot-capturing.is-visible, .report-success-overlay.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.report-screenshot-lightbox img { max-width: min(960px, 100%); max-height: calc(100dvh - 96px); object-fit: contain; border-radius: 8px; }
.report-screenshot-lightbox-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); color: var(--text); background: #202822; border-color: var(--border-strong); }
.report-screenshot-lightbox-close:hover { background: #303e33; }
.report-screenshot-capturing-card, .report-success-card { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 320px; text-align: center; }
.report-screenshot-capturing-text, .report-success-text { margin: 0; font-size: 1rem; color: var(--text); line-height: 1.5; }
.report-screenshot-capturing-spinner, .report-capture-spinner { width: 28px; height: 28px; flex-shrink: 0; border: 2px solid #3c4b40; border-top-color: var(--primary-text); border-radius: 50%; animation: report-send-spin .8s linear infinite; }
.report-capture-spinner { width: 15px; height: 15px; }
.report-success-check { width: 64px; height: 64px; color: var(--primary-text); }
.report-success-check svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.report-success-text { font-weight: 550; }
@keyframes report-send-spin { to { transform: rotate(360deg); } }
@media (max-width: 880px) {
  .header-report-label { display: none; }
  .header-report-btn { width: 34px; height: 34px; padding: 0; justify-content: center; }
}
@media (max-width: 560px) {
  .report-chat-shell { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .site-shell .report-chat-panel { max-height: calc(100dvh - 24px); border-radius: 13px; }
  .report-chat-head { padding: 20px 18px 18px; gap: 8px; }
  .report-chat-head-brand { gap: 9px; }
  .site-shell .report-chat-head-title { font-size: 1.125rem; }
  .report-chat-head-sub { font-size: .8125rem; }
  .report-chat-body { padding: 0 18px 20px; gap: 18px; }
  .report-chat-attachment-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .report-chat-screenshot-drop { padding: 12px; }
  .report-chat-screenshot-actions { grid-template-columns: 1fr; }
  .site-shell .report-chat-input { height: 116px; font-size: 1rem; }
  .report-chat-form-footer { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
  .report-chat-meta { max-width: none; font-size: .6875rem; }
  .report-chat-footer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .report-chat-send, .report-chat-cancel { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .report-chat-shell, .report-chat-backdrop, .report-screenshot-lightbox, .report-screenshot-capturing, .report-success-overlay { transition: none; }
  .report-chat-send.is-sending::after, .report-screenshot-capturing-spinner, .report-capture-spinner { animation: none; }
}
@media (forced-colors: active) {
  .site-shell .report-chat-input:focus { border-color: Highlight; outline-color: Highlight; }
  .report-chat-send:disabled { color: GrayText; border-color: GrayText; }
  .report-chat-screenshot-drop.is-dragover { border-color: Highlight; }
}
