/**
 * ====================================================================
 * Events Calendar CSS (Year & Month) - Saudi MOH / DGA (English / LTR)
 * 100% Compliant with DGA Design System (Platforms Code)
 * Isolated & self-contained without any CSS conflicts
 * ====================================================================
 */

:root {
  /* DGA Official Color Palette Tokens (SA Primary & Neutrals) */
  --moh-green: #1B8354;
  --moh-green-hover: #166A45;
  --moh-green-active: #104631;
  --moh-green-light: #F3FCF6;
  --moh-green-tint: #ECFDF3;
  --moh-text-main: #0D121C;
  --moh-text-secondary: #384250;
  --moh-text-muted: #6C737F;
  --moh-border: #D2D6DB;
  --moh-border-subtle: #E5E7EB;
  --moh-border-input: #9DA4AE;
  --moh-border-focus: #1B8354;
  --moh-bg-card: #FFFFFF;
  --moh-bg-page: #F9FAFB;

  /* DGA Official Border Radius Tokens (www.design.dga.gov.sa) */
  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Mappings */
  --moh-radius-sm: var(--radius-sm);
  --moh-radius-md: var(--radius-md);
  --moh-radius-lg: var(--radius-lg);
  --moh-radius-xl: var(--radius-xl);

  /* DGA Form Input Tokens */
  --Radius-radius-sm: var(--radius-sm);
  --Form-field-border-default: var(--moh-border-input);
  --Form-field-background-default: #FFFFFF;
  --Form-input-padding: 0 14px;
  --Form-input-gap: 8px;

  /* DGA Official Spacing Tokens */
  --spacing-none: 0px;
  --spacing-xxs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 6px;
  --spacing-md: 8px;
  --spacing-lg: 12px;
  --spacing-xl: 16px;
  --spacing-2xl: 20px;
  --spacing-3xl: 24px;
  --spacing-4xl: 32px;
  --spacing-5xl: 40px;

  /* DGA Official Container Widths */
  --container-max-width-desktop: 1280px;
  --container-padding-desktop: 32px;
  --container-padding-mobile: 16px;

  /* DGA Official Elevation & Shadow Tokens */
  --shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  --shadow-xl: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
  --shadow-2xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);
  --shadow-3xl: 0 32px 64px -12px rgba(16, 24, 40, 0.14);

  /* DGA Official Backdrop Blur Tokens */
  --backdrop-blur-sm: 8px;
  --backdrop-blur-md: 16px;
  --backdrop-blur-lg: 24px;
  --backdrop-blur-xl: 40px;

  /* DGA Event Category Colors */
  --ev-conferences: #175CD3;
  --ev-consultation: #8254A1;
  --ev-gathering: #0E9384;
  --ev-campaign: #D92D20;
  --ev-award: #C11574;
  --ev-world-day: #F79009;
  --ev-initiative: #B87B02;
}

/* ==========================================================================
   1. General Container & Layout (LTR)
   ========================================================================== */
body {
  background-color: transparent !important;
}

.moh-events-wrapper {
  width: 100%;
  /* max-width: var(--container-max-width-desktop, 1280px); */
  margin: 0 auto;
  /* padding: 0 var(--container-padding-desktop, 32px) 40px; */
  box-sizing: border-box;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
  direction: ltr;
  text-align: left;
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .moh-events-wrapper {
    padding: 0 var(--container-padding-mobile, 16px) 32px;
  }
}

.moh-events-wrapper * {
  box-sizing: border-box;
}

/* ==========================================================================
   2. Top Header & Switcher (LTR)
   ========================================================================== */
.moh-events-top {
  margin-bottom: var(--spacing-3xl, 24px);
}

.moh-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.moh-page-title {
  color: var(--moh-green) !important;
  font-size: clamp(22px, 3vw, 30px) !important;
  font-weight: 700 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  font-family: inherit !important;
}

.moh-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* DGA Segmented Switcher */
.moh-view-switcher {
  display: inline-flex;
  align-items: center;
  height: 40px;
  background-color: #F3F4F6 !important;
  border: 1px solid #D2D6DB !important;
  border-radius: var(--radius-md, 8px) !important;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: var(--shadow-xs);
  gap: 0;
}

.moh-switcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 20px;
  background-color: transparent !important;
  color: #101828 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  outline: none;
  user-select: none;
  text-decoration: none !important;
  position: relative;
}

