/* ============================================================
   dialokia — Documentos legales y soporte
   Sistema visual alineado con landing y acceso (Poppins + marca dialokia).
   Compartido por: privacy-policy.html, terms-of-service.html,
   account-deletion.html, report-content.html, legal-support.html y support.html.
   Servido como CSS externo (style-src 'self') -> sin hash CSP inline.
   ============================================================ */

:root {
  --legal-ink: #08122f;
  --legal-body: #35405b;
  --legal-muted: #596278;
  --legal-paper: #f4f6fb;
  --legal-card: #ffffff;
  --legal-line: rgba(8, 18, 47, 0.11);
  --legal-sky: #e8f8fb;
  --legal-mint: #eeebff;
  --legal-coral: #6545e2;
  --legal-gold: #f2cf74;
  --legal-blue: #4f46e5;
  --legal-green: #2f8f68;
  --legal-radius: 30px;
  --legal-shadow: 0 30px 80px rgba(8, 18, 47, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Poppins',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  line-height: 1.75;
  color: var(--legal-body);
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(101, 69, 226, 0.1), transparent 62%),
    radial-gradient(840px 520px at 92% 4%, rgba(1, 179, 211, 0.1), transparent 62%),
    var(--legal-paper);
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 4vw, 48px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(8, 18, 47, 0.16);
  color: var(--legal-ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--legal-line);
  border-radius: var(--legal-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--legal-shadow);
}

/* ---------- Cabecera ---------- */
.header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 132px;
  margin-bottom: 34px;
  padding: clamp(22px, 4vw, 32px);
  overflow: hidden;
  border: 1px solid rgba(8, 18, 47, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 2% 110%, rgba(101, 69, 226, 0.16) 0 92px, transparent 93px),
    radial-gradient(circle at 102% -24%, rgba(1, 179, 211, 0.16) 0 105px, transparent 106px),
    #f9f9f9;
  box-shadow: 0 18px 48px rgba(8, 18, 47, 0.08);
}

.header-mark {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
}

.header-text {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.header-text h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--legal-ink);
  margin-bottom: 6px;
}

.header-text p {
  color: var(--legal-muted);
  font-size: 0.98rem;
  font-weight: 500;
}

/* ---------- Tarjeta de datos del responsable ---------- */
.app-info {
  background: linear-gradient(135deg, rgba(101, 69, 226, 0.08), rgba(1, 179, 211, 0.09));
  border: 1px solid var(--legal-line);
  border-radius: 18px;
  padding: 22px 24px 22px 26px;
  margin-bottom: 32px;
  box-shadow: 0 12px 30px rgba(8, 18, 47, 0.05);
}

.app-info p {
  margin-bottom: 6px;
  color: var(--legal-ink);
  font-size: 0.97rem;
}

.app-info p:last-child {
  margin-bottom: 0;
}

.app-info strong {
  font-weight: 600;
}

/* ---------- Titulos de seccion ---------- */
h2 {
  position: relative;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--legal-ink);
  margin-top: 38px;
  margin-bottom: 16px;
  padding-left: 18px;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6545e2, #01b3d3);
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--legal-ink);
  margin-top: 24px;
  margin-bottom: 10px;
}

/* ---------- Texto ---------- */
p,
li {
  margin-bottom: 10px;
  color: var(--legal-body);
}

ul,
ol {
  margin: 0 0 16px 1.25rem;
}

li {
  padding-left: 4px;
}

li::marker {
  color: var(--legal-coral);
}

a {
  color: var(--legal-blue);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(79, 70, 229, 0.32);
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--legal-blue);
}

strong {
  color: var(--legal-ink);
  font-weight: 600;
}

/* ---------- Cajas de aviso ---------- */
.highlight,
.warning,
.important,
.notice {
  border: 1px solid var(--legal-line);
  border-left-width: 5px;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
}

.highlight {
  background: rgba(191, 232, 196, 0.3);
  border-left-color: var(--legal-green);
}

.warning,
.notice {
  background: rgba(242, 207, 116, 0.22);
  border-left-color: var(--legal-gold);
}

.important {
  background: rgba(240, 112, 90, 0.12);
  border-left-color: var(--legal-coral);
}

.highlight ul,
.important ul,
.warning ul,
.notice ul {
  margin-top: 10px;
  margin-bottom: 0;
}

/* ---------- Tarjeta de contacto ---------- */
.contact-info {
  background: linear-gradient(135deg, rgba(1, 179, 211, 0.08), rgba(101, 69, 226, 0.06));
  border: 1px solid var(--legal-line);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 26px 0;
}

