/* 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;
}

/* Week and day views draw the current-time line across today's column on
   top of the events, and it took the click: an event clicked where the line
   crosses it opened nothing. The line is only a marker; let clicks through
   to the event beneath it. */
.toastui-calendar-timegrid-now-indicator,
.toastui-calendar-timegrid-now-indicator * {
    pointer-events: none;
}

/* Month view's "+N more" link sits in the cell footer, below the day's
   events (src/monthMore.js). Toast UI still renders an empty button for it
   in the header beside the date; hide that one. */
.toastui-calendar-grid-cell-header .toastui-calendar-grid-cell-more-events {
    display: none;
}
.toastui-calendar-grid-cell-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 4px;
}
/* Toast floats the button right; under the events it reads as their
   continuation, so left-align it. */
.toastui-calendar-grid-cell-footer .toastui-calendar-grid-cell-more-events {
    float: none;
    margin: 0;
    padding: 0 2px;
    height: auto;
    line-height: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #2271b1;
    background: none;
    border: none;
    cursor: pointer;
}
.toastui-calendar-grid-cell-footer .toastui-calendar-grid-cell-more-events:hover,
.toastui-calendar-grid-cell-footer .toastui-calendar-grid-cell-more-events:focus {
    text-decoration: underline;
}
