/**
 * /calendar — Light-only (owner, 2026-10-18): white canvas matching the shared header;
 * component palette lives in calendar-luxury.css
 */

html.light:has(.calendar-page:not(.calendar-page--embed)),
html.light body:has(.calendar-page:not(.calendar-page--embed)),
html.light body > main:has(.calendar-page:not(.calendar-page--embed)) {
  background-color: #ffffff !important;
}

/**
 * /calendar — Dark site: pearl accent banner only (no green / no oil tones).
 */

html:not(.light) .calendar-feature-banner {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.98)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 40px rgba(0, 0, 0, 0.5);
}

html:not(.light) .calendar-feature-copy {
  color: rgba(245, 245, 242, 0.68) !important;
}

html:not(.light) .calendar-feature-icon {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 242, 0.85);
}

html:not(.light) .calendar-feature-new-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 242, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html:not(.light) .calendar-feature-pulse-dot {
  background-color: rgba(245, 245, 242, 0.55);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

html:not(.light) .calendar-feature-pulse-ring {
  background-color: rgba(255, 255, 255, 0.12);
}

/**
 * /calendar — Black Luxury + Pearl Typography (scoped to .calendar-page.calendar-luxury)
 */

/* تمرير الصفحة كاملاً — منع أي إحساس بقص المحتوى (الصفحة المستقلة فقط؛ التضمين في القناة لا يغيّر تمرير الصفحة) */
html:has(.calendar-page.calendar-luxury:not(.calendar-page--embed)),
html:has(.calendar-page.calendar-luxury:not(.calendar-page--embed)) body {
  overflow-x: hidden;
  overflow-y: auto;
}

.calendar-page.calendar-luxury:not(.calendar-page--embed) {
  /* min-height: viewport — dvh يقلل قص المحتوى على الموبايل */
  min-height: 100vh;
  min-height: 100dvh;
}

.calendar-page.calendar-luxury {
  --cal-pearl-title: #f5f5f2;
  --cal-pearl-body: rgba(245, 245, 242, 0.92);
  --cal-pearl-muted: rgba(245, 245, 242, 0.68);
  --cal-pearl-faint: rgba(245, 245, 242, 0.46);
  --cal-row-alt: #050505;
  --cal-hover: rgba(255, 255, 255, 0.03);
  --cal-filter-hover: rgba(255, 255, 255, 0.04);
  --cal-card-border: rgba(255, 255, 255, 0.08);
  --cal-card-inset: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  /* rgb triples consumed by the TSX as rgba(var(--cal-*-rgb), alpha) */
  --cal-fg-rgb: 245, 245, 242;
  --cal-line-rgb: 255, 255, 255;
  --cal-better-rgb: 200, 214, 228;
  --cal-star-rgb: 218, 200, 160;
  --zs-text-primary: var(--cal-pearl-body);
  --zs-text-secondary: var(--cal-pearl-muted);
  --zs-surface-1: #000000;
  --zs-surface-2: #000000;
  --zs-dark-soft: #000000;
  --zs-green-primary: rgba(245, 245, 242, 0.22);
  --zs-green-soft: rgba(255, 255, 255, 0.04);
  --crypto-row-zebra: #050505;
  --crypto-row-hover-bg: var(--cal-hover);
  --crypto-row-hover-shadow: none;
  --crypto-card-shadow: var(--cal-card-inset), 0 8px 32px rgba(0, 0, 0, 0.65);
  --crypto-card-shadow-hover: var(--cal-card-inset), 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--cal-pearl-body);
  background-color: #000000 !important;
}

.calendar-page.calendar-luxury .calendar-page-head {
  background-color: #000000 !important;
  color: var(--cal-pearl-body);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.calendar-page.calendar-luxury .calendar-lux-pearl-heading {
  color: var(--cal-pearl-title);
  font-weight: 700;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.04),
    0 0 22px rgba(255, 255, 255, 0.03);
}

.calendar-page.calendar-luxury .calendar-lux-pearl-sub {
  color: var(--cal-pearl-muted);
  font-weight: 500;
}

.calendar-page.calendar-luxury .calendar-filters-card {
  background-color: #000000 !important;
  border: 1px solid var(--cal-card-border) !important;
  box-shadow: var(--cal-card-inset) !important;
}