.contact-info p {
  margin-bottom: 8px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

/* ---------- Formularios ---------- */
.content-report-form {
  display: grid;
  gap: 22px;
  margin: 34px 0;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--legal-line);
  border-radius: 18px;
  background: #fbfcff;
  box-shadow: 0 18px 44px rgba(8, 18, 47, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}

.form-field label {
  color: var(--legal-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(8, 18, 47, 0.16);
  border-radius: 12px;
  background: #ffffff;
  color: var(--legal-body);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  padding: 14px 16px;
  outline: none;
  box-shadow: 0 1px 0 rgba(8, 18, 47, 0.04);
}

.form-field select {
  appearance: none;
  padding-right: 46px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--legal-muted) 50%),
    linear-gradient(135deg, var(--legal-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 15px) 50%;
  background-repeat: no-repeat;
  background-size: 7px 7px;
}

.form-field textarea {
  min-height: 210px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--legal-blue);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.field-help {
  margin: -1px 0 0;
  color: var(--legal-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 2px;
}

.form-actions .back-btn {
  cursor: pointer;
}

.form-actions .back-btn:disabled {
  cursor: progress;
  opacity: 0.68;
  transform: none;
}

.report-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--legal-muted);
  text-align: center;
  font-weight: 600;
}

.support-request-section {
  scroll-margin-top: 24px;
}

.support-request-section > p {
  color: var(--legal-muted);
  margin-bottom: 0;
}

.support-fallback {
  margin-top: -12px;
  padding: 16px 18px;
  border: 1px solid rgba(8, 18, 47, 0.11);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(1, 179, 211, 0.08), rgba(101, 69, 226, 0.06));
  color: var(--legal-body);
  font-size: 0.94rem;
}

.report-status-success {
  color: var(--legal-green);
}

.report-status-error {
  color: #a33b2f;
}

/* ---------- Hub legal y soporte ---------- */
.legal-support-container {
  max-width: 820px;
}

.legal-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 32px;
}

.legal-hub-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 24px 56px 24px 24px;
  overflow: hidden;
  color: var(--legal-body);
  text-decoration: none;
  background:
    radial-gradient(circle at 92% 10%, rgba(101, 69, 226, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(1, 179, 211, 0.07));
  border: 1px solid var(--legal-line);
  border-bottom: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(8, 18, 47, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.legal-hub-card::after {
  content: '';
  position: absolute;
  right: -38px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(101, 69, 226, 0.09);
  pointer-events: none;
}

.legal-hub-card::before {
  content: '\2192';
  position: absolute;
  top: 50%;
  right: 24px;
  z-index: 1;
  color: rgba(79, 70, 229, 0.72);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  pointer-events: none;
}

.legal-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 70, 229, 0.34);
  box-shadow: 0 24px 54px rgba(8, 18, 47, 0.13);
}

.legal-hub-card:hover::before,
.legal-hub-card:focus-visible::before {
  color: var(--legal-blue);
  transform: translate(4px, -50%);
}

.legal-hub-card:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.3);
  outline-offset: 3px;
}

.legal-hub-kicker {
  color: var(--legal-coral);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.legal-hub-card h2 {
  margin: 0;
  padding-left: 0;
  color: var(--legal-ink);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.15;
}

.legal-hub-card h2::before {
  content: none;
}

.legal-hub-card p {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--legal-muted);
  line-height: 1.6;
}

/* ---------- Boton volver ---------- */
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  text-align: center;
  margin-top: 38px;
}

.back-btn {
  display: inline-block;
  min-width: 168px;
  padding: 13px 28px;
  background: var(--legal-ink);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(8, 18, 47, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(8, 18, 47, 0.26);
}

.back-btn.secondary-back-btn {
  color: var(--legal-ink);
  background: #ffffff;
  border: 1px solid var(--legal-line);
  box-shadow: 0 12px 24px rgba(8, 18, 47, 0.1);
}

.back-btn.secondary-back-btn:hover {
  box-shadow: 0 18px 34px rgba(8, 18, 47, 0.14);
}

.legal-page > .site-footer {
  margin-top: 18px;
}

.legal-page .site-footer a {
  border-bottom: 0;
  white-space: nowrap;
}

/* ---------- Pie ---------- */
.last-updated {
  text-align: center;
  color: var(--legal-muted);
  font-size: 0.9rem;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--legal-line);
}

.last-updated p {
  margin-bottom: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .container {
    padding: 20px;
    border-radius: 24px;
  }

  .header {
    min-height: 116px;
    padding: 22px 18px;
  }

  .header-mark {
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .content-report-form {
    gap: 18px;
    padding: 20px;
  }

  .form-field textarea {
    min-height: 180px;
  }

  .form-actions .back-btn {
    width: 100%;
    text-align: center;
  }

  .legal-actions {
    gap: 10px;
  }

  .legal-actions .back-btn {
    width: min(100%, 260px);
  }

  .legal-hub-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .legal-hub-card {
    min-height: auto;
    padding: 20px 48px 20px 20px;
  }
}

@media (max-width: 360px) {
  .legal-page > .site-footer {
    gap: 10px;
    padding-inline: 10px;
  }

  .legal-page > .site-footer .footer-brand {
    gap: 6px;
  }

  .legal-page > .site-footer .footer-brand img {
    width: 82px;
  }
}