.moh-switcher-btn:hover:not(.active) {
  background-color: #E5E7EB !important;
  color: #101828 !important;
}

/* Active Selected Item: Dark background with white text (Official DGA) */
.moh-switcher-btn.active {
  background-color: #0D121C !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  cursor: default;
}

/* Focused State on Active Item: crisp inner white focus border (Matches spec image) */
.moh-switcher-btn.active:focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: -3px !important;
}

/* Focused State on Inactive Item */
.moh-switcher-btn:not(.active):focus-visible {
  outline: 2px solid #0D121C !important;
  outline-offset: -3px !important;
}

/* Subtle 1px divider between inactive buttons */
.moh-switcher-btn:not(:last-child):not(.active) {
  border-inline-end: 1px solid #D2D6DB !important;
}

/* "Add to Calendar" (ICS export) button - sits next to the switcher */
.moh-btn-add-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--moh-text-main, #101828) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--moh-border, #D2D6DB) !important;
  border-radius: var(--radius-md, 8px) !important;
  cursor: pointer !important;
  box-shadow: var(--shadow-xs) !important;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.moh-btn-add-calendar:hover {
  background: #F9FAFB !important;
  border-color: var(--moh-green, #1B8354) !important;
  color: var(--moh-green, #1B8354) !important;
}

.moh-btn-add-calendar:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354);
  outline-offset: 2px;
}

.moh-btn-add-calendar i {
  font-size: 14px;
}

@media (max-width: 576px) {
  .moh-btn-add-calendar span {
    display: none;
  }
  .moh-btn-add-calendar {
    padding: 0 12px;
  }
}

/* ==========================================================================
   3. Main Body Card (DGA Elevation & Radius)
   ========================================================================== */
.moh-events-body {
  background: var(--moh-bg-card);
  border: 1px solid var(--moh-border-subtle);
  border-radius: var(--radius-xl, 24px);
  padding: var(--spacing-4xl, 32px);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .moh-events-body {
    padding: var(--container-padding-mobile, 16px);
    border-radius: var(--radius-lg, 16px);
  }
}

/* ==========================================================================
   4. Filter Bar (DGA Specifications - LTR)
   ========================================================================== */
.moh-filters-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr auto;
  gap: var(--spacing-xl, 16px);
  align-items: flex-end;
  margin-bottom: var(--spacing-4xl, 32px);
  padding-bottom: var(--spacing-3xl, 24px);
  border-bottom: 1px solid var(--moh-border-subtle, #E5E7EB);
}

@media (max-width: 992px) {
  .moh-filters-grid {
    grid-template-columns: 1fr 1fr;
  }
  .moh-col-search {
    grid-column: span 2;
  }
  .moh-col-actions {
    grid-column: span 2;
  }
  .moh-label-spacer {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .moh-filters-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg, 12px);
    margin-bottom: var(--spacing-3xl, 24px);
    padding-bottom: var(--spacing-2xl, 20px);
  }
}

.moh-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.moh-field-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--moh-text-secondary) !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.moh-label-spacer {
  visibility: hidden;
}

/* Search input with left icon for LTR */
.moh-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  align-self: stretch;
}

.moh-search-icon {
  position: absolute;
  right: 14px;
  left: auto;
  color: var(--moh-text-muted);
  pointer-events: none;
  font-size: 14px;
}

