/* Luxury / Tailwind-compat utilities for analytics, focus, share, weekly modals */

:root {
  --luxury-bg-card: var(--card);
  --luxury-bg-secondary: var(--card2);
  --luxury-border: var(--br);
  --luxury-border-hover: var(--br2);
  --luxury-text-primary: var(--t1);
  --luxury-text-secondary: var(--t2);
  --luxury-primary-gold: var(--g1);
  --luxury-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --luxury-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.45);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Layout utilities */
.flex { display: flex; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-6 > * + * { margin-top: 24px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.w-full { width: 100%; }
.w-3 { width: 12px; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-10 { width: 40px; }
.w-12 { width: 48px; }
.h-3 { height: 12px; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-10 { height: 40px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }
.text-4xl { font-size: 36px; }
.text-6xl { font-size: 56px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, monospace; }
.text-center { text-align: center; }
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 14px; }
.rounded-sm { border-radius: 4px; }
.rounded-full { border-radius: 999px; }
.overflow-x-auto { overflow-x: auto; }
.opacity-40 { opacity: 0.4; }
.transition-all { transition: all 0.2s ease; }
.cursor-pointer { cursor: pointer; }
.text-white { color: #fff; }
.text-green-400 { color: #4ade80; }
.text-red-400 { color: #f87171; }
.text-orange-400 { color: #fb923c; }
.text-blue-400 { color: #60a5fa; }
.text-yellow-400 { color: #facc15; }
.text-purple-400 { color: #c084fc; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-red-300:hover { color: #fca5a5; }

/* Luxury components */
.luxury-card, .glass-card {
  background: var(--card);
  border: 1px solid var(--br);
  border-radius: 14px;
  box-shadow: var(--luxury-shadow);
}
.luxury-text-gradient {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-luxury-primary-gold { color: var(--g1); }
.text-luxury-text-primary { color: var(--t1); }
.text-luxury-text-secondary { color: var(--t2); }
.bg-luxury-primary-gold\/20 { background: rgba(184, 134, 11, 0.14); }
.bg-luxury-secondary\/20 { background: rgba(255, 255, 255, 0.03); }
.bg-luxury-secondary\/30 { background: rgba(255, 255, 255, 0.05); }
.bg-luxury-secondary\/50 { background: rgba(255, 255, 255, 0.08); }
.border-luxury-primary-gold\/20 { border-color: rgba(184, 134, 11, 0.2); }
.border-luxury-primary-gold\/30 { border-color: rgba(184, 134, 11, 0.3); }
.border-luxury-border\/30 { border-color: var(--br); }
.border-luxury-border\/50 { border-color: var(--br); }
.luxury-heading-1, .luxury-heading-4 {
  font-family: 'Cormorant SC', sans-serif;
  font-weight: 500;
  color: var(--t1);
}
.luxury-heading-1 { font-size: 1.75rem; margin-bottom: 8px; }
.luxury-heading-4 { font-size: 1.1rem; }
.luxury-body { font-size: 14px; color: var(--t2); line-height: 1.5; }
.luxury-small { font-size: 12px; color: var(--t2); }
.luxury-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid var(--br2);
  background: rgba(184, 134, 11, 0.12);
  color: var(--g1);
  font-family: 'Cormorant SC', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.luxury-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--br);
  color: var(--t2);
}
.luxury-btn-small { padding: 6px 12px; font-size: 12px; }
.luxury-progress {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  height: 8px;
}
.luxury-progress-fill {
  height: 100%;
  background: var(--g1);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Weekly summary modal */
.weekly-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.weekly-summary-modal.active { opacity: 1; }
.weekly-summary-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
}
.weekly-summary-content {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 22px 24px;
  background: linear-gradient(160deg, #0d1a0e 0%, #121208 45%, #0d1a0e 100%);
  border: 1px solid rgba(184, 134, 11, 0.28);
  border-radius: 22px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(184, 134, 11, 0.06) inset,
    0 0 48px rgba(184, 134, 11, 0.06);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.weekly-summary-modal.active .weekly-summary-content {
  transform: scale(1) translateY(0);
}
.ws-shimmer-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #9A7B2F, #B8860B, #D4AF37, #B8860B, #9A7B2F);
  background-size: 200% 100%;
  animation: wsGoldShimmer 3s linear infinite;
}
@keyframes wsGoldShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ws-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--br);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--t2);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.ws-close-btn svg { width: 16px; height: 16px; }
.ws-close-btn:hover {
  background: rgba(184, 134, 11, 0.1);
  border-color: var(--br2);
  color: var(--g1);
}
.ws-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-right: 36px;
}
.ws-header-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.18), rgba(184, 134, 11, 0.06));
  border: 1px solid rgba(184, 134, 11, 0.28);
  box-shadow: 0 0 24px rgba(184, 134, 11, 0.1);
}
.ws-header-icon svg { width: 22px; height: 22px; color: var(--g1); }
.ws-header-text h2 {
  font-family: 'Cormorant SC', sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--t1);
  margin: 0 0 4px;
  line-height: 1.2;
}
.ws-date-range {
  font-size: 13px;
  color: var(--g1);
  margin: 0;
  letter-spacing: 0.02em;
}
.ws-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.ws-stat-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(184, 134, 11, 0.16);
  border-radius: 14px;
  padding: 16px 12px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ws-stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 60%);
  pointer-events: none;
}
.ws-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.ws-stat-icon svg {
  width: 18px;
  height: 18px;
  color: var(--g1);
  opacity: 0.85;
}
.ws-stat-value {
  font-family: 'Cormorant SC', sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--g2);
  line-height: 1;
  margin-bottom: 6px;
}
.ws-stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ws-highlight {
  background: rgba(184, 134, 11, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ws-highlight-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Cormorant SC', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.ws-highlight-label svg { width: 14px; height: 14px; color: var(--g1); }
.ws-highlight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ws-focus-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cormorant SC', sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--t1);
}
.ws-focus-stat svg { width: 18px; height: 18px; color: var(--g1); }
.ws-focus-count {
  font-size: 13px;
  color: var(--t2);
  white-space: nowrap;
}
.ws-best-day {
  margin: 0;
  font-size: 15px;
  color: var(--t1);
  line-height: 1.4;
}
.ws-message {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(184, 134, 11, 0.12);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  text-align: center;
}
.ws-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--t2);
}
.ws-message--fresh {
  background: linear-gradient(135deg, rgba(40, 160, 108, 0.08), rgba(184, 134, 11, 0.06));
  border-color: rgba(40, 160, 108, 0.2);
}
.ws-message--fresh p { color: var(--t1); }
.ws-cta {
  margin-top: 4px;
  padding: 16px 24px !important;
  font-size: 15px !important;
  gap: 8px !important;
  box-shadow: 0 6px 24px rgba(184, 134, 11, 0.28) !important;
}
.ws-cta svg { width: 16px; height: 16px; }

