/**
 * Soporte — paridad visual con Estadísticas / Punto de control
 */

#support-tab.tuko-support {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
  width: 100%;
}

#support-tab.tuko-support * {
  font-family: inherit;
}

/* ─── Cabecera ─── */
.tuko-support-head {
  margin-bottom: 1.25rem;
}

.tuko-support-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.tuko-support-head p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  letter-spacing: -0.01em;
  line-height: 1.55;
  max-width: 40rem;
  text-wrap: pretty;
}

/* ─── Tiles tienda ─── */
.tuko-support-store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tuko-support-store-tile {
  padding: 0.875rem 1rem 1rem;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tuko-support-store-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.tuko-support-store-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.35;
  word-break: break-word;
}

.tuko-support-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.5625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tuko-support-status-pill--active {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.tuko-support-status-pill--inactive {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.tuko-support-status-pill--unknown {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* ─── Contenido apilado ─── */
.tuko-support-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .tuko-support-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ─── Panels ─── */
.tuko-support-panel {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  padding: 1.25rem 1.375rem 1.375rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tuko-support-panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.tuko-support-panel-head svg {
  flex-shrink: 0;
  color: #64748b;
}

.tuko-support-panel-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* ─── FAQ ─── */
.tuko-support-faq {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.tuko-support-faq-item {
  padding: 0.875rem 1rem;
  background: #fafbfc;
  border: 1px solid #f1f5f9;
  border-left: 3px solid #3d50f2;
  border-radius: 0.625rem;
}

.tuko-support-faq-item:nth-child(1) {
  border-left-color: #3d50f2;
  background: linear-gradient(90deg, #f5f7ff 0%, #fafbfc 28%);
}

.tuko-support-faq-item:nth-child(2) {
  border-left-color: #10b981;
  background: linear-gradient(90deg, #f0fdf8 0%, #fafbfc 28%);
}

.tuko-support-faq-item:nth-child(3) {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, #fffbeb 0%, #fafbfc 28%);
}

.tuko-support-faq-item:nth-child(4) {
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, #f7f4ff 0%, #fafbfc 28%);
}

.tuko-support-faq-item:nth-child(3) .tuko-support-faq-desc a {
  color: #d97706;
}

.tuko-support-faq-title {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.tuko-support-faq-desc {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.tuko-support-faq-desc a {
  color: #3d50f2;
  font-weight: 600;
  text-decoration: none;
}

.tuko-support-faq-desc a:hover {
  text-decoration: underline;
}

/* ─── Formulario ─── */
.tuko-support-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tuko-support-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tuko-support-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.01em;
}

.tuko-support-input,
.tuko-support-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: #0f172a;
  letter-spacing: -0.01em;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tuko-support-textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.55;
}

.tuko-support-input:focus,
.tuko-support-textarea:focus {
  outline: none;
  border-color: #3d50f2;
  box-shadow: 0 0 0 3px rgba(61, 80, 242, 0.12);
}

.tuko-support-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background-color: #3d50f2;
  border: none;
  border-radius: 0.625rem;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 4px rgba(61, 80, 242, 0.2);
  transition: background-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.tuko-support-submit:hover:not(:disabled) {
  background-color: #2f3fd0;
}

.tuko-support-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tuko-support-form-status {
  display: block;
  min-height: 1.25rem;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  color: #64748b;
  letter-spacing: -0.01em;
}

.tuko-support-form-status.is-success {
  color: #059669;
}

.tuko-support-form-status.is-error {
  color: #dc2626;
}

/* ─── Modal email fallback ─── */
.tuko-support-email-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 12, 28, 0.45);
  backdrop-filter: blur(4px);
}

.tuko-support-email-overlay.is-open {
  display: flex;
}

.tuko-support-email-panel {
  width: min(100%, 36rem);
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.2);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.tuko-support-email-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid #f1f5f9;
}

.tuko-support-email-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.tuko-support-email-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tuko-support-email-close:hover {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.tuko-support-email-body {
  padding: 1.25rem 1.375rem 1.375rem;
}

.tuko-support-email-meta {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.55;
}

.tuko-support-email-meta strong {
  color: #334155;
  font-weight: 600;
}

.tuko-support-email-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 11rem;
  padding: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  resize: vertical;
  line-height: 1.5;
}

.tuko-support-email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1rem;
}

.tuko-support-email-btn {
  flex: 1 1 10rem;
  padding: 0.5625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 0.625rem;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tuko-support-email-btn--primary {
  color: #fff;
  background: #3d50f2;
  border: none;
  box-shadow: 0 2px 8px rgba(61, 80, 242, 0.28);
}

.tuko-support-email-btn--primary:hover {
  background: #2f3fd0;
}

.tuko-support-email-btn--ghost {
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.tuko-support-email-btn--ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tuko-support-email-copy-status {
  margin: 0.75rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  color: #64748b;
}

.tuko-support-email-copy-status.is-success {
  color: #059669;
}

.tuko-support-email-copy-status.is-warning {
  color: #d97706;
}

@media (max-width: 640px) {
  .tuko-support-store-grid {
    grid-template-columns: 1fr;
  }
}