.moh-input-control {
  display: flex !important;
  height: 40px !important;
  padding: 0 14px 0 40px !important;
  align-items: center !important;
  align-self: stretch !important;
  border-radius: var(--Radius-radius-sm, 4px) !important;
  border: 1px solid var(--Form-field-border-default, #9DA4AE) !important;
  background: var(--Form-field-background-default, #FFFFFF) !important;
  width: 100%;
  font-family: inherit !important;
  font-size: 14px !important;
  color: #101828 !important;
  outline: none !important;
  box-sizing: border-box;
  background-image: linear-gradient(#161616, #161616) !important;
  background-size: 0 2px !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
  transition: background-size 0.3s ease-in-out, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.moh-input-control:focus {
  border-color: #161616 !important;
  background-size: 100% 2px !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
}

/* ==========================================================================
   5. Custom DGA Select Dropdown (LTR)
   ========================================================================== */
.dga-select-custom {
  position: relative;
  width: 100%;
  align-self: stretch;
}

.dga-select-custom.is-open {
  z-index: 10001;
}

.dga-select-trigger {
  display: flex !important;
  height: 40px !important;
  padding: var(--Form-input-padding, 0 14px) !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: var(--Form-input-gap, 8px) !important;
  align-self: stretch !important;
  border-radius: var(--Radius-radius-sm, 4px) !important;
  border: 1px solid var(--Form-field-border-default, #9DA4AE) !important;
  background: var(--Form-field-background-default, #FFFFFF) !important;
  width: 100%;
  cursor: pointer;
  font-family: inherit !important;
  font-size: 14px !important;
  color: #101828 !important;
  text-align: left !important;
  outline: none !important;
  box-sizing: border-box;
  background-image: linear-gradient(#161616, #161616) !important;
  background-size: 0 2px !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
  transition: background-size 0.3s ease-in-out, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.dga-select-trigger:hover {
  border-color: #475467 !important;
}

.dga-select-trigger:focus,
.dga-select-trigger:focus-visible {
  border-color: #161616 !important;
  background-size: 100% 2px !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05) !important;
}

.dga-select-custom.is-open .dga-select-trigger {
  border-color: #161616 !important;
  background-size: 100% 2px !important;
}

.dga-select-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #101828;
}

.dga-select-text.is-placeholder {
  color: #667085;
}

.dga-select-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-size: 12px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.dga-select-custom.is-open .dga-select-arrow {
  transform: rotate(180deg);
  color: #101828;
}

.dga-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #D2D6DB;
  border-radius: var(--radius-sm, 4px);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  z-index: 10002;
  display: none;
  direction: ltr;
  text-align: left;
}

.dga-select-custom.is-open .dga-select-menu {
  display: block;
}

.dga-select-option {
  padding: 9px 14px;
  font-size: 14px;
  color: #344054;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  text-align: left;
}

.dga-select-option:hover,
.dga-select-option.is-focused {
  background: #F9FAFB;
  color: var(--moh-green);
}

.dga-select-option.is-selected {
  background-color: transparent !important;
  background: transparent !important;
  color: #101828 !important;
  font-weight: 600 !important;
}

.moh-native-select-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* ==========================================================================
   6. Search & Reset Buttons (DGA Standards)
   ========================================================================== */
.moh-btn-search {
  height: 40px !important;
  padding: 0 20px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  background: var(--moh-green) !important;
  border: none !important;
  border-radius: var(--radius-sm, 4px) !important;
  cursor: pointer !important;
  box-shadow: var(--shadow-xs) !important;
  transition: background 0.2s ease, box-shadow 0.2s ease !important;
}

.moh-btn-search:hover {
  background: var(--moh-green-hover) !important;
}

.moh-btn-search:active {
  background: var(--moh-green-active) !important;
}

.moh-btn-search:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354);
  outline-offset: 2px;
}

.moh-btn-reset {
  height: 40px !important;
  width: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
  border: 1px solid var(--moh-border) !important;
  border-radius: var(--radius-sm, 4px) !important;
  color: var(--moh-text-secondary) !important;
  cursor: pointer !important;
  font-size: 14px !important;
  box-shadow: var(--shadow-xs) !important;
  transition: all 0.2s ease !important;
}

.moh-btn-reset:hover {
  background: #F9FAFB !important;
  border-color: #9DA4AE !important;
  color: var(--moh-green) !important;
}

.moh-btn-reset:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354);
  outline-offset: 2px;
}

/* ==========================================================================
   7. Toolbar (Navigation, Today & Count Badge - LTR)
   ========================================================================== */
.moh-toolbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--moh-border-subtle);
  margin-bottom: 24px;
}

.moh-calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moh-toolbar-title {
  margin: 0 12px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--moh-text-main) !important;
  font-family: inherit !important;
  min-width: 90px;
  text-align: center;
}

.moh-nav-arrow {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid var(--moh-border);
  border-radius: var(--radius-sm, 4px);
  color: var(--moh-text-main);
  cursor: pointer;
  font-size: 13px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.moh-nav-arrow:hover {
  background: #F9FAFB;
  border-color: #9DA4AE;
  color: var(--moh-green);
}

.moh-nav-arrow:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354);
  outline-offset: 1px;
}

.moh-btn-today {
  height: 36px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--moh-text-main);
  background: #FFFFFF;
  border: 1px solid var(--moh-border);
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.moh-btn-today:hover {
  background: #F9FAFB;
  border-color: #9DA4AE;
  color: var(--moh-green);
}

