/* Phase 4c — Custom APA / Custom Harvard configuration popup.
 *
 * Scoped .zcst-* prefix, export-safe. Lives in static/css/ (NOT scanned by
 * Tailwind), so brand CSS variables (--navy, --paper, …) defined globally in
 * tailwind.css can be referenced freely without tree-shaking risk. Driven by
 * static/js/custom-style-popup.js, which toggles `.is-visible` + the `hidden`
 * attribute on #zcst-modal. */

.zcst-edit-link {
  margin-top: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy, #1e2a4a);
  text-decoration: underline;
  cursor: pointer;
}
.zcst-edit-link:hover { opacity: 0.8; }

.zcst-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
}
.zcst-modal.is-visible { display: flex; }

.zcst-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper, #fff);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.zcst-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy, #1e2a4a);
}
.zcst-sub {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #475569;
}

.zcst-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.1rem;
}
@media (max-width: 520px) {
  .zcst-grid { grid-template-columns: 1fr; }
}

.zcst-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.zcst-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}
.zcst-input,
.zcst-select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: #0f172a;
}
.zcst-input:focus,
.zcst-select:focus {
  outline: none;
  border-color: var(--navy, #1e2a4a);
  box-shadow: 0 0 0 3px rgba(30, 42, 74, 0.15);
}

.zcst-error {
  margin: 1rem 0 0;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.85rem;
}

.zcst-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.zcst-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.zcst-btn--ghost {
  background: transparent;
  border-color: #cbd5e1;
  color: #334155;
}
.zcst-btn--ghost:hover { background: #f1f5f9; }
.zcst-btn--primary {
  background: var(--navy, #1e2a4a);
  color: #fff;
}
.zcst-btn--primary:hover { opacity: 0.9; }
