/* activity/assets/sangam.css
   Sangam sub-module — only the bits the shared editorial theme doesn't already
   provide. The hub and section boards render on media_hub.css +
   editorial_shell.css + member_directory_editorial.css + event_gallery_editorial.css
   (same stack as search.php / members.php); the item and action pages render on
   media_hub.css + editorial_shell.css. Everything below is prefixed .sangam-* and
   scoped under .eg-page so it can't leak. */

/* ---- Flash notice ---------------------------------------------------- */
.eg-page .sangam-flash {
  padding: 15px 18px;
  border: 1px solid var(--eg-line);
  border-radius: 12px;
  background: var(--eg-cream);
  color: var(--eg-ink);
  font-size: 14px;
}
.eg-page .sangam-flash.is-success { border-color: #7eb06d; background: #eef8e8; }
.eg-page .sangam-flash.is-error { border-color: #d28a8a; background: #fff0f0; }
.md-page .sangam-flash { margin: clamp(20px, 3vw, 28px) var(--eg-gutter) 0; }
.sangam-detail .sangam-flash { margin: 24px 0 0; }

/* ---- Section tab strip (hub + boards) ------------------------------- */
.eg-page .sangam-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 26px) var(--eg-gutter);
  background: var(--eg-cream);
  border-bottom: 1px solid var(--eg-line);
}
.eg-page .sangam-tab {
  padding: 9px 15px;
  border: 1px solid var(--eg-line);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--eg-ink);
  font: 700 13px var(--eg-sans);
  text-decoration: none;
}
.eg-page .sangam-tab:hover { border-color: var(--eg-wine); text-decoration: none; }
.eg-page .sangam-tab.is-active { background: var(--eg-wine); border-color: var(--eg-wine); color: #fff; }

/* ---- Board tools + composer --------------------------------------- */
.eg-page .sangam-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
}
.eg-page .sangam-tools .mh-input { min-width: min(280px, 100%); }

.sangam-compose-open { overflow: hidden; }
.eg-page .sangam-compose-modal {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}
.eg-page .sangam-compose-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(25, 7, 10, .68);
  backdrop-filter: blur(5px);
  cursor: default;
}
.eg-page .sangam-compose {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  margin: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(112, 54, 46, .22);
  border-radius: 24px;
  background: #fffaf3;
  box-shadow: 0 34px 90px rgba(18, 4, 7, .38);
  animation: sangam-compose-enter .2s ease-out both;
}
.eg-page .sangam-compose__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--eg-line);
}
.eg-page .sangam-compose h2 {
  margin: 8px 0 6px;
  font: 600 clamp(28px, 4vw, 40px)/1.05 var(--eg-serif);
  letter-spacing: -.02em;
}
.eg-page .sangam-compose__head p { max-width: 650px; margin: 0; color: var(--eg-muted); line-height: 1.55; }
.eg-page .sangam-compose__close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--eg-line);
  border-radius: 50%;
  background: transparent;
  color: var(--eg-ink);
  font: 400 27px/1 var(--eg-sans);
  cursor: pointer;
}
.eg-page .sangam-compose__close:hover { border-color: var(--eg-wine); background: #fff; }
.eg-page .sangam-compose .sangam-flash { margin: 18px 0 0; }
.eg-page .sangam-compose form { margin-top: 22px; }

.eg-page .sangam-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.eg-page .sangam-form label {
  display: grid;
  gap: 6px;
  font: 700 11px var(--eg-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--eg-muted);
}
.eg-page .sangam-form .field-wide { grid-column: 1 / -1; }
.eg-page .sangam-form input,
.eg-page .sangam-form textarea {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--eg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--eg-ink);
  font: 400 14px var(--eg-sans);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.eg-page .sangam-form input:focus,
.eg-page .sangam-form textarea:focus { border-color: var(--eg-wine); box-shadow: 0 0 0 4px rgba(101,27,37,.12); }
.eg-page .sangam-form textarea { min-height: 120px; resize: vertical; }
.eg-page .sangam-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
}
.eg-page .sangam-compose__note { margin-right: auto; color: var(--eg-muted); font-size: 12px; }
@keyframes sangam-compose-enter {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* ---- Item / action detail page ----------------------------------- */
.eg-page .sangam-panel {
  margin: clamp(26px, 4vw, 44px) 0;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--eg-line);
  border-radius: 24px;
  background: var(--eg-paper);
  box-shadow: var(--mh-shadow);
}
.eg-page .sangam-panel .mh-eyebrow {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--eg-wine);
  font: 700 11px var(--eg-sans);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eg-page .sangam-panel h1 {
  margin: 12px 0 14px;
  font: 600 clamp(30px, 4.5vw, 46px)/1.06 var(--eg-serif);
  letter-spacing: -.025em;
}
.eg-page .sangam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--eg-muted);
  font-size: 13px;
}
.eg-page .sangam-prose {
  margin: 18px 0 0;
  color: var(--eg-ink);
  line-height: 1.8;
  white-space: pre-line;
}
.eg-page .sangam-lead { margin: 12px 0 0; color: var(--eg-muted); font-size: 15px; }
.eg-page .sangam-lead strong { color: var(--eg-ink); }
.eg-page .sangam-panel .mh-actions { margin-top: 20px; }
.eg-page.sangam-detail .mh-btn.primary {
  background: var(--eg-wine);
  border-color: var(--eg-wine);
  color: #fff;
}

.eg-page .sangam-action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.eg-page .sangam-action-form .field-wide { grid-column: 1 / -1; }
.eg-page .sangam-action-form label {
  display: grid;
  gap: 6px;
  font: 700 11px var(--eg-sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--eg-muted);
}
.eg-page .sangam-action-form input,
.eg-page .sangam-action-form textarea {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--eg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--eg-ink);
  font: 400 14px var(--eg-sans);
}
.eg-page .sangam-action-form textarea { min-height: 110px; resize: vertical; }

/* ---- Section live-status badge (hub grid cards) ---------------------- */
.sangam-hub .md-card__meta .sangam-live-badge {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 800;
}
.sangam-hub .md-card__meta .sangam-live-badge.is-live {
  border-color: #2f7d4f;
  background: #e6f6ec;
  color: #1f7a43;
}

/* ---- Composer / filter toggles ---------------------------------- */
.eg-page .sangam-compose-modal[hidden] { display: none !important; }
.eg-page .sangam-grid .md-card[hidden] { display: none !important; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 760px) {
  .eg-page .sangam-compose-modal { align-items: end; padding: 10px; }
  .eg-page .sangam-compose { width: 100%; max-height: calc(100dvh - 20px); padding: 22px 18px; border-radius: 22px; }
  .eg-page .sangam-compose__head { gap: 14px; }
  .eg-page .sangam-form { grid-template-columns: 1fr; }
  .eg-page .sangam-action-form { grid-template-columns: 1fr; }
  .eg-page .sangam-form-actions { align-items: stretch; }
  .eg-page .sangam-compose__note { width: 100%; margin: 0 0 4px; }
  .eg-page .sangam-form-actions .mh-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .eg-page .sangam-compose { animation: none; }
}
