/* Event detail — collapsible sections (orange fold triggers) */

.ev-detail-desc {
  margin-bottom: 14px;
}

.ev-detail-desc-inner {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border-radius: 14px;
  padding: 14px 16px 16px;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.05),
    0 6px 18px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.ev-detail-desc-inner::before {
  content: '\201C';
  position: absolute;
  top: 6px;
  right: 14px;
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  color: rgba(46, 125, 50, 0.08);
  pointer-events: none;
  font-family: Georgia, 'Times New Roman', serif;
}

.ev-detail-desc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ev-detail-desc-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  flex-shrink: 0;
}

.ev-detail-desc-icon .ti {
  font-size: 16px;
}

.ev-detail-desc-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ev-detail-desc-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
}

.ev-detail-desc-status {
  font-size: 11px;
  font-weight: 600;
  color: #2e7d32;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ev-detail-desc-status:not(:empty) {
  opacity: 1;
}

.ev-detail-desc-input {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 0;
  border: none;
  background: transparent;
  resize: vertical;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #1e293b;
  field-sizing: content;
}

.ev-detail-desc-input:focus {
  outline: none;
}

.ev-detail-desc-input::placeholder {
  color: #94a3b8;
  font-style: italic;
  font-weight: 500;
}

.ev-detail-desc--empty .ev-detail-desc-input {
  min-height: 56px;
}

.ev-detail-desc-body {
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
}

.ev-detail-desc-placeholder {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #94a3b8;
  font-style: italic;
  font-weight: 500;
}

.ev-detail-desc--readonly .ev-detail-desc-inner {
  border-left: 3px solid rgba(46, 125, 50, 0.35);
}

.ev-detail-desc--edit .ev-detail-desc-inner {
  border-left: 3px solid var(--pg, #2e7d32);
}

.ev-detail-fold {
  margin-bottom: 10px;
}

.ev-detail-fold-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
  box-shadow:
    0 1px 4px rgba(30, 58, 138, 0.08),
    inset 0 0 0 1px rgba(30, 58, 138, 0.08);
  cursor: pointer;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  transition: box-shadow 0.2s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ev-detail-fold-trigger:hover {
  box-shadow:
    0 3px 12px rgba(30, 58, 138, 0.1),
    inset 0 0 0 1px rgba(30, 58, 138, 0.12);
}

.ev-detail-fold-trigger.is-open {
  box-shadow:
    0 3px 14px rgba(30, 58, 138, 0.14),
    inset 0 0 0 1px rgba(249, 168, 37, 0.4);
}

.ev-detail-fold-trigger:focus-visible {
  outline: 2px solid var(--py);
  outline-offset: 2px;
}

.ev-detail-fold-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ev-detail-fold-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--pn);
  line-height: 1.2;
}

