/* legal.css - used by privacy-policy.html and terms-of-service.html */

:root {

  --green-primary: #1A7A4C;
  --green-light:   #E8F5EF;
  --cream:         #FAFAF8;
  --ink:           #0F1C1A;
  --ink-2:         #2D3B38;
  --muted:         #8A9590;
  --border:        #E4EAE8;
  --white:         #FFFFFF;

  --radius-md: 16px;
}

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

body, html {
  height: 100%; width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0d1410;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.app-frame {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

.main-content {
  flex: 1;
  min-height: 0;              /* required for flex children to scroll */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 20px;
  /* top inset comes from base.css */
}

/* Legal pages have no bottom nav; use the standard 15px bottom padding
   so they match every other page, plus an extra 20px breathing room.
   The safe-area inset is already handled by the viewport-fit=cover meta tag. */
body .app-frame > .main-content {
  padding-bottom: 35px;
}

/* Back button */
.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-size: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.back-btn:active {
  background: #E8F5EF; /* light green highlight */
}

/* Page title */
h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Legal content */
.legal-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--ink);
}

.legal-content p {
  margin-bottom: 12px;
}

.legal-content a {
  color: var(--green-primary);
  text-decoration: underline;
}

/* -- Contact trigger button -- */
.contact-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26,122,76,0.28);
  transition: opacity 0.15s, transform 0.15s;
}
.contact-trigger i { font-size: 17px; }
.contact-trigger:active { opacity: 0.88; transform: scale(0.98); }

/* -- Contact / support choice bottom sheet (chat theme) -- */
.support-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 70;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.support-backdrop.show { opacity: 1; }

.support-sheet {
  position: fixed; bottom: 0; left: 50%;
  transform: translate(-50%, 100%);
  width: 100%; max-width: 430px;
  background: var(--white, #fff);
  border-radius: 22px 22px 0 0;
  padding: 16px 20px calc(16px + var(--safe-area-bottom));
  z-index: 80;
  max-height: calc(100dvh - var(--safe-area-top) - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  transition:
    transform 0.28s cubic-bezier(.22,1,.36,1),
    visibility 0s linear 0.28s;
}
.support-sheet.show {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 0.28s cubic-bezier(.22,1,.36,1);
}
.support-handle {
  width: 36px; height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin: 0 auto 14px;
}
.support-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.support-sheet-title i { color: var(--green-primary); font-size: 20px; }
.support-sheet-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Choice rows */
.support-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
}
.support-option:active { opacity: 0.9; transform: scale(0.99); }
.support-option-primary { background: var(--green-light, #E8F5EF); border-color: transparent; }
.support-option-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white, #fff);
  color: var(--green-primary);
  font-size: 18px;
}
.support-option-primary .support-option-icon { background: var(--green-primary); color: #fff; }
.support-option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.support-option-text strong { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.support-option-text small { font-size: 12px; color: var(--muted); font-weight: 500; }
.support-option > i:last-child { color: var(--muted); font-size: 15px; }
.support-option-email .support-option-icon { color: var(--ink-2); }

.support-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 4px 0 10px;
}
.support-divider::before,
.support-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.support-cancel {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
