/* =========================
   GLOBAL
   ========================= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #ffffff;
  margin: 0;
  padding: 0;
  color: #1f2937;
}

/* =========================
   FORM SECTION (Claim a Mesachta)
   ========================= */
#signup-section {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;

  max-width: 720px;
  margin: 40px auto;
  padding: 24px;
  background: #eef4ff;
  border-radius: 12px;

  /* CRITICAL: allow native select dropdown */
  overflow: visible;
}

/* HARD ISOLATION — PREVENTS RTL BLEED */
#signup-section * {
  unicode-bidi: isolate;
}

#signup-section h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2563eb;
}

/* =========================
   FORM ELEMENTS
   ========================= */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-sizing: border-box;
}

/* =========================
   INPUT / SELECT PADDING
   ========================= */
input {
  padding: 10px 44px 10px 12px; /* space for native icons */
}

select {
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  z-index: 1; /* ensures dropdown renders above button */
}

/* =========================
   SUBMIT BUTTON
   ========================= */
button[type="submit"] {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #1d4ed8;
}

/* =========================
   MESACHTA GRID
   ========================= */
#mesachta-grid {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.seder-block {
  margin-bottom: 30px;
}

.seder-block h3 {
  margin-bottom: 12px;
  color: #1e3a8a;
}

.mesachta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mesachta-card {
  position: relative;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
}

.mesachta-card:hover {
  background: #f1f5f9;
}

.mesachta-card.selected {
  outline: 2px solid #2563eb;
}

.mesachta-card.taken {
  opacity: 0.55;
  cursor: not-allowed;
}

.mesachta-name {
  font-size: 15px;
  font-weight: 500;
}

/* =========================
   TAKEN BADGE
   ========================= */
.taken-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 999px;
  display: none;
}

.mesachta-card.taken .taken-badge {
  display: inline-block;
}

/* =========================
   TAKEN SECTION
   ========================= */
#taken-section {
  max-width: 720px;
  margin: 40px auto 80px;
  padding: 24px;
  background: #f1f5ff;
  border-radius: 12px;
  text-align: center;
}

#taken-section h2 {
  margin-bottom: 12px;
  color: #2563eb;
}

#taken-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#taken-list li {
  padding: 6px 0;
  font-size: 15px;
  color: #374151;
}