.moh-btn-today:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354);
  outline-offset: 1px;
}

.moh-btn-today.is-current {
  background: var(--moh-green-tint) !important;
  border-color: var(--moh-green) !important;
  color: var(--moh-green) !important;
}

/* Results Badge (Official DGA tag-green) */
.moh-results-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #085D3A !important;
  background: #ECFDF3 !important;
  border: 1px solid #ABECF6;
  border-radius: var(--radius-full, 9999px);
}

/* ==========================================================================
   8. Legend Bar (LTR)
   ========================================================================== */
.moh-legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-md, 8px) var(--spacing-lg, 12px);
  margin-bottom: var(--spacing-3xl, 24px);
  padding: 0;
  list-style: none;
}

.moh-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: #F9FAFB;
  border: 1px solid var(--moh-border-subtle, #E5E7EB);
  border-radius: var(--radius-full, 9999px);
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--moh-text-secondary, #384250) !important;
}

.moh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-conferences { background: var(--ev-conferences); }
.dot-consultation { background: var(--ev-consultation); }
.dot-gathering { background: var(--ev-gathering); }
.dot-campaign { background: var(--ev-campaign); }
.dot-award { background: var(--ev-award); }
.dot-world-day { background: var(--ev-world-day); }
.dot-initiative { background: var(--ev-initiative); }

/* ==========================================================================
   9. Year View Grid (DGA Layout - 3 columns desktop, 2 tablet, 1 mobile)
   ========================================================================== */
.moh-calendar-grid, .moh-year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-3xl, 24px);
}

@media (max-width: 992px) {
  .moh-calendar-grid, .moh-year-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .moh-calendar-grid, .moh-year-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl, 16px);
  }
}

/* Month Box */
.moh-month-box {
  background: #FFFFFF;
  border: 1px solid var(--moh-border-subtle);
  border-radius: var(--radius-lg, 16px);
  padding: 16px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.moh-month-box:hover {
  border-color: #D2D6DB;
  box-shadow: var(--shadow-md);
}

.moh-month-name {
  margin: 0 0 14px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--moh-green) !important;
  text-align: center;
  font-family: inherit !important;
  cursor: pointer;
  transition: color 0.15s ease;
  outline: none;
  display: block;
}

.moh-month-name:hover {
  color: var(--moh-green-hover) !important;
  text-decoration: underline;
}

.moh-month-name:focus-visible {
  outline: 3px solid var(--moh-green);
  outline-offset: 2px;
  border-radius: var(--radius-sm, 4px);
}

.moh-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  text-align: center;
}

.moh-weekdays-row span {
  font-size: 11px;
  font-weight: 600;
  color: var(--moh-text-muted);
}

.moh-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.moh-day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 4px);
  font-size: 12px;
  font-weight: 500;
  color: var(--moh-text-main);
  background: transparent;
  position: relative;
  transition: all 0.15s ease;
  user-select: none;
}

.moh-day-cell.empty {
  visibility: hidden;
  pointer-events: none;
}

.moh-day-cell.is-today {
  border: 1px solid var(--moh-green);
  font-weight: 700;
  color: var(--moh-green);
}

