/* events-calendar.css (from style.css L1792-L2352) */
/* ======================================================
   FULLCALENDAR (dark theme + event date picker)
====================================================== */

.ce-picker-calendar,
#calendar,
#communityEventsCalendar {
  --ce-calendar-header-bg: #0b1220;
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(7, 10, 15, 0.55);
  --fc-neutral-text-color: var(--muted);
  --fc-border-color: rgba(0, 230, 255, 0.28);
  --fc-button-text-color: var(--text);
  --fc-button-bg-color: rgba(7, 10, 15, 0.6);
  --fc-button-border-color: rgba(0, 230, 255, 0.35);
  --fc-button-hover-bg-color: rgba(0, 230, 255, 0.12);
  --fc-button-hover-border-color: rgba(0, 230, 255, 0.55);
  --fc-button-active-bg-color: rgba(0, 230, 255, 0.2);
  --fc-button-active-border-color: rgba(0, 230, 255, 0.65);
  --fc-today-bg-color: rgba(0, 230, 255, 0.1);
  --fc-now-indicator-color: #00e6ff;
  --fc-event-bg-color: rgba(0, 179, 255, 0.55);
  --fc-event-border-color: rgba(0, 230, 255, 0.5);
  --fc-event-text-color: #031018;
  --fc-more-link-bg-color: rgba(7, 10, 15, 0.8);
  --fc-more-link-text-color: var(--text);
}

.ce-picker-calendar {
  max-width: 100%;
  position: relative;
}

.ce-picker-calendar .fc {
  font-size: 0.9rem;
}

/* Opaque weekday row so scrolling event rows do not show through */
.ce-picker-calendar .fc-col-header,
.ce-picker-calendar .fc-col-header-cell,
.ce-picker-calendar .fc-scrollgrid-section-header,
.ce-picker-calendar .fc-scrollgrid-section-header .fc-scrollgrid-sync-table {
  background-color: var(--ce-calendar-header-bg) !important;
}

.ce-picker-calendar .fc-col-header-cell-cushion {
  background-color: var(--ce-calendar-header-bg);
}

/* FullCalendar sticks direct children of the header section (not the section itself) */
.ce-picker-calendar .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {
  position: sticky !important;
  top: var(--ce-calendar-header-top, 0) !important;
  z-index: 6 !important;
  background-color: var(--ce-calendar-header-bg) !important;
  box-shadow: 0 2px 8px rgba(7, 10, 15, 0.92);
}

.ce-picker-calendar .fc .fc-scrollgrid-section-sticky.fc-scrollgrid-section-header,
.ce-picker-calendar .fc .fc-scrollgrid-section-sticky .fc-col-header-cell {
  background-color: var(--ce-calendar-header-bg) !important;
}

.ce-picker-calendar.ce-calendar-header-past-end .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {
  box-shadow: none !important;
}

.ce-picker-calendar .fc-listMonth-view .fc-list-day-cushion.fc-scrollgrid-sticky,
.ce-picker-calendar .fc-listMonth-view .fc-scrollgrid-sticky .fc-list-day-cushion {
  position: sticky;
  top: var(--ce-calendar-header-top, 0) !important;
  background-color: var(--ce-calendar-header-bg) !important;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(7, 10, 15, 0.92);
}

.ce-picker-calendar.ce-calendar-header-past-end .fc-listMonth-view .fc-scrollgrid-sticky .fc-list-day-cushion {
  box-shadow: none !important;
}

.ce-picker-calendar .fc-listMonth-view .fc-list-day-cushion,
.ce-picker-calendar .fc-listMonth-view .fc-list-day th {
  background-color: var(--ce-calendar-header-bg) !important;
  z-index: 2;
}

.ce-picker-calendar .fc-daygrid-day.ce-picker-day-selected {
  background: rgba(0, 230, 255, 0.18) !important;
  outline: 1px solid rgba(0, 230, 255, 0.55);
  outline-offset: -1px;
}

.ce-picker-calendar .fc-daygrid-day:not(.fc-day-disabled) {
  cursor: pointer;
}