.ev-detail-fold-hint {
  font-size: 11px;
  font-weight: 500;
  color: #90A4AE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-detail-fold-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #f9a825 0%, #ff6d00 55%, #e65100 100%);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow:
    0 4px 12px rgba(230, 81, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, background 0.2s ease;
}

.ev-detail-fold-trigger.is-open .ev-detail-fold-icon {
  background: linear-gradient(145deg, var(--pn) 0%, #2a4fad 100%);
  transform: rotate(90deg);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.28);
}

.ev-detail-fold-body {
  padding: 8px 2px 4px;
}

.ev-detail-fold-body[hidden] {
  display: none !important;
}

.ev-detail-fold-body .ev-section {
  margin-bottom: 12px;
}

.ev-detail-fold-body .ev-section:last-child {
  margin-bottom: 0;
}

.ev-detail-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ev-detail-stat {
  background: #f7f9f7;
  border-radius: 8px;
  padding: 10px;
}

.ev-detail-stat-lbl {
  font-size: 9px;
  color: #90a4ae;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.ev-detail-stat-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--pn);
}

.ev-detail-stat--dupr {
  background: #e8eaf6;
}

.ev-roster-ranges {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ev-roster-range {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ev-roster-range--dupr {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.ev-roster-range--dplus {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: rgba(106, 27, 154, 0.1);
}

.ev-roster-range-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.ev-roster-range-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ev-roster-range-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--pn, #1e3a8a);
  letter-spacing: -0.02em;
}

.ev-roster-range--dplus .ev-roster-range-val {
  color: #6a1b9a;
}

.ev-roster-range-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.ev-roster-range-scale {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ev-roster-range-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ev-roster-range-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
}

.ev-roster-range--dupr .ev-roster-range-fill {
  background: linear-gradient(90deg, #43a047, #2e7d32);
}

.ev-roster-range--dplus .ev-roster-range-fill {
  background: linear-gradient(90deg, #ab47bc, #7b1fa2);
}

.ev-roster-range-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
}

@media (min-width: 640px) {
  .ev-roster-ranges {
    grid-template-columns: 1fr 1fr;
  }
}

.ev-detail-config-note {
  font-size: 11px;
  color: #607d8b;
  margin-top: 8px;
  line-height: 1.45;
}

.ev-detail-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ev-rsvp-section-inner {
  padding: 4px 0 2px;
}

/* RSVP invite actions — segmented pill bar (cards + detail panel) */
.inv-rsvp-bar {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.inv-rsvp-bar--card {
  margin-top: 8px;
  padding: 3px;
  background: rgba(241, 245, 249, 0.75);
  border-color: rgba(15, 23, 42, 0.05);
  box-shadow: none;
}

.inv-rsvp-bar--detail {
  margin-top: 4px;
  max-width: 360px;
}

.inv-rsvp-bar--status {
  flex-wrap: wrap;
  border-radius: 14px;
  padding: 8px;
  gap: 8px;
}

.inv-rsvp-bar--solo {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-rsvp-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.inv-rsvp-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex-shrink: 0;
}

.inv-rsvp-btn-icon .ti {
  font-size: 12px;
}

.inv-rsvp-btn--yes {
  background: #fff;
  color: #2e7d32;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.inv-rsvp-btn--yes .inv-rsvp-btn-icon {
  background: rgba(46, 125, 50, 0.12);
  color: #2e7d32;
}

.inv-rsvp-btn--yes:hover {
  background: #2e7d32;
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.28);
}

.inv-rsvp-btn--yes:hover .inv-rsvp-btn-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.inv-rsvp-btn--no {
  background: transparent;
  color: #64748b;
}

.inv-rsvp-btn--no .inv-rsvp-btn-icon {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.inv-rsvp-btn--no:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #475569;
}

.inv-rsvp-btn:active {
  transform: scale(0.98);
}

.inv-rsvp-btn:focus-visible {
  outline: 2px solid var(--py, #f9a825);
  outline-offset: 2px;
}

.inv-rsvp-bar--detail .inv-rsvp-btn {
  min-height: 38px;
  font-size: 13px;
}

.inv-rsvp-bar--solo .inv-rsvp-btn {
  flex: 0 1 auto;
  min-width: 0;
}

.inv-rsvp-bar--solo .inv-rsvp-btn--no {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13px;
}

.inv-rsvp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 100%;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 2px 4px;
}

.inv-rsvp-chip .ti {
  font-size: 13px;
}

.inv-rsvp-chip--going {
  color: #2e7d32;
}

.inv-rsvp-chip--waitlist {
  color: #e65100;
}

.inv-rsvp-chip--declined {
  color: #64748b;
}

.inv-rsvp-bar--status .inv-rsvp-btn {
  flex: 1 1 calc(50% - 4px);
}

/* Cards: Accept primary, Decline quiet text action */
.inv-rsvp-bar--card .inv-rsvp-btn {
  min-height: 30px;
  padding: 5px 12px;
  font-size: 11px;
}

.inv-rsvp-bar--card .inv-rsvp-btn--yes {
  flex: 1 1 auto;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(46, 125, 50, 0.12);
}

/* Fresh invite pair only — Decline stays quiet next to Accept */
.inv-rsvp-bar--card:not(.inv-rsvp-bar--status) .inv-rsvp-btn--no {
  flex: 0 0 auto;
  font-weight: 500;
  color: #94a3b8;
}

.inv-rsvp-bar--card:not(.inv-rsvp-bar--status) .inv-rsvp-btn--no .inv-rsvp-btn-icon {
  display: none;
}

.inv-rsvp-bar--card:not(.inv-rsvp-bar--status) .inv-rsvp-btn--no:hover {
  background: transparent;
  color: #64748b;
}

/* Going / waitlisted — secondary action must read as a button */
.inv-rsvp-bar--status .inv-rsvp-btn--no,
.inv-rsvp-bar--solo .inv-rsvp-btn--no {
  flex: 1 1 auto;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.inv-rsvp-bar--status .inv-rsvp-btn--no .inv-rsvp-btn-icon,
.inv-rsvp-bar--solo .inv-rsvp-btn--no .inv-rsvp-btn-icon {
  display: inline-flex;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.inv-rsvp-bar--status .inv-rsvp-btn--no:hover,
.inv-rsvp-bar--solo .inv-rsvp-btn--no:hover {
  background: #f8fafc;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.inv-rsvp-bar--status .inv-rsvp-btn--no:hover .inv-rsvp-btn-icon,
.inv-rsvp-bar--solo .inv-rsvp-btn--no:hover .inv-rsvp-btn-icon {
  background: rgba(100, 116, 139, 0.18);
  color: #475569;
}

.inv-rsvp-bar--card.inv-rsvp-bar--status {
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(248, 250, 252, 0.9);
}

.inv-rsvp-bar--card.inv-rsvp-bar--status .inv-rsvp-btn--no {
  min-height: 32px;
  padding: 6px 12px;
}

.inv-rsvp-bar--card .inv-rsvp-chip {
  flex: 1 1 auto;
  padding: 4px 6px;
  font-size: 10px;
}

/* Legacy markup bridge until cards re-render */
.ec-inv-actions:not(.inv-rsvp-bar) {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 12px;
  border: none !important;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-accept {
  background: #fff;
  color: #2e7d32;
  box-shadow: 0 1px 2px rgba(46, 125, 50, 0.12);
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-accept:hover {
  background: #2e7d32;
  color: #fff;
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-decline {
  flex: 0 0 auto;
  background: transparent;
  color: #94a3b8;
  font-weight: 500;
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-decline .ti {
  display: none;
}

.ec-inv-actions:not(.inv-rsvp-bar) .ec-inv-decline:hover {
  background: transparent;
  color: #64748b;
  border-color: transparent !important;
}

@media (min-width: 640px) {
  .inv-rsvp-bar--card .inv-rsvp-btn {
    min-height: 28px;
    font-size: 11px;
    padding: 5px 10px;
  }
}

.ev-edit-invite-status-wrap {
  margin-bottom: 10px;
}
.ev-edit-invite-status-wrap .ev-detail-fold {
  margin-bottom: 0;
}

.ev-invite-status-overlay {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  background: rgba(15, 23, 42, 0.12);
  z-index: calc(var(--z-modal-stack-overlay, 1320) + 2);
}
.ev-invite-status-modal {
  position: fixed;
  margin: 0;
  width: min(360px, calc(100vw - 24px));
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(420px, calc(100dvh - 24px));
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 16px 40px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  left: 0;
  top: 0;
}
.ev-invite-status-modal::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-right: none;
  border-bottom: none;
  transform: rotate(45deg);
  top: -7px;
  right: var(--ev-invite-arrow-x, 18px);
}
.ev-invite-status-modal--above::after {
  top: auto;
  bottom: -7px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: none;
  border-top: none;
  right: var(--ev-invite-arrow-x, 18px);
}
.ev-invite-status-modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.ev-invite-status-modal-hd .panel-title {
  font-size: 15px;
  margin: 0;
}
.ev-invite-status-modal-hd .m-sub {
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
  margin: 4px 0 0;
}
.ev-invite-status-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.ev-invite-status-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--pn);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ev-invite-status-count {
  font-size: 10px;
  font-weight: 600;
  color: #607d8b;
  background: #eceff1;
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.3;
}
.ev-invite-status-group-hint {
  font-size: 10px;
  color: #90a4ae;
  margin: 0 0 8px;
  line-height: 1.4;
}
.ev-invite-status-row {
  margin-bottom: 6px;
}
.ev-invite-status-row:last-child {
  margin-bottom: 0;
}
.ev-invite-status-empty {
  font-size: 12px;
  color: #90a4ae;
  margin: 0;
  text-align: center;
  padding: 12px 0;
}
.ev-invite-status-trigger[aria-expanded="true"] .ev-detail-fold-icon {
  background: linear-gradient(145deg, var(--pn) 0%, #2a4fad 100%);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.28);
}

@media (max-width: 767px) {
  .ev-invite-status-modal {
    width: auto;
    max-width: none;
    max-height: none;
    padding: 14px 16px;
  }
  .ev-invite-status-modal--mobile {
    box-shadow:
      0 6px 16px rgba(15, 23, 42, 0.08),
      0 20px 44px rgba(15, 23, 42, 0.18);
  }
  .ev-invite-status-overlay {
    background: rgba(15, 23, 42, 0.18);
  }
}
