/* --- utilitaires.css --- */

/* Utilities Tab Switcher */
.util-tabs {
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  padding: 4px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 30px auto;
  backdrop-filter: blur(10px);
}

.util-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--color-text-muted);
  padding: 10px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s var(--ease-premium);
  text-align: center;
}

.util-tab:hover {
  color: var(--color-text);
}

.util-tab.active {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(187, 5, 31, 0.3);
}

.util-panel {
  display: none !important;
  width: 100%;
}

.util-panel.active {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  animation: fadeIn 0.4s var(--ease-premium) forwards;
}

/* Compteur Config Styles */
.color-picker-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 8px;
}

.color-option {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--color-gold);
  transform: scale(1.15);
}

/* Color Circle Backings */
.color-opt-white { background-color: #ffffff; border: 1px solid rgba(255,255,255,0.2); }
.color-opt-blue { background-color: #2196f3; }
.color-opt-green { background-color: #4caf50; }
.color-opt-red { background-color: #f44336; }
.color-opt-yellow { background-color: #ffeb3b; }
.color-opt-darkblue { background-color: #0d2a5e; border: 2px solid #1a4a9e; }
.color-opt-darkgray { background-color: #2e3540; border: 2px solid #4a5568; }

.compteur-segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--color-border);
  margin-bottom: 15px;
}

.compteur-segmented-control .segmented-option {
  flex: 1;
  text-align: center;
  position: relative;
}

.compteur-segmented-control .segmented-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.compteur-segmented-control .segmented-btn {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
}

.compteur-segmented-control input:checked + .segmented-btn {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(187, 5, 31, 0.3);
}

/* Fullscreen Active Compteur Screen */
.compteur-active-screen {
  display: none; /* Hidden by default — opened by JS */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 50px 20px;
  box-sizing: border-box;
}

/* Progress Fill Layers */
.compteur-progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  transition: background-color 0.4s var(--ease-premium);
}

.compteur-progress-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  z-index: -1;
  transition: height 0.25s cubic-bezier(0.1, 0.8, 0.3, 1), background-color 0.4s var(--ease-premium);
}

/* Color Themes Styles */
/* White Theme */
.theme-white .compteur-progress-bg { background-color: #f0f2f5; }
.theme-white .compteur-progress-fill { background-color: #90a4ae; }
.theme-white .active-count { color: #1a1a1a; }
.theme-white .active-name { color: #455a64; }
.theme-white .active-target { color: #78909c; }
.theme-white .glass-box { background: rgba(255, 255, 255, 0.4); border-color: rgba(255, 255, 255, 0.6); }
.theme-white .btn-compteur-action { background: rgba(0, 0, 0, 0.08); border-color: rgba(0, 0, 0, 0.1); color: #1a1a1a; }
.theme-white .btn-compteur-action:hover { background: rgba(0, 0, 0, 0.15); }

/* Blue Theme */
.theme-blue .compteur-progress-bg { background-color: #e3f2fd; }
.theme-blue .compteur-progress-fill { background-color: #0d47a1; }
.theme-blue .active-count { color: #0d47a1; transition: color 0.3s; }
.theme-blue.filled-half .active-count { color: #ffffff; }
.theme-blue .active-name { color: #1565c0; transition: color 0.3s; }
.theme-blue.filled-half .active-name { color: #e3f2fd; }
.theme-blue .active-target { color: #1976d2; transition: color 0.3s; }
.theme-blue.filled-half .active-target { color: #bbdefb; }
.theme-blue .glass-box { background: rgba(255, 255, 255, 0.45); border-color: rgba(255, 255, 255, 0.6); transition: all 0.3s; }
.theme-blue.filled-half .glass-box { background: rgba(0, 0, 0, 0.15); border-color: rgba(255, 255, 255, 0.2); }
.theme-blue .btn-compteur-action { background: rgba(255, 255, 255, 0.5); border-color: rgba(13, 71, 161, 0.2); color: #0d47a1; }
.theme-blue.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }
.theme-blue .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.7); }
.theme-blue.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.35); }

/* Green Theme */
.theme-green .compteur-progress-bg { background-color: #e8f5e9; }
.theme-green .compteur-progress-fill { background-color: #1b5e20; }
.theme-green .active-count { color: #1b5e20; transition: color 0.3s; }
.theme-green.filled-half .active-count { color: #ffffff; }
.theme-green .active-name { color: #2e7d32; transition: color 0.3s; }
.theme-green.filled-half .active-name { color: #e8f5e9; }
.theme-green .active-target { color: #388e3c; transition: color 0.3s; }
.theme-green.filled-half .active-target { color: #c8e6c9; }
.theme-green .glass-box { background: rgba(255, 255, 255, 0.45); border-color: rgba(255, 255, 255, 0.6); transition: all 0.3s; }
.theme-green.filled-half .glass-box { background: rgba(0, 0, 0, 0.15); border-color: rgba(255, 255, 255, 0.2); }
.theme-green .btn-compteur-action { background: rgba(255, 255, 255, 0.5); border-color: rgba(27, 94, 32, 0.2); color: #1b5e20; }
.theme-green.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }
.theme-green .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.7); }
.theme-green.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.35); }

/* Red Theme */
.theme-red .compteur-progress-bg { background-color: #ffebee; }
.theme-red .compteur-progress-fill { background-color: #b71c1c; }
.theme-red .active-count { color: #b71c1c; transition: color 0.3s; }
.theme-red.filled-half .active-count { color: #ffffff; }
.theme-red .active-name { color: #c62828; transition: color 0.3s; }
.theme-red.filled-half .active-name { color: #ffebee; }
.theme-red .active-target { color: #d32f2f; transition: color 0.3s; }
.theme-red.filled-half .active-target { color: #ffcdd2; }
.theme-red .glass-box { background: rgba(255, 255, 255, 0.45); border-color: rgba(255, 255, 255, 0.6); transition: all 0.3s; }
.theme-red.filled-half .glass-box { background: rgba(0, 0, 0, 0.15); border-color: rgba(255, 255, 255, 0.2); }
.theme-red .btn-compteur-action { background: rgba(255, 255, 255, 0.5); border-color: rgba(183, 28, 28, 0.2); color: #b71c1c; }
.theme-red.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }
.theme-red .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.7); }
.theme-red.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.35); }

/* Yellow Theme */
.theme-yellow .compteur-progress-bg { background-color: #fffde7; }
.theme-yellow .compteur-progress-fill { background-color: #f57f17; }
.theme-yellow .active-count { color: #f57f17; transition: color 0.3s; }
.theme-yellow.filled-half .active-count { color: #ffffff; }
.theme-yellow .active-name { color: #e65100; transition: color 0.3s; }
.theme-yellow.filled-half .active-name { color: #fffde7; }
.theme-yellow .active-target { color: #f57f17; transition: color 0.3s; }
.theme-yellow.filled-half .active-target { color: #fff9c4; }
.theme-yellow .glass-box { background: rgba(255, 255, 255, 0.5); border-color: rgba(255, 255, 255, 0.7); transition: all 0.3s; }
.theme-yellow.filled-half .glass-box { background: rgba(0, 0, 0, 0.15); border-color: rgba(255, 255, 255, 0.2); }
.theme-yellow .btn-compteur-action { background: rgba(255, 255, 255, 0.55); border-color: rgba(245, 127, 23, 0.2); color: #f57f17; }
.theme-yellow.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.2); color: #ffffff; }
.theme-yellow .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.75); }
.theme-yellow.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.35); }

/* Dark Blue Theme */
.theme-darkblue .compteur-progress-bg { background-color: #060f22; }
.theme-darkblue .compteur-progress-fill { background-color: #1a4a9e; }
.theme-darkblue .active-count { color: #5b8def; transition: color 0.3s; }
.theme-darkblue.filled-half .active-count { color: #e8f0ff; }
.theme-darkblue .active-name { color: #7aa3f5; transition: color 0.3s; }
.theme-darkblue.filled-half .active-name { color: #c5d8ff; }
.theme-darkblue .active-target { color: #4a7de8; transition: color 0.3s; }
.theme-darkblue.filled-half .active-target { color: #a8c4ff; }
.theme-darkblue .glass-box { background: rgba(255, 255, 255, 0.04); border-color: rgba(90, 140, 240, 0.25); transition: all 0.3s; }
.theme-darkblue.filled-half .glass-box { background: rgba(0, 0, 0, 0.2); border-color: rgba(255, 255, 255, 0.15); }
.theme-darkblue .btn-compteur-action { background: rgba(90, 140, 240, 0.15); border-color: rgba(90, 140, 240, 0.25); color: #7aa3f5; }
.theme-darkblue.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); color: #e8f0ff; }
.theme-darkblue .btn-compteur-action:hover { background: rgba(90, 140, 240, 0.3); }
.theme-darkblue.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.2); }

/* Dark Gray Theme */
.theme-darkgray .compteur-progress-bg { background-color: #0e1117; }
.theme-darkgray .compteur-progress-fill { background-color: #4a5568; }
.theme-darkgray .active-count { color: #a0aec0; transition: color 0.3s; }
.theme-darkgray.filled-half .active-count { color: #f0f2f5; }
.theme-darkgray .active-name { color: #718096; transition: color 0.3s; }
.theme-darkgray.filled-half .active-name { color: #cbd5e0; }
.theme-darkgray .active-target { color: #606878; transition: color 0.3s; }
.theme-darkgray.filled-half .active-target { color: #a0aec0; }
.theme-darkgray .glass-box { background: rgba(255, 255, 255, 0.03); border-color: rgba(160, 174, 192, 0.15); transition: all 0.3s; }
.theme-darkgray.filled-half .glass-box { background: rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.1); }
.theme-darkgray .btn-compteur-action { background: rgba(160, 174, 192, 0.1); border-color: rgba(160, 174, 192, 0.2); color: #a0aec0; }
.theme-darkgray.filled-half .btn-compteur-action { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15); color: #f0f2f5; }
.theme-darkgray .btn-compteur-action:hover { background: rgba(160, 174, 192, 0.25); }
.theme-darkgray.filled-half .btn-compteur-action:hover { background: rgba(255, 255, 255, 0.2); }

/* Central Glassmorphism Card for Count */
.glass-box {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 40px 25px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  transition: all 0.4s var(--ease-premium);
}

.active-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.active-count {
  font-family: var(--font-timer);
  font-weight: 800;
  font-size: 6.5rem;
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.active-target {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Controls Bar at bottom of screen */
.compteur-active-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 360px;
  z-index: 10;
  pointer-events: auto;
}

/* Floating round buttons */
.btn-compteur-action {
  border: 1px solid transparent;
  color: inherit;
  cursor: pointer;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s var(--ease-premium);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.btn-compteur-action:active {
  transform: scale(0.95);
}

.btn-compteur-action svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Helper utilities to support dark theme in config profiles */
.btn-delete-compteur {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-delete-compteur:hover {
  color: #e53935;
  background: rgba(229, 57, 53, 0.1);
}

.btn-delete-compteur svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Screen state switches */
.compteur-fullscreen-active {
  overflow: hidden !important;
}

.compteur-fullscreen-active header.navbar-timer,
.compteur-fullscreen-active footer {
  display: none !important;
}

/* Celebrations */
@keyframes celebrate-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.celebrating {
  animation: celebrate-pulse 0.4s ease-in-out 3;
}

/* ===== CALENDRIER BOUDDHISTE — THÈME BLANC ===== */

/* Override: Calendar panel gets a light background */
#calendrier-panel {
  background: #faf8f4;
  border-radius: 20px;
  padding: 20px 16px 24px;
  margin: -10px -4px;
}

/* Next Event Banner */
.next-event-banner {
  background: linear-gradient(135deg, #fffef9 0%, #fff8e8 100%);
  border: 1.5px solid #c9a84c;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.18), 0 1px 4px rgba(0,0,0,0.06);
  transition: border-color 0.5s, box-shadow 0.5s;
  position: relative;
  overflow: hidden;
}

.next-event-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c9a84c, #e8c96a, #c9a84c);
}

.next-ev-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #a07830;
  margin-bottom: 5px;
}

.next-ev-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #7a5518;
  margin-bottom: 3px;
}

.next-ev-date {
  font-family: var(--font-body);
  font-size: 0.83rem;
  color: #8a6a30;
  margin-bottom: 10px;
}

.next-ev-countdown {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #c9a84c, #e8c060);
  padding: 5px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.4);
}

.next-ev-countdown.today {
  background: linear-gradient(135deg, #bb051f, #e02035);
  box-shadow: 0 2px 8px rgba(187, 5, 31, 0.4);
}

/* Calendar Nav Bar */
.cal-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}

.cal-nav-btn {
  background: #fff;
  border: 1.5px solid #e8dfc8;
  color: #7a5518;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s var(--ease-premium);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.cal-nav-btn:hover {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(201,168,76,0.3);
  transform: scale(1.07);
}

.cal-month-title {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

#cal-month-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #2c1a06;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

#cal-year-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  color: #9a7a40;
  letter-spacing: 1px;
}

.cal-today-btn {
  background: transparent;
  border: 1.5px solid #d4c090;
  color: #9a7a40;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.cal-today-btn:hover {
  border-color: #c9a84c;
  color: #7a5518;
  background: #fff8e8;
}

/* Legend */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee6d0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.63rem;
  font-weight: 700;
  color: #7a6a50;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Calendar Grid */
.cal-wrapper {
  background: #fff;
  border: 1px solid #eee6d0;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
}

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, #f5edd8, #fdf8ee);
  border-bottom: 1px solid #eee6d0;
}

.cal-grid-header div {
  text-align: center;
  padding: 9px 0;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9a7a40;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-day {
  min-height: 58px;
  padding: 5px 3px 4px;
  border-right: 1px solid #f0e8d4;
  border-bottom: 1px solid #f0e8d4;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  transition: background 0.15s;
  position: relative;
  box-sizing: border-box;
  background: #fff;
}

.cal-day:nth-child(7n) { border-right: none; }
.cal-day:nth-last-child(-n+7) { border-bottom: none; }

.cal-day.has-events { cursor: pointer; }
.cal-day.has-events:hover { background: #fffaf0; }

.cal-day.is-other-month {
  opacity: 0.25;
  pointer-events: none;
  background: #fdfbf5;
}

.cal-day.is-today .cal-day-number {
  background: linear-gradient(135deg, #c9a84c, #e8c060);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(201,168,76,0.45);
  font-weight: 800;
}

.cal-day.is-selected { background: #fff8e8; }

.cal-day.has-festival {
  background: linear-gradient(180deg, #fffdf5 0%, #fff9e8 100%);
}

.cal-day-number {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: #3a2a10;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.cal-day.is-other-month .cal-day-number { color: #b8a890; }

/* Festival day: show a small icon image in the cell */
.cal-day-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.cal-day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  max-width: 32px;
}

/* Colored dots */
.cal-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cal-dot.festival  { background: linear-gradient(135deg, #c9a84c, #e8c060); }
.cal-dot.tara      { background: #43a047; }
.cal-dot.guru      { background: #e53935; }
.cal-dot.fullmoon  { background: radial-gradient(circle, #fff 30%, #d4c090 100%); border: 1px solid #c9a84c; box-shadow: 0 0 4px rgba(201,168,76,0.4); }
.cal-dot.dakini    { background: #ab47bc; }
.cal-dot.protector { background: #e65100; }
.cal-dot.newmoon   { background: #607d8b; }

/* Event Detail Slide-Up Panel — also light */
.cal-event-detail {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 600px;
  max-height: 75vh;
  background: #faf8f4;
  border-top: 2px solid #c9a84c;
  border-radius: 26px 26px 0 0;
  z-index: 9100;
  overflow-y: auto;
  transition: transform 0.38s var(--ease-premium);
  box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.22);
}

.cal-event-detail.open {
  transform: translateX(-50%) translateY(0);
}

.cal-event-detail-handle {
  width: 40px;
  height: 4px;
  background: #d4c090;
  border-radius: 2px;
  margin: 12px auto 0;
}

.cal-event-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 12px;
  position: sticky;
  top: 0;
  background: #faf8f4;
  border-bottom: 1px solid #eee6d0;
  z-index: 1;
}

#cal-detail-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: #2c1a06;
  text-transform: capitalize;
}

#cal-detail-close {
  background: #f0e8d4;
  border: none;
  color: #9a7a40;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#cal-detail-close:hover {
  background: #c9a84c;
  color: #fff;
}

#cal-detail-content {
  padding: 16px 18px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Event Cards inside detail panel */
.cal-event-card {
  background: #fff;
  border: 1px solid #eee6d0;
  border-left: 4px solid #c9a84c;
  border-radius: 14px;
  padding: 16px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.cal-event-card:hover { transform: translateY(-1px); }

.ev-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

/* Large deity/festival icon image */
.ev-card-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  border: 2px solid #f0e8d4;
}

.ev-card-icon-emoji {
  font-size: 2.4rem;
  flex-shrink: 0;
  line-height: 1;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff8e8, #fff0cc);
  border-radius: 50%;
  border: 2px solid #e8d8a0;
}

.ev-card-meta {
  flex: 1;
}

.ev-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #2c1a06;
  margin-bottom: 2px;
  line-height: 1.2;
}

.ev-card-subtitle {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-style: italic;
  color: #8a6a30;
  margin-bottom: 3px;
  line-height: 1.3;
}

.ev-card-tibday {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #fff;
  background: #c9a84c;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 3px;
}

.ev-card-practice {
  font-family: var(--font-body);
  font-size: 0.83rem;
  line-height: 1.6;
  color: #5a4a30;
  margin-bottom: 12px;
}

.ev-card-practice strong {
  color: #3a2a10;
  font-weight: 700;
}

.ev-card-mantra {
  display: inline-block;
  font-family: var(--font-timer);
  font-size: 0.68rem;
  font-weight: 700;
  color: #7a5518;
  background: linear-gradient(135deg, #fff8e0, #fdf0c0);
  border: 1.5px solid #c9a84c;
  border-radius: 8px;
  padding: 6px 14px;
  letter-spacing: 2px;
  box-shadow: 0 1px 4px rgba(201,168,76,0.2);
}

/* Overlay */
.cal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(50, 30, 5, 0.4);
  z-index: 9050;
  backdrop-filter: blur(4px);
}

.cal-overlay.visible { display: block; }

/* Disclaimer */
.cal-disclaimer {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-style: italic;
  color: #9a8060;
  opacity: 0.75;
  text-align: center;
  padding: 0 8px;
  line-height: 1.5;
}