.moh-day-cell.has-events {
  cursor: pointer;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

.moh-day-cell.has-events:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.moh-day-cell:focus-visible {
  outline: 3px solid var(--moh-green, #1B8354) !important;
  outline-offset: 2px !important;
  z-index: 20;
}

/* ==========================================================================
   10. Month View (Single Month Detailed Grid - LTR)
   ========================================================================== */
.moh-month-view-container {
  width: 100%;
  max-width: 100%;
  display: block;
}

.moh-single-month-wrap {
  background-color: #FFFFFF;
  border: 1px solid var(--moh-border, #D2D6DB);
  border-radius: var(--radius-lg, 16px) !important;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.moh-single-month-header {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background-color: #F8F9FA;
  border-bottom: 1px solid var(--moh-border-subtle, #E5E7EB);
  text-align: center;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--moh-text-secondary, #384250) !important;
  padding: 12px 0;
  box-sizing: border-box;
}

.moh-single-month-header > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.moh-single-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background-color: var(--moh-border-subtle, #E5E7EB);
  width: 100%;
  box-sizing: border-box;
}

.moh-single-day-box {
  background-color: #FFFFFF;
  min-height: 115px;
  padding: var(--spacing-md, 8px);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.15s;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.moh-single-day-box:hover {
  background-color: #FAFAFA;
}

.moh-single-day-box.other-month {
  background-color: #F9FAFB;
  opacity: 0.45;
}

.moh-single-day-box.is-today {
  background-color: var(--moh-green-light, #F3FCF6);
}

.moh-single-day-box.is-today .moh-single-day-num {
  color: #FFFFFF !important;
  background-color: var(--moh-green, #1B8354);
}

.moh-single-day-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 6px;
}

.moh-single-day-num {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--moh-text-main, #0D121C) !important;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.moh-single-events-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs, 4px);
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.moh-event-pill {
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  color: #FFFFFF !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-decoration: none !important;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.moh-event-pill:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.moh-event-pill.dark-text {
  color: #101828 !important;
}

.moh-more-pill {
  display: block;
  padding: 2px 6px;
  background-color: #F1F5F9;
  color: #475569 !important;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm, 4px);
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  text-decoration: none !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.moh-more-pill:hover {
  background-color: #E2E8F0;
  color: #1E293B !important;
  border-color: #94A3B8;
}

.moh-wd-short {
  display: none;
}

@media (max-width: 768px) {
  .moh-wd-full {
    display: none;
  }
  .moh-wd-short {
    display: inline;
  }
  .moh-single-month-header {
    font-size: 11px !important;
    padding: 8px 0;
  }
  .moh-single-day-box {
    min-height: 60px;
    padding: 4px;
  }
  .moh-single-day-num {
    width: 20px;
    height: 20px;
    font-size: 11px !important;
  }
  .moh-event-pill {
    padding: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 2px auto 0;
    font-size: 0 !important;
  }
  .moh-more-pill {
    padding: 0;
    font-size: 9px !important;
  }
}

/* ==========================================================================
   11. Popover & Mobile Bottom Sheet (LTR)
   ========================================================================== */
.moh-popover {
  position: absolute;
  z-index: 999999 !important;
  background-color: #FFFFFF;
  border: 1px solid var(--moh-border, #D2D6DB);
  border-radius: var(--radius-lg, 16px);
  padding: 14px 16px;
  box-shadow: var(--shadow-xl);
  min-width: 250px;
  max-width: 320px;
  width: max-content;
  text-align: left;
  direction: ltr;
  font-family: 'IBM Plex Sans', sans-serif !important;
  animation: mohFadeIn 0.2s ease-out;
}

/* Arrow indicator for selected day (Matches placement-top in AR) */
.moh-popover.placement-top::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #FFFFFF transparent transparent transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.08));
}

.moh-popover.placement-bottom::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #FFFFFF transparent;
  filter: drop-shadow(0 -2px 1px rgba(0, 0, 0, 0.08));
}

/* Active anchor cell highlights */
.moh-day-cell.is-popover-open {
  box-shadow: 0 0 0 2px var(--moh-green), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  transform: scale(1.08);
  z-index: 25 !important;
}

.moh-single-day-box.is-popover-open {
  border-color: var(--moh-green) !important;
  box-shadow: 0 0 0 2px rgba(31, 122, 79, 0.25) !important;
  z-index: 25 !important;
}

@keyframes mohFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.moh-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--moh-border, #E5E7EB);
}

.moh-popover-date {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--moh-text-main) !important;
  margin: 0 !important;
}

.moh-popover-close {
  background: transparent !important;
  border: none !important;
  font-size: 20px;
  line-height: 1;
  color: var(--moh-text-muted) !important;
  cursor: pointer;
  padding: 0 4px;
}

.moh-popover-close:hover {
  color: #DC2626 !important;
}

.moh-popover-item {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  color: #FFFFFF !important;
  cursor: pointer;
}

.moh-popover-link {
  color: #FFFFFF !important;
  text-decoration: none !important;
  display: block;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4;
}

.moh-popover-link:hover,
.moh-popover-link:visited {
  color: #FFFFFF !important;
  text-decoration: none !important;
}

.moh-popover-meta {
  font-size: 11px !important;
  opacity: 0.92;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF !important;
}

.moh-event-pill.dark-text,
.moh-popover-item.dark-text,
.moh-popover-item.dark-text .moh-popover-link,
.moh-popover-item.dark-text .moh-popover-meta,
.moh-sheet-card.dark-text,
.moh-sheet-card.dark-text .moh-sheet-card-title,
.moh-sheet-card.dark-text .moh-sheet-meta-row {
  color: #101828 !important;
}

.moh-popover-item.dark-text .moh-popover-meta,
.moh-sheet-card.dark-text .moh-sheet-meta-row {
  opacity: 0.85;
}

/* ==========================================================================
   11. Mobile Bottom Sheet Modal (DGA Specification - LTR)
   ========================================================================== */
.moh-sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(var(--backdrop-blur-sm, 8px));
  -webkit-backdrop-filter: blur(var(--backdrop-blur-sm, 8px));
  z-index: 99998;
  animation: mohBackdropFadeIn 0.25s ease-out;
}

@keyframes mohBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.moh-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background-color: #FFFFFF;
  border-radius: var(--radius-xl, 24px) var(--radius-xl, 24px) 0 0;
  box-shadow: 0 -24px 48px -12px rgba(16, 24, 40, 0.18);
  z-index: 99999;
  padding: 12px 20px 28px;
  box-sizing: border-box;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  animation: mohSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  direction: ltr;
  text-align: left;
  font-family: 'IBM Plex Sans', sans-serif !important;
}

@keyframes mohSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.moh-sheet-handle-bar {
  width: 40px;
  height: 4px;
  background-color: var(--moh-border, #D2D6DB);
  border-radius: var(--radius-xs, 2px);
  margin: 0 auto 14px;
  cursor: grab;
}

.moh-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--moh-border, #E5E7EB);
}

.moh-sheet-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moh-sheet-calendar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--moh-green-light, #F3FCF6);
  color: var(--moh-green, #1B8354);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.moh-sheet-date-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--moh-text-main, #0D121C) !important;
  margin: 0 !important;
}

.moh-sheet-close-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background-color: #F1F5F9 !important;
  border: none !important;
  color: #475569 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.moh-sheet-close-btn:hover {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
}

.moh-sheet-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.moh-sheet-card {
  border-radius: 12px;
  padding: 14px 16px;
  color: #FFFFFF !important;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moh-sheet-card-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  margin: 0 !important;
}

.moh-sheet-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px !important;
  opacity: 0.95;
  flex-wrap: wrap;
}

.moh-sheet-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.moh-sheet-card.dark-text .moh-sheet-badge {
  background-color: rgba(0, 0, 0, 0.08);
}

.moh-sheet-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  margin-top: 4px;
  border-radius: 8px;
  background-color: #FFFFFF !important;
  color: var(--moh-text-main, #0D121C) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  align-self: flex-start;
  transition: all 0.2s ease;
}

.moh-sheet-btn-link:hover {
  background-color: #F8FAFC !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   12. Empty State (LTR)
   ========================================================================== */
.moh-empty-state {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  background-color: #FAFAFA;
  border: 2px dashed #E5E7EB;
  border-radius: var(--radius-xl, 24px);
  margin: 12px 0;
  box-sizing: border-box;
}

.moh-empty-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background-color: #F1F5F9;
  color: var(--moh-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.moh-empty-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--moh-text-main) !important;
  margin: 0 0 8px !important;
  font-family: inherit !important;
}

.moh-empty-desc {
  font-size: 14px !important;
  color: var(--moh-text-muted) !important;
  margin: 0 0 20px !important;
  max-width: 460px;
  line-height: 1.5;
  font-family: inherit !important;
}

.moh-empty-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--moh-green);
  border: none;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.2s ease;
}