.calendar-page.calendar-luxury .calendar-filters-card label.text-sm,
.calendar-page.calendar-luxury .calendar-filters-card .mb-2.text-sm {
  color: var(--cal-pearl-muted);
  font-weight: 600;
}

.calendar-page.calendar-luxury .calendar-filters-card button:hover,
.calendar-page.calendar-luxury .calendar-filters-card label:hover {
  background-color: var(--cal-filter-hover) !important;
}

.calendar-page.calendar-luxury .calendar-filters-card .relative > button,
.calendar-page.calendar-luxury .calendar-filters-card input[type="text"] {
  background-color: #000000 !important;
  border: 1px solid var(--cal-card-border) !important;
  box-shadow: var(--cal-card-inset) !important;
  color: var(--cal-pearl-body) !important;
}

/* قوائم فلاتر /calendar — سكرول رفيع داكن فقط داخل القائمة */
.calendar-page.calendar-luxury .calendar-filters-card .calendar-filter-dropdown-panel {
  background-color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65) !important;
}

.calendar-page.calendar-luxury .calendar-filter-dropdown-scroll {
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  padding-inline-end: 14px;
  padding-inline-start: 12px;
  padding-bottom: 12px;
  box-sizing: border-box;
}

.calendar-page.calendar-luxury .calendar-filter-dropdown-scroll--tags {
  max-height: 6rem;
  padding-inline-end: 10px;
}

.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll::-webkit-scrollbar,
.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar {
  width: 4px;
}

.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll::-webkit-scrollbar-track,
.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll::-webkit-scrollbar-thumb,
.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll::-webkit-scrollbar-thumb:hover,
.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll::-webkit-scrollbar-button,
.calendar-page.calendar-luxury
  .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.calendar-page.calendar-luxury .calendar-filter-dropdown-panel .calendar-filter-link-muted {
  color: rgba(245, 245, 242, 0.58);
}

.calendar-page.calendar-luxury .calendar-filter-dropdown-panel .calendar-filter-option-label {
  color: rgba(245, 245, 242, 0.86);
}

.calendar-page.calendar-luxury .calendar-filter-dropdown-panel .calendar-filter-region-title {
  color: rgba(245, 245, 242, 0.58);
}

.calendar-page.calendar-luxury .calendar-filter-checkbox {
  accent-color: #eaeaea;
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}

/* قائمة التصنيف — تباعد صفوف ومحاذاة RTL */
.calendar-page.calendar-luxury .calendar-filter-category-list {
  display: flex;
  flex-direction: column;
  row-gap: 4px;
}

.calendar-page.calendar-luxury .calendar-filter-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: right;
  transition: background-color 0.15s ease;
  box-shadow: none;
}

.calendar-page.calendar-luxury .calendar-filter-category-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.calendar-page.calendar-luxury .calendar-filter-category-row--active {
  background: rgba(255, 255, 255, 0.04);
}

