/* ============================================================
   LIKHAN BHAGTI SAMGAM — Page Styles
   ============================================================ */

/* ── Intro / Event Info ── */
.lb-intro { padding-top: var(--space-12); }

.lb-shabad {
  border-left: 4px solid var(--saffron);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-12);
  background: var(--navy-mid);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--off-white);
}
.lb-shabad cite {
  display: block;
  margin-top: var(--space-3);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--saffron);
  font-weight: 600;
}

.lb-event-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.lb-detail-card {
  background: var(--navy-mid);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.lb-detail-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
  font-weight: 600;
}
.lb-detail-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--off-white);
}

.lb-section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--off-white);
  margin-bottom: var(--space-6);
  margin-top: var(--space-12);
}

/* ── Age Group Table ── */
.lb-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-12);
  border-radius: var(--radius-lg);
  border: 1px solid var(--navy-light);
}
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}
.lb-table th {
  background: var(--navy-light);
  color: var(--saffron);
  font-weight: 700;
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lb-table td {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--navy-light);
  color: var(--off-white);
}
.lb-table tr:nth-child(odd) td { background: var(--navy-mid); }
.lb-table tr:nth-child(even) td { background: var(--navy); }
.lb-note {
  font-size: var(--text-xs);
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* ── Instructions List ── */
.lb-instructions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-16);
}
.lb-instructions li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  font-size: var(--text-base);
  line-height: 1.7;
}
.lb-instructions li::before {
  content: '✦';
  color: var(--saffron);
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 0.9em;
}
.lb-inline-link {
  color: var(--saffron);
  text-decoration: underline;
}

/* ── Form Section ── */
.lb-form-section {
  background: var(--navy-mid);
  padding: var(--space-16) 0;
  position: relative;
}


/* ── Form ── */
.lb-form-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--off-white);
  margin-bottom: var(--space-2);
}
.lb-form-subtitle {
  color: var(--muted);
  margin-bottom: var(--space-8);
  font-size: var(--text-base);
}
.lb-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.lb-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Parent field: hidden by default, JS removes [hidden] when age ≤ 18 */
#lb-parent-field { display: none; }
#lb-parent-field:not([hidden]) { display: flex; }
.lb-field label {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--off-white);
}
.lb-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: var(--text-xs);
}
.lb-field-hint {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.lb-field input,
.lb-field select,
.lb-field textarea {
  background: var(--navy);
  border: 2px solid var(--navy-light);
  border-radius: var(--radius);
  color: var(--off-white);
  font-family: inherit;
  font-size: var(--text-base);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition);
  width: 100%;
}
.lb-field input::placeholder,
.lb-field textarea::placeholder { color: var(--muted); }
.lb-field input:focus,
.lb-field select:focus,
.lb-field textarea:focus {
  outline: none;
  border-color: var(--saffron);
}
.lb-field select { cursor: pointer; }
.lb-field select option { background: var(--navy); color: var(--off-white); }
.lb-field textarea { resize: vertical; min-height: 90px; }

.lb-field-error {
  color: var(--error);
  font-size: var(--text-xs);
  min-height: 1.2em;
}
.lb-field input.invalid,
.lb-field select.invalid { border-color: var(--error); }

/* ── Checkbox ── */
.lb-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-base);
  color: var(--off-white);
  line-height: 1.6;
}
.lb-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--saffron);
  cursor: pointer;
}
.lb-agree-label { font-weight: 600; }
.lb-agreement {
  background: rgba(255,153,51,0.07);
  border: 1px solid rgba(255,153,51,0.2);
  border-radius: var(--radius);
  padding: var(--space-4);
}

/* ── Numbered instructions ── */
.lb-instructions--numbered {
  list-style: decimal;
  padding-left: var(--space-6);
}
.lb-instructions--numbered li { display: list-item; padding-left: var(--space-2); }
.lb-instructions--numbered li::before { display: none; }

.lb-submit-row {
  padding-top: var(--space-2);
}
.lb-submit-btn {
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-12);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 200px;
  justify-content: center;
}
.lb-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Spinner ── */
.lb-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* ── Success / Error states ── */
.lb-success {
  background: rgba(72, 187, 120, 0.12);
  border: 2px solid var(--success);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.lb-success:not([hidden]) {
  display: flex;
}
.lb-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--success);
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-success-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--success);
}
.lb-error-msg {
  color: var(--error);
  font-size: var(--text-sm);
  background: rgba(252, 129, 129, 0.1);
  border: 1px solid var(--error);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}

/* ── City autocomplete ── */
.lb-city-wrap { position: relative; }
.lb-city-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy-mid);
  border: 1px solid var(--saffron);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}
.lb-city-dropdown li {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--off-white);
  cursor: pointer;
  border-top: 1px solid var(--navy-light);
}
.lb-city-dropdown li:first-child { border-top: none; }
.lb-city-dropdown li:hover { background: rgba(255,153,51,0.1); color: var(--saffron); }

/* ── Two-col row ── */
.lb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* ── Section dividers ── */
.lb-section-divider {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--saffron);
  border-bottom: 1px solid var(--navy-light);
  padding-bottom: var(--space-2);
  margin-top: var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}
.lb-section-hint {
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

/* ── Duplicate warning ── */
#lb-phone-dup { display: none; }
#lb-phone-dup:not([hidden]) { display: block; }
.lb-duplicate-warn {
  font-size: var(--text-sm);
  color: var(--saffron);
  background: rgba(255,153,51,0.1);
  border: 1px solid rgba(255,153,51,0.3);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}

/* ── Add member button ── */
.lb-add-member-btn {
  background: transparent;
  border: 2px dashed var(--navy-light);
  color: var(--saffron);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}
.lb-add-member-btn:hover {
  border-color: var(--saffron);
  background: rgba(255,153,51,0.05);
}

/* ── Member cards ── */
.lb-member-card {
  background: var(--navy);
  border: 1px solid var(--navy-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.lb-member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--saffron);
}
.lb-member-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: var(--space-1);
  line-height: 1;
}
.lb-member-remove:hover { color: var(--error); }
.lb-member-autotext {
  font-size: var(--text-sm);
  color: var(--saffron);
  font-weight: 600;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .lb-shabad { padding: var(--space-4) var(--space-5); font-size: var(--text-base); }
  .lb-table th, .lb-table td { padding: var(--space-3) var(--space-4); font-size: var(--text-sm); }
  .lb-submit-btn { width: 100%; }
  .lb-row { grid-template-columns: 1fr; }
}