.moh-empty-reset-btn:hover {
  background-color: var(--moh-green-hover);
}

.moh-empty-reset-btn:focus-visible {
  outline: 3px solid var(--moh-green);
  outline-offset: 2px;
}


/* ==========================================================================
   Ø­Ø§Ù„Ø© Ø§Ù„Ø®Ø·Ø£ Ù„Ø­Ù‚ÙˆÙ„ Ø§Ù„Ø¥Ø¯Ø®Ø§Ù„ (DGA Form Input Error State - Error 700: #B42318)
   Ù…Ø·Ø§Ø¨Ù‚Ø© Ø¨Ù†Ø³Ø¨Ø© 100% Ù„Ù„ØµÙˆØ±Ø© Ø§Ù„Ù…Ø±ÙÙ‚Ø© ÙˆÙ…ÙˆØ§ØµÙØ§Øª ÙƒÙˆØ¯ Ù…Ù†ØµØ§Øª DGA
   ========================================================================== */
.moh-input-control.has-error,
.moh-input-control.is-invalid,
.moh-input-control[aria-invalid="true"],
.has-error .moh-input-control {
  border-color: #B42318 !important;
  background-image: linear-gradient(#B42318, #B42318) !important;
  background-size: 100% 2px !important;
  box-shadow: 0 1px 2px rgba(180, 35, 24, 0.08) !important;
}

.moh-input-control.has-error:focus,
.moh-input-control.is-invalid:focus,
.has-error .moh-input-control:focus {
  border-color: #B42318 !important;
  background-size: 100% 2px !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15), 0 1px 2px rgba(180, 35, 24, 0.08) !important;
}

