/* /public/legal/terms/index.1386.css
   AnchorPay – Terms of Agreement
*/

:root {
  --ap-bg: #f3f4f6;
  --ap-surface: #ffffff;
  --ap-primary: #1f3a8a;
  --ap-primary-soft: rgba(31, 58, 138, 0.08);
  --ap-accent: #14b8a6;
  --ap-accent-soft: rgba(20, 184, 166, 0.12);
  --ap-warning: #f59e0b;
  --ap-border-subtle: #e5e7eb;
  --ap-text-main: #0b1021;
  --ap-text-muted: #6b7280;
  --ap-text-soft: #9ca3af;
  --ap-error: #dc2626;

  --ap-radius-lg: 24px;
  --ap-radius-md: 18px;
  --ap-radius-pill: 999px;

  --ap-shadow-card: 0 12px 35px rgba(15, 23, 42, 0.08);
  --ap-shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
  --ap-focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.6);

  --ap-font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", sans-serif;

  --ap-maxw: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ap-font-sans);
  color: var(--ap-text-main);
  background: radial-gradient(circle at top, #e5edff 0, #f3f4f6 46%, #e5e7eb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Focus */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--ap-focus-ring);
  border-radius: 10px;
}

/* Header */
.terms-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 10px;
  position: relative;
}

.terms-logo {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  color: var(--ap-text-main);
  user-select: none;
}

.terms-logo span {
  color: var(--ap-accent);
}

.terms-back-link {
  position: absolute;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: var(--ap-radius-pill);
  color: var(--ap-text-muted);
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.terms-back-link .icon {
  font-size: 1.05rem;
  line-height: 1;
}

.terms-back-link:hover {
  background-color: var(--ap-primary-soft);
  color: var(--ap-primary);
  transform: translateY(-1px);
}

/* Layout */
.terms-main {
  min-height: calc(100vh - 74px);
  display: flex;
  justify-content: center;
  padding: 10px 16px 28px;
}

.terms-card {
  width: 100%;
  max-width: var(--ap-maxw);
  background: var(--ap-surface);
  border-radius: var(--ap-radius-lg);
  box-shadow: var(--ap-shadow-card);
  padding: 26px 22px 18px;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.7);
}

/* Top */
.terms-top {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

.terms-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: left;
}

.terms-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 12px;
}

.terms-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--ap-radius-pill);
  font-size: 0.9rem;
  color: var(--ap-text-main);
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.terms-pill-muted {
  color: var(--ap-text-muted);
  background: #f8fafc;
  box-shadow: none;
}

.terms-intro {
  margin: 10px 0 0;
  color: var(--ap-text-muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

/* Callouts */
.terms-callout {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  background: linear-gradient(180deg, rgba(20, 184, 166, 0.12), rgba(20, 184, 166, 0.06));
  padding: 12px 14px;
}

.terms-callout-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.terms-callout-body {
  color: var(--ap-text-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.terms-callout-danger {
  border: 1px solid rgba(220, 38, 38, 0.22);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.06));
}

/* TOC */
.terms-toc {
  margin: 18px 0 10px;
  padding: 14px 14px;
  border-radius: var(--ap-radius-md);
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  box-shadow: var(--ap-shadow-soft);
}

.terms-toc-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.terms-toc-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.terms-toc-list a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.terms-toc-list a:hover {
  text-decoration: underline;
}

/* Sections */
.terms-section {
  padding: 16px 2px;
  border-top: 1px solid rgba(229, 231, 235, 0.7);
}

.terms-section:first-of-type {
  border-top: none;
}

.terms-section h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.terms-section h3 {
  margin: 14px 0 8px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--ap-text-main);
}

.terms-section p {
  margin: 0 0 10px;
  color: var(--ap-text-muted);
  line-height: 1.65;
  font-size: 0.98rem;
}

.terms-section ul {
  margin: 8px 0 12px;
  padding-left: 18px;
  color: var(--ap-text-muted);
  line-height: 1.65;
}

.terms-section li {
  margin: 6px 0;
}

.terms-section ul ul {
  margin-top: 6px;
  margin-bottom: 6px;
}

/* Links inside content */
.terms-card a {
  color: #2563eb;
}

.terms-card a:hover {
  text-decoration: underline;
}

/* Footer */
.terms-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(229, 231, 235, 0.7);
  margin-top: 8px;
}

.terms-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--ap-text-muted);
  font-size: 0.92rem;
}

.terms-footer-muted {
  font-weight: 700;
  color: var(--ap-text-main);
}

.terms-footer-dot {
  opacity: 0.5;
}

.terms-footer-link {
  text-decoration: none;
  font-weight: 600;
}

.terms-footer-link:hover {
  text-decoration: underline;
}

/* Better anchor jumps (sticky-ish header offset feel) */
:target {
  scroll-margin-top: 90px;
}

/* Responsive */
@media (min-width: 900px) {
  .terms-card {
    padding: 30px 30px 20px;
  }

  .terms-title {
    font-size: 1.55rem;
  }

  .terms-toc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }
}

@media (max-width: 520px) {
  .terms-card {
    padding: 22px 16px 16px;
    border-radius: 18px;
  }

  .terms-title {
    font-size: 1.2rem;
  }

  .terms-back-link {
    left: 10px;
    padding: 6px 10px;
  }
}

/* Print */
@media print {
  body {
    background: #fff;
  }
  .terms-header,
  .terms-toc {
    display: none !important;
  }
  .terms-card {
    box-shadow: none;
    border: none;
    padding: 0;
    max-width: 100%;
  }
  .terms-section {
    border-top: 1px solid #ddd;
  }
}
