/*
 * H2O Nail & Wax Studio — Shared Forms Stylesheet
 * File: /hr/forms/public/h2o-forms.css
 * Version: v2026.05.11.1
 * Usage: <link rel="stylesheet" href="h2o-forms.css?v=20260511">
 */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #f7f4ef;
  --bg-soft:     #faf8f4;
  --card:        #ffffff;
  --text:        #111110;
  --muted:       #7a776f;
  --muted-lt:    #b0ada6;
  --line:        #e8e2d9;
  --line-strong: rgba(17,17,16,0.18);
  --gold:        #8f7f54;
  --gold-lt:     #f2ece0;
  --danger:      #b42318;
  --danger-lt:   #fef2f2;
  --green:       #1a7f4b;
  --green-lt:    #e6f4ed;
  --white:       #ffffff;
  --shadow:      0 2px 12px rgba(17,17,16,0.06);
  --shadow-lg:   0 12px 48px rgba(17,17,16,0.10);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  background: var(--bg);
  color: var(--text);
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.wrap {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

/* ─── PAGE HEADER ────────────────────────────────────────── */
.form-header {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--text);
  padding: 28px 32px;
  margin-bottom: 2px;
}

.form-header img {
  height: 48px;
  width: auto;
  margin-bottom: 20px;
}

.form-header h1 {
  font-family: 'Jost', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  margin: 0 0 8px;
}

.form-header p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
  margin: 0;
  max-width: 560px;
  line-height: 1.7;
}

/* ─── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 28px 32px;
  margin-bottom: 2px;
}

.card:last-of-type { margin-bottom: 0; }

/* ─── SECTION HEADINGS ───────────────────────────────────── */
.card h2 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* ─── FORM GRID ──────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.full { grid-column: 1 / -1; }

/* ─── LABELS ─────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ─── INPUTS ─────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 14px;
  color: var(--text);
  background: var(--white);
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 300;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--text);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a776f' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.6;
}

.required { color: var(--danger); }

/* ─── NOTICE / CALLOUT ───────────────────────────────────── */
.notice {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  font-size: 0.84rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ─── CHECKBOX ROWS ──────────────────────────────────────── */
.choice {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.choice:last-child { border-bottom: none; }

.choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  accent-color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.choice label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.6;
  cursor: pointer;
}

/* ─── SIGNATURE ──────────────────────────────────────────── */
.signature-box {
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--white);
}

.signature-box canvas {
  width: 100%;
  height: 180px;
  display: block;
  background: var(--white);
  touch-action: none;
  cursor: crosshair;
}

.sig-actions {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sig-hint {
  font-size: 0.70rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-lt);
}

/* ─── BUTTONS ────────────────────────────────────────────── */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}
.btn-primary:hover {
  background: #333;
  border-color: #333;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 24px 0 0;
}

/* ─── SUCCESS MODAL ──────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,16,0.55);
  backdrop-filter: blur(3px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.show { display: flex; }

.modal {
  width: min(420px, 100%);
  background: var(--white);
  border: 1px solid var(--line-strong);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.4rem;
}

.modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.modal p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
  margin: 0 0 24px;
  line-height: 1.7;
}

/* ─── SUCCESS PAGE ───────────────────────────────────────── */
.success-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.success-card {
  width: min(480px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  padding: 40px 36px;
  text-align: center;
}

.success-card img {
  height: 44px;
  width: auto;
  margin: 0 auto 28px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
}

.success-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.success-card p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.7;
  margin: 0 0 28px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .wrap { padding: 20px 0 40px; }

  .form-header,
  .card { padding: 20px; }

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

  .actions { flex-direction: column; }
  .actions button { width: 100%; justify-content: center; }

  .form-header h1 { font-size: 1.3rem; }
}