.dga-select-custom.has-error .dga-select-trigger,
.dga-select-trigger.has-error,
.dga-select-trigger.is-invalid,
.dga-select-trigger[aria-invalid="true"] {
  border-color: #B42318 !important;
  background-image: linear-gradient(#B42318, #B42318) !important;
  background-size: 100% 2px !important;
  box-shadow: 0 1px 2px rgba(180, 35, 24, 0.08) !important;
}

.dga-select-custom.has-error .dga-select-trigger:focus,
.dga-select-custom.has-error .dga-select-trigger:focus-visible,
.dga-select-custom.has-error.is-open .dga-select-trigger {
  border-color: #B42318 !important;
  background-size: 100% 2px !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15), 0 1px 2px rgba(180, 35, 24, 0.08) !important;
}
/* ==========================================================================
   Ù‚Ø§Ø¦Ù…Ø© Ø®ÙŠØ§Ø±Ø§Øª DGA Ø§Ù„Ù…Ù†Ø³Ø¯Ù„Ø© (DGA Dropdown Menu & Option Interaction States)
   Ù…Ø·Ø§Ø¨Ù‚Ø© 100% Ù„Ù„ØµÙˆØ±Ø© Ø§Ù„Ù…Ø±ÙÙ‚Ø© ÙˆÙ…ÙˆØ§ØµÙØ§Øª ÙƒÙˆØ¯ DGA Platforms Code
   ========================================================================== */
.dga-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid #D2D6DB;
  border-radius: var(--radius-sm, 4px);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px !important;
  list-style: none;
  z-index: 10002;
  display: none;
  box-sizing: border-box;
}

.dga-select-custom.is-open .dga-select-menu {
  display: block;
}

/* Ø§Ù„Ø®ÙŠØ§Ø± Ø§Ù„Ø§ÙØªØ±Ø§Ø¶ÙŠ (Default State) */
.dga-select-option {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 36px !important;
  padding: 8px 12px !important;
  margin-bottom: 2px !important;
  border-radius: var(--radius-sm, 4px) !important;
  border: 2px solid transparent !important;
  background-color: transparent !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #101828 !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, border-color 0.15s ease !important;
  box-sizing: border-box !important;
  user-select: none !important;
  white-space: nowrap !important;
}

/* 1. Hover State (Gray 100) */
.dga-select-option:hover {
  background-color: #F3F4F6 !important;
  color: #101828 !important;
}

/* 2. Active / Pressed State (Gray 200) */
.dga-select-option:active {
  background-color: #E5E7EB !important;
}

/* 3. Focused State / Keyboard Navigation (2px Solid Black Border) */
.dga-select-option.is-focused,
.dga-select-option:focus-visible {
  border-color: #161616 !important;
  background-color: #FFFFFF !important;
  outline: none !important;
}

.dga-select-option.is-focused:hover {
  background-color: #F3F4F6 !important;
}

/* 4. Selected State with Checkmark (No Background) */
.dga-select-option.is-selected {
  background-color: transparent !important;
  background: transparent !important;
  color: #101828 !important;
  font-weight: 600 !important;
}

.dga-select-option::after {
  content: "";
  display: none;
  width: 13px;
  height: 11px;
  background-image: url("check-icon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  margin-inline-start: 12px;
}

.dga-select-option.is-selected::after {
  display: inline-block !important;
}

.dga-select-option.is-selected:hover {
  background-color: #F3F4F6 !important;
}

.dga-select-option.is-selected.is-focused {
  border-color: #161616 !important;
}