/* styles.css */

:root {
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --btn: #111827;
  --btnText: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: 16px;
}

header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
}

.nav a.active {
  border-color: var(--border);
  background: #fff;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
}

.label {
  display: block;
  font-weight: 600;
  margin: 12px 0 6px;
}

.input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  outline: none;
}

.input:focus {
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.grid2 {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 680px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

.note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: var(--btn);
  color: var(--btnText);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.msg {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* IMPORTANT: if hidden doesn't use display:none, it can block taps on iPhone */
.hidden { display: none !important; }

.dim { color: var(--muted); }
.muted { color: var(--muted); }

/* Teacher search dropdown */
.list {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  max-height: 260px;
  overflow-y: auto;

  /* Prevent it from covering the whole screen */
  position: relative;
  z-index: 10;
}

/* Each result row is a button */
.list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item:active {
  background: #f3f4f6;
}

/* Selected teacher display */
.picked {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fafafa;
  font-size: 14px;
}