.ce-picker-calendar .fc-daygrid-day:not(.fc-day-disabled):hover {
  background: rgba(0, 230, 255, 0.08);
}

.ce-picker-event-community {
  --fc-event-bg-color: rgba(0, 230, 255, 0.5);
  cursor: pointer;
}

.ce-picker-event-community.ce-picker-event-past {
  --fc-event-bg-color: rgba(0, 230, 255, 0.22);
  opacity: 0.85;
}

.ce-picker-event-tribe {
  --fc-event-bg-color: rgba(140, 190, 255, 0.4);
}

.ce-events-section,
.ce-past-events {
  min-width: 0;
  max-width: 100%;
}

.ce-events-section summary,
.ce-past-events summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  margin: 0;
  max-width: 100%;
}

.ce-events-section summary::-webkit-details-marker,
.ce-past-events summary::-webkit-details-marker {
  display: none;
}

.ce-events-section summary::before,
.ce-past-events summary::before {
  content: "";
  flex-shrink: 0;
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.05em;
  border: solid rgba(0, 230, 255, 0.85);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  box-sizing: border-box;
}

.ce-events-section[open] summary::before,
.ce-events-section.is-open summary::before,
.ce-past-events[open] summary::before,
.ce-past-events.is-open summary::before {
  transform: rotate(45deg);
}

@media (min-width: 768px) {
  .ce-events-section summary,
  .ce-past-events summary {
    gap: 0.55rem;
  }

  .ce-events-section summary::before,
  .ce-past-events summary::before {
    width: 0.55em;
    height: 0.55em;
    border-width: 0 3px 3px 0;
  }
}

#ceUpcomingEventsPanel,
#cePastEventsPanel {
  min-width: 0;
  max-width: 100%;
}

.ce-events-section-pager,
.ce-past-events-pager {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(0, 230, 255, 0.15);
}

#communityEventList {
  min-width: 0;
  max-width: 100%;
}

#communityEventList .tron-card {
  min-width: 0;
  max-width: 100%;
}

#communityEventList .tron-card.ce-event-card-highlight {
  outline: 2px solid rgba(0, 230, 255, 0.7);
  outline-offset: 2px;
  box-shadow: 0 0 16px rgba(0, 230, 255, 0.25);
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

.ce-picker-calendar.ce-calendar-create-enabled .fc-daygrid-day:not(.fc-day-disabled) {
  cursor: pointer;
}

.tron-card .ce-participant-list .ce-discord-profile-link {
  color: #7ee8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tron-card .ce-participant-list .ce-discord-profile-link:hover {
  color: #00e6ff;
}

.tron-card .ce-location-list li {
  position: relative;
  padding-left: 0.85rem;
}

.tron-card .ce-location-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ======================================================
   FULLCALENDAR EVENT STYLING
====================================================== */

/* Single-line titles; min-width:0 lets flex/grid shrink so ellipsis works instead of hard cutoff */
.fc-daygrid-day-events,
.fc-daygrid-event-harness,
.fc-daygrid-event {
  min-width: 0;
}