/* Legacy class aliases (older markup) */
.summary-header { text-align: center; margin-bottom: 20px; }
.summary-header h2 {
  font-family: 'Cormorant SC', sans-serif;
  font-size: 20px;
  color: var(--t1);
  margin-bottom: 6px;
}
.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid var(--br);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.stat-card .stat-value {
  font-family: 'Cormorant SC', sans-serif;
  font-size: 22px;
  color: var(--g1);
}
.stat-card .stat-label { font-size: 11px; color: var(--t2); }
.weekly-summary-content .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--br);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--t2);
  font-size: 20px;
  cursor: pointer;
}

/* Share card modal */
.share-card-modal {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.share-card-modal.open { opacity: 1; pointer-events: auto; }
.share-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
.share-card-container {
  position: relative;
  background: var(--card);
  border: 1px solid var(--br);
  border-radius: 18px;
  padding: 20px;
  max-width: 380px;
  width: 92vw;
  max-height: 90vh;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.3s var(--ease-spring);
}
.share-card-modal.open .share-card-container {
  transform: scale(1) translateY(0);
}
.share-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--br);
}
.share-card-header h3 {
  font-family: 'Cormorant SC', sans-serif;
  font-size: 18px;
  color: var(--t1);
  margin: 0;
}
.share-card-preview {
  max-height: 50vh;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
}
.share-card-preview canvas {
  width: 100%;
  height: auto;
  display: block;
}
.share-card-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-share {
  width: 100%;
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--br2);
  background: rgba(184, 134, 11, 0.12);
  color: var(--g1);
  font-family: 'Cormorant SC', sans-serif;
  font-size: 14px;
  cursor: pointer;
}
.share-hint { font-size: 11px; color: var(--t3); text-align: center; margin-top: 8px; }
