/* Hide Toast UI Calendar grid selection highlights.
   We use our own event form, not Toast UI's form popup,
   so the selection overlay serves no purpose and stacks
   opacity on repeated clicks (Toast UI bug). */
.toastui-calendar-grid-selection,
.toastui-calendar-accumulated-grid-selection {
  background-color: transparent !important;
  border-color: transparent !important;
  pointer-events: none !important;
}

/* Constrain the event detail popup so long descriptions
   don't push the popup past the viewport. The popup becomes
   scrollable when content exceeds 60vh. */
.toastui-calendar-popup-container {
  max-height: 60vh !important;
  overflow-y: auto !important;
}

/* Force readable text color in the detail popup.
   Toast UI does not set an explicit color, so it inherits
   from wp-admin which can result in washed-out text. */
.toastui-calendar-detail-container {
  color: #1d2327 !important;
}

.toastui-calendar-detail-container .toastui-calendar-content {
  color: #2c3338 !important;
}

.toastui-calendar-template-popupDetailDate,
.toastui-calendar-template-popupDetailLocation,
.toastui-calendar-template-popupDetailState,
.toastui-calendar-template-popupDetailAttendees {
  color: #2c3338 !important;
}

/* Keep description text from dominating the popup.
   Full text is still reachable by scrolling or via
   "View Event Details". */
.toastui-calendar-template-popupDetailBody {
  max-height: 120px;
  overflow-y: auto;
  position: relative;
  color: #2c3338 !important;
}

.toastui-calendar-template-popupDetailBody p,
.toastui-calendar-template-popupDetailBody span,
.toastui-calendar-template-popupDetailBody div,
.toastui-calendar-template-popupDetailBody li {
  color: #2c3338 !important;
}

/* Force dark popup text regardless of theme inheritance */
.toastui-calendar-detail-container * {
  color: #1d2327;
}

.toastui-calendar-detail-container a {
  color: #2271b1 !important;
}

.toastui-calendar-template-popupDetailBody::-webkit-scrollbar {
  width: 4px;
}

.toastui-calendar-template-popupDetailBody::-webkit-scrollbar-thumb {
  background: #c3c4c7;
  border-radius: 2px;
}