.calendar-page.calendar-luxury .calendar-filter-category-row .calendar-filter-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.calendar-page.calendar-luxury .calendar-filter-category-label {
  line-height: 1.6;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* فلتر درجات الأهمية — نجوم ذهبية فقط داخل هذه القائمة */
.calendar-page.calendar-luxury .calendar-filter-importance-dropdown .calendar-importance-star {
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  color: #f5c84c;
  text-shadow: 0 0 10px rgba(245, 200, 76, 0.18);
  transition:
    opacity 0.15s ease,
    filter 0.15s ease;
}

.calendar-page.calendar-luxury .calendar-filter-importance-dropdown .calendar-importance-star--on {
  opacity: 1;
}

.calendar-page.calendar-luxury .calendar-filter-importance-dropdown .calendar-importance-star--off {
  opacity: 0.4;
}

.calendar-page.calendar-luxury
  .calendar-filter-importance-dropdown
  .calendar-filter-importance-option:hover
  .calendar-importance-star {
  filter: brightness(1.09);
}

.calendar-page.calendar-luxury
  .calendar-filter-importance-dropdown
  .calendar-filter-importance-option:hover
  .calendar-importance-star--off {
  opacity: 0.52;
}

.calendar-page.calendar-luxury .calendar-main-table {
  background-color: #000000 !important;
  border: 1px solid var(--cal-card-border) !important;
  box-shadow: var(--cal-card-inset) !important;
}

.calendar-page.calendar-luxury .calendar-main-table > div:first-child {
  background-color: #000000 !important;
  border-bottom: 1px solid var(--cal-card-border) !important;
  color: var(--cal-pearl-title) !important;
  font-weight: 700;
}

.calendar-page.calendar-luxury .calendar-main-table > div:first-child > div {
  color: var(--cal-pearl-muted) !important;
  font-weight: 600;
}

/* عمود الأهمية في الجدول فقط — نجوم ذهبية أوضح (لا يؤثر على فلتر الأهمية) */
.calendar-page.calendar-luxury .calendar-main-table .calendar-table-star-row {
  gap: 1px;
}

.calendar-page.calendar-luxury .calendar-main-table .calendar-table-star {
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  transition: color 0.15s ease, text-shadow 0.15s ease, opacity 0.15s ease;
}

.calendar-page.calendar-luxury .calendar-main-table .calendar-table-star--active {
  color: #ffd76a;
  text-shadow:
    0 0 6px rgba(255, 215, 106, 0.32),
    0 0 18px rgba(255, 215, 106, 0.12);
}

.calendar-page.calendar-luxury .calendar-main-table .calendar-table-star--inactive {
  color: rgba(255, 255, 255, 0.24);
  text-shadow: none;
}

.calendar-page.calendar-luxury
  .calendar-main-table
  .space-y-0
  > div[class*="md:grid"]:hover
  .calendar-table-star--active {
  text-shadow:
    0 0 8px rgba(255, 215, 106, 0.38),
    0 0 22px rgba(255, 215, 106, 0.16);
}

.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div[class*="md:grid"] {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--cal-pearl-body) !important;
}

.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div[class*="md:grid"]:nth-child(odd) {
  background-color: var(--cal-row-alt) !important;
}

.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div[class*="md:grid"]:nth-child(even) {
  background-color: #000000 !important;
}

.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div[class*="md:grid"]:hover {
  background-color: var(--cal-hover) !important;
}

.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div.flex,
.calendar-page.calendar-luxury .calendar-main-table .space-y-0 > div.py-16 {
  background-color: #000000 !important;
}

.calendar-page.calendar-luxury .calendar-next-high-strip {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: var(--cal-card-inset) !important;
}

.calendar-page.calendar-luxury .calendar-next-high-count {
  color: var(--cal-pearl-title) !important;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.04),
    0 0 22px rgba(255, 255, 255, 0.03);
}

