/*
 * Janaz Attendance — Front-end Styles
 * Enhances the existing .janaz-ann-rsvp containers
 * from the announcements plugin with state, feedback, and extras.
 */

/* ── Confirmed state on RSVP buttons ─────────────────────────────── */
.janaz-rsvp-btn.jatt-confirmed {
  background: var(--jann-green, #1a5c3a);
  color: #fff;
  border-color: var(--jann-green, #1a5c3a);
  cursor: default;
  position: relative;
}

.janaz-rsvp-btn.jatt-confirmed::after {
  content: ' ✓';
  font-size: .8em;
}

/* ── Feedback message beneath RSVP section ───────────────────────── */
.jatt-rsvp-feedback {
  font-size: .8rem;
  font-weight: 600;
  padding: .5rem .75rem;
  border-radius: 8px;
  margin-top: .4rem;
  display: none;
  line-height: 1.4;
}

.jatt-rsvp-feedback.jatt-success {
  background: rgba(26, 92, 58, .09);
  color: #1a5c3a;
  border: 1px solid rgba(26, 92, 58, .18);
  display: block;
}

.jatt-rsvp-feedback.jatt-duplicate {
  background: rgba(200, 164, 90, .12);
  color: #7a5c1e;
  border: 1px solid rgba(200, 164, 90, .25);
  display: block;
}

.jatt-rsvp-feedback.jatt-error {
  background: rgba(180, 40, 40, .08);
  color: #a02020;
  border: 1px solid rgba(180, 40, 40, .18);
  display: block;
}

/* ── Cancel link ──────────────────────────────────────────────────── */
.jatt-cancel-link {
  font-size: .72rem;
  color: var(--jann-muted, #666);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
  margin-top: .2rem;
  display: inline-block;
}

.jatt-cancel-link:hover {
  color: #c00;
}

/* ── Loading state ────────────────────────────────────────────────── */
.janaz-rsvp-btn.jatt-loading {
  opacity: .6;
  pointer-events: none;
}

/* ── Count update animation ──────────────────────────────────────── */
@keyframes jatt-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.janaz-att-stat.jatt-updated {
  animation: jatt-pop .35s ease;
}

/* ── Admin stat cards ─────────────────────────────────────────────── */
.jatt-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.jatt-stat-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: 3px solid #2D5016;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.jatt-stat-icon  { font-size: 1.5rem; margin-bottom: .35rem; }
.jatt-stat-number { font-size: 2rem; font-weight: 700; color: #2D5016; line-height: 1; }
.jatt-stat-label  { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #666; margin-top: .25rem; }
