/* =========================================================================
   Shared form styles — membership, Book of Remembrance, New Year's Greetings
   Extracted from the patterns already used in dinner-reservation.html and
   journal.html so the three High Holy Day forms stay visually consistent
   without each page carrying its own copy.
   ========================================================================= */

.as-form { max-width: 760px; margin: 0 auto; }

.as-section { margin-bottom: 30px; }
.as-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
  margin-bottom: 16px;
  font-weight: 600;
}
.as-section .as-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ----- Text fields ----- */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.field-row.full { grid-template-columns: 1fr; }
.field-row.thirds { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 620px) {
  .field-row, .field-row.thirds { grid-template-columns: 1fr; }
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--cream);
  color: var(--text);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-color: var(--gold); background: var(--white); }
.field.has-error input,
.field.has-error textarea { border-color: #c0392b; }
.field .error-msg { display: none; color: #c0392b; font-size: 12px; margin-top: 3px; }
.field.has-error .error-msg { display: block; }

/* ----- Selectable option cards (membership categories, etc.) ----- */
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 780px) { .opt-grid { grid-template-columns: 1fr; } }

.opt-group {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}
.opt-group h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 2px;
}
.opt-group .opt-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}
.opt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.opt-card:last-child { margin-bottom: 0; }
.opt-card:hover { border-color: var(--gold); }
.opt-card.selected { border-color: var(--navy); background: #eef6f0; }
.opt-card input[type="radio"] { width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.opt-card .opt-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--navy); }
.opt-card .opt-price { font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ----- Line-item rows with a quantity or amount box ----- */
.li-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.li-row .li-name { flex: 1; font-size: 14px; color: var(--navy); font-weight: 600; }
.li-row .li-name small { display: block; font-weight: 400; color: var(--text-muted); font-size: 12px; }
.li-row .li-rate { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.li-row input[type="number"] {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  text-align: right;
  font-family: inherit;
  background: var(--white);
}
.li-row .li-amount {
  width: 90px;
  text-align: right;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.li-row.required-row { background: #fdf8e8; border-color: var(--gold); }

/* ----- Repeatable rows (yahrzeits, memorial names, greeting names) ----- */
.rep-row { display: grid; gap: 10px; margin-bottom: 10px; align-items: end; }
.rep-row.pair    { grid-template-columns: 1fr 1fr; }
.rep-row.triple  { grid-template-columns: 1fr 1fr 1fr; }
.rep-row.single  { grid-template-columns: 1fr; }
@media (max-width: 620px) {
  .rep-row.pair, .rep-row.triple { grid-template-columns: 1fr; }
}
.add-row-btn {
  background: none;
  border: 1px dashed var(--gold);
  color: var(--navy);
  border-radius: 6px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.add-row-btn:hover { background: var(--cream); }
.add-row-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rep-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ----- Deadline banner ----- */
.deadline-bar {
  background: #fdf8e8;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 26px;
  font-size: 15px;
  color: var(--navy);
}
.deadline-bar strong { color: #c0392b; }

/* ----- Payment method chooser ----- */
.pay-options { display: flex; gap: 14px; margin-bottom: 4px; }
@media (max-width: 620px) { .pay-options { flex-direction: column; } }
.pay-card {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.pay-card:hover { border-color: var(--gold); }
.pay-card.selected { border-color: var(--navy); background: #eef6f0; }
.pay-card input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.pay-card .pay-title { font-weight: 600; color: var(--navy); }
.pay-card .pay-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.pay-info {
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 14px;
  margin-top: 12px;
  display: none;
  line-height: 1.7;
}
.pay-info.visible { display: block; }
.pay-info.check { background: #fdf8e8; border: 1px solid var(--gold); }
.pay-info.online { background: #eef6f0; border: 1px solid var(--navy); }

/* ----- Optional processing-fee contribution ----- */
.fee-opt { margin-top: 14px; }
.fee-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  cursor: pointer;
  font-size: 14px;
  color: var(--navy);
  line-height: 1.5;
  transition: all 0.2s;
}
.fee-check:hover { border-color: var(--gold); }
.fee-check.checked { border-color: var(--navy); background: #eef6f0; }
.fee-check input { width: 18px; height: 18px; accent-color: var(--navy); flex: none; margin-top: 2px; }
.fee-check.hidden { display: none; }

.fee-rows { margin-top: 14px; display: none; }
.fee-rows.visible { display: block; }
.fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 8px;
}
.fee-row span:last-child { font-weight: 600; color: var(--navy); }

/* ----- Total + submit ----- */
.total-bar {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: var(--white);
  padding: 18px 24px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 20px;
}
.total-bar .t-label { font-size: 17px; }
.total-bar .t-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--gold-light);
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #b8943f);
  color: var(--navy);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-error {
  display: none;
  margin-top: 14px;
  color: #c0392b;
  font-weight: 600;
  font-size: 14px;
}

.check-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.7;
}
