@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e5e5e5;
  --accent: #0000ee;
  --accent-tint: #eef0ff;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", sans-serif;
  line-height: 1.6em;
}

.card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info { text-align: center; }

.avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

h1 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
h2 { font-size: 20px; font-weight: 800; margin: 12px 0 4px; }

.meta { margin: 0; color: var(--muted); font-size: 14px; }
.hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }

.hidden { display: none !important; }

.picker, .form, .confirm {
  animation: fade-in .18s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- calendar --- */
.calendar { display: flex; flex-direction: column; gap: 8px; }

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-month { font-weight: 700; font-size: 14px; }

.cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: background .12s ease;
}

.cal-nav:hover:not(:disabled) { background: var(--accent-tint); }
.cal-nav:disabled { color: var(--line); cursor: default; }

.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.cal-day:hover:not(:disabled) { background: var(--accent-tint); }
.cal-day.selected { background: var(--accent); color: #fff; }
.cal-day.today:not(.selected) { font-weight: 700; }
.cal-day:disabled { color: var(--line); cursor: default; }
.cal-day.empty { visibility: hidden; }

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 44px;
}

.placeholder { grid-column: 1 / -1; color: var(--muted); font-size: 14px; margin: 8px 0; }

.slot-btn {
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: background .12s ease, border-color .12s ease;
}

.slot-btn:hover { background: var(--accent-tint); border-color: var(--accent); }

.tz-note { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

.form, .confirm { display: flex; flex-direction: column; gap: 14px; }

.back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 0;
}

.back:hover { text-decoration: underline; }

.chosen { font-weight: 700; margin: 0; }

form { display: flex; flex-direction: column; gap: 14px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

.optional { font-weight: 400; font-style: italic; }

input, textarea {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

input:focus, textarea:focus { outline: none; border-color: var(--accent); }

button[type="submit"], .secondary {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background .12s ease;
}

button[type="submit"] { background: var(--accent); color: #fff; }
button[type="submit"]:hover { background: #0000c4; }
button[type="submit"]:disabled { opacity: .6; cursor: default; }

.secondary { background: #fff; color: var(--text); border-color: var(--line); }
.secondary:hover { background: var(--accent-tint); }

.error { color: var(--danger); font-size: 13px; margin: 0; }

.confirm { text-align: center; align-items: center; }

.check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.meet-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: background .12s ease;
}

.meet-link:hover { background: #0000c4; }
