/* delete.css */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Hero */
.legal-hero {
  width: var(--wrap);
  margin: 0 auto;
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--ed);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.hero-content {
  flex: 1;
  min-width: 0;
}
.legal-hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-top: 0;
}
.legal-summary {
  max-width: 36em;
  margin-top: 16px;
  color: var(--mut);
  font-size: 1.1875rem;
}
.legal-date {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 0 8px;
  margin-top: 24px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--in);
  color: var(--ink);
  font-size: 0.875rem;
  box-shadow: var(--inset);
}
.legal-date strong { font-weight: 600; }

.hero-showcase {
  width: 200px;
  height: 200px;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--ed);
  box-shadow: var(--raised-l);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
@media (max-width: 759px) {
  .hero-showcase {
    display: none;
  }
}

.hero-showcase .glow {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--sb);
  opacity: var(--glow);
  filter: blur(20px);
}
.hero-showcase img {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.22));
}

/* Layout */
.delete-layout {
  width: var(--wrap);
  margin: 0 auto;
  padding: 48px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .delete-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-aside { position: static; }
}

/* Form card */
.form-card {
  padding: 40px;
  border-radius: 26px;
  background: var(--bg);
  border: 1px solid var(--ed);
  box-shadow: var(--raised-m);
  position: relative;
}
.form-card h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
.form-intro { margin: 8px 0 28px; color: var(--mut); }

/* Field */
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field label span { color: var(--si); }
.field small { color: var(--mut); font-size: 0.8125rem; }

.field input,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: var(--in);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  box-shadow: var(--inset);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--prt);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--prt);
  outline-offset: 3px;
  border-radius: 18px;
}
.field input[aria-invalid],
.field textarea[aria-invalid] {
  border: 1.5px solid var(--si);
}

/* Errors */
.field-error:empty,
.form-error:empty { display: none; }
.field-error,
.form-error {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 18px;
  background-color: var(--sb);
  border: 1px solid var(--sbd);
  color: var(--si);
  font-size: 0.9375rem;
  font-weight: 600;
}
.field-error::before,
.form-error::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-color: var(--si);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}
.field-error:empty { display: none; }

/* form.js shows .form-error with an inline display:block, so anchor its icon instead of relying on flex */
.form-error { position: relative; padding-left: 48px; }
.form-error::before { position: absolute; left: 16px; top: 14px; }

/* Checkbox block */
.check {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 56px;
  margin: 8px 0 24px;
  padding: 16px;
  border-radius: 18px;
  background: var(--sb);
  box-shadow: var(--inset);
  color: var(--si);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--si);
  flex-shrink: 0;
}

.check + .field-error { margin: -12px 0 20px; }
.form-error { margin-bottom: 24px; }

/* Actions */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.form-actions a {
  font-weight: 700;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

/* Danger Button */
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid var(--sbd);
  border-radius: var(--r-btn);
  background: var(--sb);
  color: var(--si);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 800;
  box-shadow: 5px 5px 12px var(--sd), -5px -5px 12px var(--sl);
  cursor: pointer;
  transition: box-shadow var(--press) ease, background-color var(--press) ease;
  touch-action: manipulation;
}
.danger-button:active,
.danger-button.is-pressed {
  box-shadow: var(--inset);
  background: var(--sb);
}
.danger-button:disabled {
  opacity: 0.55;
  cursor: progress;
  box-shadow: var(--inset);
}

/* State cards */
.form-card.state-card {
  text-align: left;
  padding-right: 140px;
  min-height: 200px;
}
@media (max-width: 600px) {
  .form-card.state-card {
    padding-right: 24px;
    padding-bottom: 120px;
  }
}
.state-card:focus { outline: none; }
.state-card svg {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  padding: 12px;
  border-radius: 14px;
  background: var(--gt);
  box-shadow: var(--inset);
  fill: none;
  stroke: var(--prt);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.state-card[data-confirm] svg {
  background: var(--sb);
  stroke: var(--si);
}
.state-card p { margin: 12px 0 0; color: var(--mut); max-width: 36em; }
.state-card .state-note { font-size: 0.9375rem; }
.state-card .form-actions { margin-top: 24px; }
.state-card .form-error { margin-top: 24px; }

.state-3d {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.22));
}

/* Aside */
.legal-aside { top: 92px; position: sticky; display: grid; gap: 16px; }
.info-card {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 26px;
  background: var(--bg);
  border: 1px solid var(--ed);
}
.info-card svg {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 14px;
  background: var(--in);
  box-shadow: var(--inset);
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-card strong { font-size: 1.0625rem; font-weight: 800; color: var(--ink); }
.info-card span { color: var(--mut); font-size: 0.9375rem; }

.aside-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 26px;
  background: var(--bg);
  border: 1px solid var(--ed);
  box-shadow: var(--raised-m);
  transition: box-shadow var(--press) ease, background-color var(--press) ease;
  touch-action: manipulation;
  color: var(--ink);
  padding-right: 80px;
}
.aside-card:active {
  box-shadow: var(--inset);
  background: var(--in);
}
.aside-card strong { font-size: 1.0625rem; font-weight: 800; color: var(--ink); }
.aside-card span { color: var(--mut); font-size: 0.9375rem; }
.aside-card:hover { text-decoration: none; }
.aside-3d {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.22));
}

/* Mobile responsive for aside and state cards */
@media (max-width: 600px) {
  .form-card { padding: 32px 24px; }
  .state-3d { width: 80px; height: 80px; }
}

/* Fade up reveal */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
.legal-hero, .delete-layout {
  animation: fadeUp 400ms var(--ease) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .legal-hero, .delete-layout, *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