.fc-daygrid-event {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fc-daygrid-event-title,
.fc-daygrid-event .fc-event-title {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Events schedule picker: no bullet; wrap titles on desktop month grid only */
.ce-picker-calendar .fc-daygrid-event-dot {
  display: none;
}

.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-event,
.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-block-event,
.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-block-event .fc-event-main,
.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-event-title,
.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-event .fc-event-title,
.ce-picker-calendar:not(.ce-picker-calendar--mobile) .fc-daygrid-event .fc-event-title-container {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  line-height: 1.3;
}

.ce-picker-calendar .fc-daygrid-event-harness {
  position: relative !important;
  height: auto !important;
  margin-bottom: 2px;
}

.ce-picker-calendar .fc-daygrid-block-event .fc-event-main {
  padding: 1px 3px;
}

/* Events schedule: mobile-friendly layout */
@media (max-width: 767.98px) {
  .ce-picker-calendar--mobile .fc-toolbar {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    margin-bottom: 0.65rem !important;
  }

  .ce-picker-calendar--mobile .fc-toolbar-chunk {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ce-picker-calendar--mobile .fc-toolbar-title {
    font-size: 1.05rem;
  }

  .ce-picker-calendar--mobile .fc-button {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

  /* Month grid (tablet / fallback): single-line labels */
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-col-header-cell,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-col-header-cell-cushion {
    background-color: var(--ce-calendar-header-bg) !important;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-col-header-cell-cushion {
    font-size: 0.65rem;
    padding: 0.2rem 0;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-day-number {
    font-size: 0.72rem;
    padding: 0.15rem 0.35rem;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-day-frame {
    min-height: 2.75rem;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-event,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-block-event,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-event-title,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-event .fc-event-title,
  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-event .fc-event-title-container {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-block-event .fc-event-main {
    padding: 1px 2px;
  }

  .ce-picker-calendar--mobile .fc-dayGridMonth-view .fc-daygrid-more-link {
    font-size: 0.62rem;
  }

  /* List month (phones): readable stacked rows */
  .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-day-cushion {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    background-color: var(--ce-calendar-header-bg) !important;
    box-shadow: 0 2px 6px rgba(7, 10, 15, 0.85);
  }

  .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event {
    cursor: pointer;
  }

  .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-title {
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
  }

  .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-time {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-graphic {
    padding: 0.45rem 0 0.45rem 0.5rem;
  }

  /* Contain list calendar width so content below (past events) is not clipped */
  body.page-events main.container {
    max-width: 100%;
    overflow-x: clip;
  }

  body.page-events .tron-card:has(#communityEventsCalendar) {
    overflow: visible;
    min-width: 0;
  }

  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile,
  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile .fc,
  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile .fc-view-harness,
  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile .fc-scroller-harness,
  body.page-events #communityEventsCalendar.ce-picker-calendar--mobile .fc-scroller {
    max-width: 100%;
    min-width: 0;
  }

  body.page-events .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-table {
    width: 100% !important;
    table-layout: fixed;
  }

  body.page-events .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-time {
    width: 4.25rem;
    max-width: 4.25rem;
    padding-right: 0.35rem;
    vertical-align: top;
  }

  body.page-events .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-title {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.page-events .ce-picker-calendar--mobile .fc-listMonth-view .fc-list-event-graphic {
    width: 0.5rem;
    padding-left: 0.35rem;
    padding-right: 0.15rem;
  }

  body.page-events #communityEventList,
  body.page-events .ce-events-section,
  body.page-events .ce-past-events,
  body.page-events #ceUpcomingEventsPanel,
  body.page-events #cePastEventsPanel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}


/* ======================================================
   EVENTS — FORM FIELDS (dark theme, readable while typing)
====================================================== */

body.page-events #communityEventCreateModal .form-control,
body.page-events #communityEventCreateModal .form-select,
body.page-events #communityEventCreateModal textarea,
body.page-events #communityEventPresetModal .form-control,
body.page-events #communityEventPresetModal .form-select,
body.page-events #communityEventPresetModal textarea,
#eventDetailsModal .form-control,
#eventDetailsModal .form-select,
#eventDetailsModal textarea,
body.page-events .swal2-html-container .form-control,
body.page-events .swal2-input,
body.page-events .swal2-textarea,
body.page-events .swal2-select {
  color-scheme: dark;
  background-color: rgba(7, 10, 15, 0.6) !important;
  color: var(--text, #e8f7ff) !important;
  -webkit-text-fill-color: var(--text, #e8f7ff) !important;
  caret-color: var(--cyan, #00e6ff);
  border: 1px solid rgba(0, 230, 255, 0.35) !important;
}

body.page-events #communityEventCreateModal .form-control:hover,
body.page-events #communityEventCreateModal .form-select:hover,
body.page-events #communityEventCreateModal textarea:hover,
body.page-events #communityEventPresetModal .form-control:hover,
body.page-events #communityEventPresetModal .form-select:hover,
body.page-events #communityEventPresetModal textarea:hover,
#eventDetailsModal .form-control:hover,
#eventDetailsModal .form-select:hover,
#eventDetailsModal textarea:hover,
body.page-events .swal2-html-container .form-control:hover,
body.page-events .swal2-input:hover,
body.page-events .swal2-textarea:hover {
  background-color: rgba(7, 10, 15, 0.68) !important;
  color: var(--text, #e8f7ff) !important;
  -webkit-text-fill-color: var(--text, #e8f7ff) !important;
}

body.page-events #communityEventCreateModal .form-control:focus,
body.page-events #communityEventCreateModal .form-select:focus,
body.page-events #communityEventCreateModal textarea:focus,
body.page-events #communityEventPresetModal .form-control:focus,
body.page-events #communityEventPresetModal .form-select:focus,
body.page-events #communityEventPresetModal textarea:focus,
#eventDetailsModal .form-control:focus,
#eventDetailsModal .form-select:focus,
#eventDetailsModal textarea:focus,
body.page-events .swal2-html-container .form-control:focus,
body.page-events .swal2-input:focus,
body.page-events .swal2-textarea:focus,
body.page-events .swal2-select:focus {
  background-color: rgba(7, 10, 15, 0.75) !important;
  color: var(--text, #e8f7ff) !important;
  -webkit-text-fill-color: var(--text, #e8f7ff) !important;
  border-color: rgba(0, 230, 255, 0.65) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 230, 255, 0.18) !important;
}

body.page-events #communityEventCreateModal .form-control::placeholder,
body.page-events #communityEventCreateModal textarea::placeholder,
body.page-events #communityEventPresetModal .form-control::placeholder,
body.page-events #communityEventPresetModal textarea::placeholder,
#eventDetailsModal .form-control::placeholder,
#eventDetailsModal textarea::placeholder,
body.page-events .swal2-html-container .form-control::placeholder,
body.page-events .swal2-input::placeholder,
body.page-events .swal2-textarea::placeholder {
  color: rgba(232, 247, 255, 0.42) !important;
  -webkit-text-fill-color: rgba(232, 247, 255, 0.42) !important;
  opacity: 1;
}

body.page-events #communityEventCreateModal input:-webkit-autofill,
body.page-events #communityEventCreateModal input:-webkit-autofill:hover,
body.page-events #communityEventCreateModal input:-webkit-autofill:focus,
body.page-events #communityEventCreateModal textarea:-webkit-autofill,
body.page-events #communityEventCreateModal textarea:-webkit-autofill:hover,
body.page-events #communityEventCreateModal textarea:-webkit-autofill:focus,
body.page-events #communityEventPresetModal input:-webkit-autofill,
body.page-events #communityEventPresetModal input:-webkit-autofill:hover,
body.page-events #communityEventPresetModal input:-webkit-autofill:focus,
body.page-events .swal2-html-container input:-webkit-autofill,
body.page-events .swal2-input:-webkit-autofill,
body.page-events .swal2-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text, #e8f7ff) !important;
  box-shadow: 0 0 0 1000px rgba(7, 10, 15, 0.75) inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

body.page-events #communityEventCreateModal .form-select option,
body.page-events #communityEventPresetModal .form-select option,
#eventDetailsModal .form-select option,
body.page-events .swal2-select option {
  background-color: var(--panel, #0b1220);
  color: var(--text, #e8f7ff);
}

/* Date/time inputs: keep picker icons and typed values on-theme */
body.page-events #communityEventCreateModal input[type="date"],
body.page-events #communityEventCreateModal input[type="time"] {
  color-scheme: dark;
}

/* ======================================================
   EVENT DETAILS MODAL TEXT CONTROL
====================================================== */

/* Prevent horizontal overflow in modal */
#eventDetailsModal .modal-body {
  overflow-x: hidden;
}

/* Properly wrap long note content */
#eventDetailsModal #detailNotes {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}


