/* monthly-review.css — This Month in Review modal + home card styles */

/* ── Home card ─────────────────────────────────────────────────────────── */
.monthly-review-card {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, #6C3CE1 0%, #FF5D6C 100%);
  color: #fff;
  padding: 20px 22px 18px;
  margin: 0 auto 16px;
  max-width: 1100px;
  width: calc(100% - 32px);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(108, 60, 225, 0.35);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.monthly-review-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.monthly-review-card-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
  padding: 0;
}

.monthly-review-card-dismiss:hover,
.monthly-review-card-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.monthly-review-card-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
  text-align: center;
  padding-right: 24px; /* clear the dismiss button */
}

.monthly-review-card-sub {
  font-size: 0.85rem;
  opacity: 0.88;
  margin-bottom: 14px;
  text-align: center;
}

.monthly-review-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 18px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.monthly-review-card-cta:hover,
.monthly-review-card-cta:focus-visible {
  background: rgba(255, 255, 255, 0.36);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Modal overlay ─────────────────────────────────────────────────────── */
.mr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px 40px;
}

.mr-overlay[hidden] {
  display: none;
}

.mr-modal {
  background: var(--bg, #fff);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  outline: none;
}

/* ── Modal header ──────────────────────────────────────────────────────── */
.mr-header {
  background: linear-gradient(135deg, #6C3CE1 0%, #FF5D6C 100%);
  padding: 28px 28px 22px;
  position: relative;
  color: #fff;
}

.mr-header-month {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.mr-header-sub {
  font-size: 0.9rem;
  opacity: 0.85;
}

.mr-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
  line-height: 1;
}

.mr-close-btn:hover,
.mr-close-btn:focus-visible {
  background: rgba(255, 255, 255, 0.38);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Modal body ────────────────────────────────────────────────────────── */
.mr-body {
  padding: 24px 28px 28px;
}

/* ── Stats grid ────────────────────────────────────────────────────────── */
.mr-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (min-width: 480px) {
  .mr-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mr-stat-card {
  background: var(--bg2, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 14px 12px 12px;
  text-align: center;
}

.mr-stat-emoji {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
}

.mr-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text, #111827);
  line-height: 1;
  margin-bottom: 4px;
}

.mr-stat-label {
  font-size: 0.73rem;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Top gathering ─────────────────────────────────────────────────────── */
.mr-top-gathering {
  background: linear-gradient(135deg, rgba(108, 60, 225, 0.15) 0%, rgba(255, 93, 108, 0.12) 100%);
  border: 1px solid rgba(108, 60, 225, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mr-top-gathering-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.mr-top-gathering-label {
  font-size: 0.72rem;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.mr-top-gathering-name {
  font-size: 1rem;
  font-weight: 600;
}

/* ── Badges ────────────────────────────────────────────────────────────── */
.mr-badges-section {
  margin-bottom: 20px;
}

.mr-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.mr-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mr-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg2, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text, #111827);
}

/* ── AI summary ────────────────────────────────────────────────────────── */
.mr-ai-summary {
  background: linear-gradient(135deg, rgba(108, 60, 225, 0.1) 0%, rgba(255, 93, 108, 0.08) 100%);
  border-left: 3px solid #6C3CE1;
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.mr-ai-quote {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text, #111827);
}

/* ── Share button ──────────────────────────────────────────────────────── */
.mr-share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6C3CE1, #FF5D6C);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 24px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin: 0 auto;
}

.mr-share-btn:hover,
.mr-share-btn:focus-visible {
  opacity: 0.88;
  outline: 2px solid #6C3CE1;
  outline-offset: 2px;
}

/* ── Skeleton loading ──────────────────────────────────────────────────── */
.mr-skeleton {
  border-radius: 10px;
  background: var(--bg2, #e5e7eb);
  animation: mr-pulse 1.5s ease-in-out infinite;
}

@keyframes mr-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Error state ───────────────────────────────────────────────────────── */
.mr-error {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted, #6b7280);
}

.mr-error-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

.mr-retry-btn {
  margin-top: 14px;
  background: var(--bg2, #f3f4f6);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  color: var(--text, #111827);
  padding: 8px 20px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .mr-skeleton { animation: none; }
}