.calendar-page.calendar-luxury .calendar-tab-sep {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* html.light — نفس الفخامة على canvas الأسود */
html.light .calendar-page.calendar-luxury,
html.light .calendar-page.calendar-luxury .calendar-page-head {
  background-color: #000000 !important;
  color: var(--cal-pearl-body) !important;
}

html.light .calendar-page.calendar-luxury .calendar-filters-card,
html.light .calendar-page.calendar-luxury .calendar-main-table {
  background-color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.light .calendar-page.calendar-luxury .calendar-main-table > div:first-child {
  background-color: #000000 !important;
  color: var(--cal-pearl-title) !important;
}

html.light .calendar-page.calendar-luxury .calendar-feature-banner {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06),
    rgba(0, 0, 0, 0.98)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 40px rgba(0, 0, 0, 0.5);
}

html.light .calendar-page.calendar-luxury .calendar-feature-copy {
  color: rgba(245, 245, 242, 0.68) !important;
}

html.light .calendar-page.calendar-luxury .calendar-feature-icon {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(245, 245, 242, 0.85);
}

html.light .calendar-page.calendar-luxury .calendar-feature-new-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 245, 242, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

html.light .calendar-page.calendar-luxury .calendar-feature-pulse-dot {
  background-color: rgba(245, 245, 242, 0.55);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

html.light .calendar-page.calendar-luxury .calendar-feature-pulse-ring {
  background-color: rgba(255, 255, 255, 0.12);
}

/* نافذة التحليل الذكي — سكرول واحد، شريط رفيع داكن */
.calendar-page.calendar-luxury .calendar-analysis-dialog {
  background-color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  color: rgba(245, 245, 242, 0.86);
  line-height: 1.9;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog-body::-webkit-scrollbar {
  width: 4px;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog-body::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog-body::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-header {
  color: rgba(245, 245, 242, 0.86);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-header h3 {
  color: #f5f5f2;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-header h4 {
  color: rgba(245, 245, 242, 0.62);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-reading,
.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-meta {
  color: rgba(245, 245, 242, 0.62);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-metric-label {
  color: rgba(245, 245, 242, 0.62);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-body h4,
.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-body h5 {
  color: #f5f5f2;
  line-height: 1.9;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-benefit-desc,
.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-info-desc {
  color: rgba(245, 245, 242, 0.62);
  line-height: 1.9;
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-footer {
  color: rgba(245, 245, 242, 0.62);
}

.calendar-page.calendar-luxury .calendar-analysis-dialog .calendar-analysis-dialog-close {
  position: absolute;
  z-index: 20;
  top: 24px;
  inset-inline-start: 24px;
}

/* ═══ /calendar Light-only (owner, 2026-10-18) ═══
   `calendar-page--light` is set by app/calendar/page.tsx and the recommendations channel embed
   (`<EconomicCalendar embed light />`); the legacy table embed keeps the dark palette above.
   Selectors start with `html` so they outrank the `html.light … calendar-luxury` black overrides. */
html .calendar-page.calendar-luxury.calendar-page--light {
  --cal-pearl-title: #0b0d0c;
  --cal-pearl-body: rgba(11, 13, 12, 0.88);
  --cal-pearl-muted: rgba(11, 13, 12, 0.66);
  --cal-pearl-faint: rgba(11, 13, 12, 0.5);
  --cal-row-alt: #fafaf7;
  --cal-hover: rgba(11, 13, 12, 0.035);
  --cal-filter-hover: rgba(11, 13, 12, 0.04);
  --cal-card-border: rgba(11, 13, 12, 0.1);
  --cal-card-inset: 0 1px 2px rgba(11, 13, 12, 0.04);
  --cal-fg-rgb: 11, 13, 12;
  --cal-line-rgb: 11, 13, 12;
  --cal-better-rgb: 56, 86, 115;
  --cal-star-rgb: 176, 128, 24;
  --cal-canvas: #ffffff;
  --cal-tile: #f6f6f2;
  --cal-day-active-bg: #f6f6f2;
  --cal-day-active-border: rgba(11, 13, 12, 0.62);
  --cal-day-active-shadow: inset 0 -2px 0 #0b0d0c;
  --zs-text-primary: var(--cal-pearl-body);
  --zs-text-secondary: var(--cal-pearl-muted);
  --zs-surface-1: #ffffff;
  --zs-surface-2: #ffffff;
  --zs-dark-soft: #f6f6f2;
  --zs-green-soft: rgba(11, 13, 12, 0.04);
  color: var(--cal-pearl-body) !important;
  background-color: #ffffff !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-page-head {
  background-color: #ffffff !important;
  color: var(--cal-pearl-body) !important;
  box-shadow: 0 1px 0 rgba(11, 13, 12, 0.08);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-lux-pearl-heading,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-next-high-count {
  color: var(--cal-pearl-title) !important;
  text-shadow: none;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-banner {
  background: #fafaf7 !important;
  border: 1px solid rgba(11, 13, 12, 0.08);
  box-shadow: 0 1px 2px rgba(11, 13, 12, 0.04);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-copy {
  color: rgba(11, 13, 12, 0.7) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-icon {
  background-color: rgba(11, 13, 12, 0.05);
  color: rgba(11, 13, 12, 0.78);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-new-badge {
  background: #ffffff;
  color: rgba(11, 13, 12, 0.86);
  border: 1px solid rgba(11, 13, 12, 0.14);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-pulse-dot {
  background-color: rgba(11, 13, 12, 0.55);
  box-shadow: none;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-feature-pulse-ring {
  background-color: rgba(11, 13, 12, 0.14);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filters-card,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table {
  background-color: #ffffff !important;
  border: 1px solid rgba(11, 13, 12, 0.1) !important;
  box-shadow: 0 1px 2px rgba(11, 13, 12, 0.04) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filters-card .relative > button,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-filters-card input[type="text"] {
  background-color: #ffffff !important;
  border: 1px solid rgba(11, 13, 12, 0.14) !important;
  box-shadow: none !important;
  color: rgba(11, 13, 12, 0.88) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filters-card .relative > button:hover {
  background-color: #fafaf7 !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filters-card .calendar-filter-dropdown-panel {
  background-color: #ffffff !important;
  border: 1px solid rgba(11, 13, 12, 0.12) !important;
  box-shadow:
    0 1px 2px rgba(11, 13, 12, 0.04),
    0 12px 40px -24px rgba(11, 13, 12, 0.28) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-scroll,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-body {
  scrollbar-color: rgba(11, 13, 12, 0.22) transparent;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-scroll::-webkit-scrollbar-thumb,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-scroll--tags::-webkit-scrollbar-thumb,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(11, 13, 12, 0.2);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-panel .calendar-filter-link-muted,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-panel .calendar-filter-region-title {
  color: rgba(11, 13, 12, 0.58);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-dropdown-panel .calendar-filter-option-label {
  color: rgba(11, 13, 12, 0.86);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-checkbox {
  accent-color: #0b0d0c;
  background-color: #ffffff;
  border: 1px solid rgba(11, 13, 12, 0.3);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-category-row:hover,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-category-row--active {
  background: rgba(11, 13, 12, 0.045);
}

/* Importance keeps its gold, deepened for contrast on white */
html .calendar-page.calendar-luxury.calendar-page--light .calendar-filter-importance-dropdown .calendar-importance-star {
  color: #c99312;
  text-shadow: none;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .calendar-table-star--active {
  color: #d4a017;
  text-shadow: none;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .calendar-table-star--inactive {
  color: rgba(11, 13, 12, 0.16);
}

html
  .calendar-page.calendar-luxury.calendar-page--light
  .calendar-main-table
  .space-y-0
  > div[class*="md:grid"]:hover
  .calendar-table-star--active {
  text-shadow: none;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table > div:first-child {
  background-color: #fafaf7 !important;
  border-bottom: 1px solid rgba(11, 13, 12, 0.1) !important;
  color: var(--cal-pearl-title) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div[class*="md:grid"] {
  border-bottom: 1px solid rgba(11, 13, 12, 0.07) !important;
  color: var(--cal-pearl-body) !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div[class*="md:grid"]:nth-child(odd) {
  background-color: #fafaf7 !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div[class*="md:grid"]:nth-child(even),
html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div.flex,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div.py-16 {
  background-color: #ffffff !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-main-table .space-y-0 > div[class*="md:grid"]:hover {
  background-color: #f3f3ee !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-next-high-strip {
  background-color: #fafaf7 !important;
  border: 1px solid rgba(11, 13, 12, 0.1) !important;
  box-shadow: none !important;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-tab-sep {
  background-color: rgba(11, 13, 12, 0.12) !important;
}

/* Negative values: same red family, at a strength readable on white */
html .calendar-page.calendar-luxury.calendar-page--light .text-red-400,
html .calendar-page.calendar-luxury.calendar-page--light .hover\:text-red-400:hover {
  color: #dc2626;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog {
  background-color: #ffffff !important;
  border: 1px solid rgba(11, 13, 12, 0.1);
  box-shadow:
    0 1px 2px rgba(11, 13, 12, 0.04),
    0 24px 64px -24px rgba(11, 13, 12, 0.32);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-body,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-header {
  color: rgba(11, 13, 12, 0.86);
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-header h3,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-body h4,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-body h5 {
  color: #0b0d0c;
}

html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-header h4,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-reading,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-meta,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-metric-label,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-benefit-desc,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-info-desc,
html .calendar-page.calendar-luxury.calendar-page--light .calendar-analysis-dialog .calendar-analysis-dialog-footer {
  color: rgba(11, 13, 12, 0.62);
}

/**
 * Recommendations channel embed — `<EconomicCalendar embed light />` on /vip-recommendations/live.
 * Everything is scoped to `.calendar-page--channel` (the embed root and its details dialog host), so /calendar
 * keeps its own layout. Colours come from the calendar palette variables (light palette in the channel).
 */

html .calendar-page.calendar-luxury.calendar-page--channel {
  --cal-channel-high: rgb(var(--cal-star-rgb));
  font-family: var(--zs-font-institutional, "Tajawal"), "Tajawal", system-ui, sans-serif;
  font-variant-numeric: lining-nums;
}

html .calendar-page.calendar-luxury.calendar-page--channel.calendar-page--light {
  /* Gold deepened so the high-importance words pass contrast on white. */
  --cal-channel-high: #7c5807;
}

/* ── Readability: nothing under 12px, secondary text at 13px, digits aligned ── */
html .calendar-page.calendar-page--channel .text-\[10px\],
html .calendar-page.calendar-page--channel .text-\[11px\] {
  font-size: 12px !important;
  line-height: 1.45;
}

html .calendar-page.calendar-page--channel .text-xs {
  font-size: 13px !important;
  line-height: 1.5;
}

html .calendar-page.calendar-page--channel .font-mono {
  font-family: inherit;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ── Head: scrolls with the page, no own canvas or shadow ── */
html .calendar-page.calendar-luxury.calendar-page--channel .calendar-page-head {
  background-color: transparent !important;
  box-shadow: none !important;
}

.calendar-page--channel .calendar-channel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 10px;
}

.calendar-page--channel .calendar-channel-date {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: rgb(var(--cal-fg-rgb));
}

.calendar-page--channel .calendar-channel-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(var(--cal-fg-rgb), 0.68);
}

.calendar-page--channel .calendar-channel-meta-strong {
  color: rgba(var(--cal-fg-rgb), 0.92);
  font-weight: 700;
}

.calendar-page--channel .calendar-channel-meta-high {
  color: var(--cal-channel-high);
  font-weight: 700;
}

/* ── Week: one compact row of days ── */
.calendar-page--channel .calendar-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.calendar-page--channel .calendar-week-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 52px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(var(--cal-line-rgb), 0.12);
  background: var(--cal-canvas, #ffffff);
  color: rgb(var(--cal-fg-rgb));
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.calendar-page--channel .calendar-week-day:hover {
  background: rgba(var(--cal-line-rgb), 0.035);
}

.calendar-page--channel .calendar-week-day[aria-pressed="true"] {
  border-color: rgba(var(--cal-line-rgb), 0.7);
  background: var(--cal-tile, #f6f6f2);
  box-shadow: inset 0 -2px 0 rgb(var(--cal-fg-rgb));
}

.calendar-page--channel .calendar-week-day-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.calendar-page--channel .calendar-week-day-count {
  display: flex;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.3;
  color: rgba(var(--cal-fg-rgb), 0.68);
  white-space: nowrap;
}

.calendar-page--channel .calendar-week-day-high {
  color: var(--cal-channel-high);
  font-weight: 700;
}

/* ── Quick filters ── */
.calendar-page--channel .calendar-channel-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-page--channel .calendar-channel-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-page--channel .calendar-channel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar-page--channel .calendar-channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--cal-line-rgb), 0.16);
  background: var(--cal-canvas, #ffffff);
  color: rgba(var(--cal-fg-rgb), 0.8);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-page--channel .calendar-channel-chip:hover {
  background: rgba(var(--cal-line-rgb), 0.04);
}

.calendar-page--channel .calendar-channel-chip[aria-pressed="true"],
.calendar-page--channel .calendar-channel-chip[aria-expanded="true"] {
  background: rgb(var(--cal-fg-rgb));
  border-color: rgb(var(--cal-fg-rgb));
  color: var(--cal-canvas, #ffffff);
}

.calendar-page--channel .calendar-channel-chip:focus-visible,
.calendar-page--channel .calendar-week-day:focus-visible,
.calendar-page--channel .calendar-channel-clear:focus-visible,
.calendar-page--channel .calendar-channel-active-chip button:focus-visible {
  outline: 2px solid rgb(var(--cal-fg-rgb));
  outline-offset: 2px;
}

.calendar-page--channel .calendar-channel-chip-stars {
  font-size: 11px;
  letter-spacing: -1px;
  color: var(--cal-channel-high);
}

.calendar-page--channel .calendar-channel-chip[aria-pressed="true"] .calendar-channel-chip-stars {
  color: #f2c94c;
}

.calendar-page--channel .calendar-channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgb(var(--cal-fg-rgb));
  color: var(--cal-canvas, #ffffff);
  font-size: 12px;
  font-weight: 700;
}

.calendar-page--channel .calendar-channel-chip[aria-expanded="true"] .calendar-channel-badge {
  background: var(--cal-canvas, #ffffff);
  color: rgb(var(--cal-fg-rgb));
}

.calendar-page--channel .calendar-channel-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.calendar-page--channel .calendar-channel-active-label {
  color: rgba(var(--cal-fg-rgb), 0.68);
  font-weight: 600;
}

.calendar-page--channel .calendar-channel-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-inline: 10px 2px;
  border-radius: 999px;
  border: 1px solid rgba(var(--cal-line-rgb), 0.12);
  background: var(--cal-tile, #f6f6f2);
  color: rgb(var(--cal-fg-rgb));
  font-weight: 600;
}

.calendar-page--channel .calendar-channel-active-chip button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(var(--cal-fg-rgb), 0.72);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.calendar-page--channel .calendar-channel-active-chip button:hover {
  background: rgba(var(--cal-line-rgb), 0.08);
}

.calendar-page--channel .calendar-channel-clear {
  min-height: 32px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: rgb(var(--cal-fg-rgb));
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Full filter panel, opened on demand */
.calendar-page--channel .calendar-filters-card {
  margin-bottom: 10px !important;
}

.calendar-page--channel .calendar-next-high-strip {
  padding: 8px 14px !important;
  border-radius: 10px !important;
}

/* ── Events ── */
.calendar-page--channel .calendar-table-head,
.calendar-page--channel .calendar-event-row {
  padding-inline: 20px !important;
  column-gap: 16px !important;
}

.calendar-page--channel .calendar-table-head {
  padding-block: 10px !important;
}

.calendar-page--channel .calendar-event-row .text-sm {
  font-size: 15px;
}

.calendar-page--channel .calendar-event-row[data-importance="high"],
.calendar-page--channel .calendar-event-card[data-importance="high"] {
  box-shadow: inset -3px 0 0 var(--cal-channel-high);
}

.calendar-page--channel[dir="ltr"] .calendar-event-row[data-importance="high"],
.calendar-page--channel[dir="ltr"] .calendar-event-card[data-importance="high"] {
  box-shadow: inset 3px 0 0 var(--cal-channel-high);
}

.calendar-page--channel .calendar-importance-word {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(var(--cal-fg-rgb), 0.62);
}

.calendar-page--channel [data-importance="high"] .calendar-importance-word {
  color: var(--cal-channel-high);
  font-weight: 700;
}

.calendar-page--channel .calendar-day-group {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: rgba(var(--cal-fg-rgb), 0.8) !important;
}

@media (max-width: 767px) {
  /* Rows of chips and days scroll sideways instead of wrapping into a tall block. */
  .calendar-page--channel .calendar-week-days {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin-inline: -16px;
    padding-inline: 16px;
    padding-bottom: 2px;
  }

  .calendar-page--channel .calendar-week-days::-webkit-scrollbar,
  .calendar-page--channel .calendar-channel-chips::-webkit-scrollbar {
    display: none;
  }

  .calendar-page--channel .calendar-week-day {
    flex: 0 0 auto;
    min-width: 96px;
    scroll-snap-align: start;
  }

  .calendar-page--channel .calendar-channel-filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-page--channel .calendar-channel-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .calendar-page--channel .calendar-channel-chip {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 12px;
  }

  /* The show/filters group wraps, so the filters button is never pushed off screen
     (narrower chips keep the three on one line at 360px+). */
  .calendar-page--channel .calendar-channel-chips + .calendar-channel-chips {
    flex-wrap: wrap;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .calendar-page--channel .calendar-channel-chips + .calendar-channel-chips .calendar-channel-chip {
    padding: 0 10px;
  }

  .calendar-page--channel .calendar-channel-chip-stars {
    display: none;
  }

  .calendar-page--channel .calendar-main-table {
    border-radius: 12px !important;
  }

  .calendar-page--channel .calendar-event-card {
    padding: 14px 16px !important;
  }

  .calendar-page--channel .calendar-event-card dd {
    font-size: 15px;
  }

  .calendar-page--channel .calendar-event-action {
    width: 100%;
    justify-content: center;
    min-height: 44px !important;
  }

  /* Details: a bottom sheet; the header with the close button stays put while the body scrolls. */
  .calendar-page--channel .calendar-analysis-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .calendar-page--channel .calendar-analysis-dialog {
    width: 100% !important;
    max-width: none !important;
    max-height: 88dvh !important;
    border-radius: 18px 18px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom);
  }

  html .calendar-page.calendar-luxury.calendar-page--channel .calendar-analysis-dialog .calendar-analysis-dialog-close {
    top: 10px;
    inset-inline-start: 10px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (pointer: coarse) {
  .calendar-page--channel .calendar-channel-chip,
  .calendar-page--channel .calendar-event-action {
    min-height: 44px !important;
  }
}

