:root {
  --participate-border: #d8d3cb;
  --participate-accent: #f8bf7d;
  --participate-accent-soft: #fcd6aa;
  --participate-success-text: rgba(2, 27, 24, 0.877);
  --participate-success: rgba(31, 122, 111, 0.18);
  --participate-warning: #f08d5c;
  --participate-error-text: #810606ee;
  --participate-error: #f0a5a5;
}

#participate {
  min-height: 720px;
  color: var(--colour-text-dark);
  font-family: "Philosopher", sans-serif;
}

.participate-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.participate-calendar,
.participate-panel {
  background: none;
}

.participate-calendar {
  min-height: 560px;
}

.participate-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--color-text-dark);
  font-size: 1rem;
}

.participate-panel p {
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
  font-size: 1rem;
}

/* Toggle Pill Navigation */
.participate-toggle {
  display: flex;
  gap: 0.5rem;
  border: 1px solid var(--color-bg);
  background: var(--color-support);
  border-radius: 999px;
  width: 100%;
  padding: 0.25rem;
}

.participate-toggle-option {
  border: none;
  background: transparent;
  color: rgba(128, 0, 0, 0.8);
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
}

.participate-toggle-option.active {
  background: var(--color-primary);
  color: var(--color-bg);
}

.participate-content {
  display: none;
}

.participate-content.active {
  display: block;
  padding: 0rem 0.5rem 0rem 0.5rem;
}

.participate-panel .panel-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.participate-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.participate-field label {
  font-size: 1rem;
  color: var(--color-text-light);
}

.participate-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.participate-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--colour-text-dark);
}

.participate-radio input {
  accent-color: var(--color-primary);
}

.participate-field input,
.participate-field select {
  border: 1px solid var(--participate-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--color-text-dark);
  outline: none;
  transition: border 0.2s ease;
}

.participate-field select option:disabled {
  color: rgba(120, 120, 120, 0.7);
}

.participate-actions {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.participate-actions .splash-btn {
  border: none;
}

.participate-status {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1rem;
}

.participate-status.info {
  background: var(--participate-warning);
  color: var(--color-text-light);
}

.participate-status.success {
  background: var(--participate-success);
  color: var(--participate-success-text);
}

.participate-status.error {
  background: var(--participate-error);
  color: var(--participate-error-text);
}

.participate-slot {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.participate-slot strong {
  color: var(--color-text-light);
  font-weight: normal;
}

.participate-existing {
  font-size: 1rem;
  color: var(--color-text-light);
}

.participate-existing strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

.fc {
  font-family: inherit;
  font-size: 1rem;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
  color: var(--color-text-dark);
  text-decoration: none;
}

.fc .fc-col-header-cell {
  background: var(--color-primary);
}

.fc .fc-col-header-cell-cushion {
  color: var(--color-support);
  font-weight: 600;
  padding: 6px 0;
}

.fc .fc-event {
  border: none;
  border-radius: 10px;
  padding: 2px 6px;
}

.participate-event {
  background: var(--participate-accent);
  color: #145a51;
}

.participate-event-full {
  background: rgba(184, 90, 42, 0.18);
  color: var(--participate-warning);
  cursor: not-allowed;
  pointer-events: none;
}

.participate-event-past {
  background: rgba(184, 90, 42, 0.18);
  color: var(--participate-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.participate-event .fc-event-time {
  color: var(--color-primary);
  font-weight: 600;
}

/* Ensure the inner table doesn't have margins */
.fc-scrollgrid-section-body table {
  margin: 0;
}

/* Remove shadows */
.fc,
.fc *,
.fc-scrollgrid {
  box-shadow: none;
}

/* Reduce the gap between the Header and the Day Grid */
.fc-col-header {
  margin-bottom: 0;
}

/* Make the header background transparent */
.fc-theme-standard th {
  background: none !important;
}

/* Remove zebra row background in the day grid */
.fc .fc-daygrid-body tr,
.fc .fc-scrollgrid-section {
  background: transparent !important;
}

/* Restore bottom border on month grid */
.fc .fc-scrollgrid {
  border: 1px solid var(--participate-border);
}

/* Ensure the event container stacks children vertically */
.fc-daygrid-event {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 4px 8px !important;
  white-space: normal !important;
  cursor: pointer;
}

/* Style the Time (Top Line) */
.fc-event-time {
  font-size: 0.8rem;
  margin-bottom: 2px;
}

/* Style the Title (Bottom Line) */
.fc-event-title {
  font-size: 0.8rem;
  font-weight: normal !important;
  color: var(--color-text-light) !important;
}

@media (max-width: 480px) {
  .fc-event-time {
    font-size: 0.5rem;
  }

  .fc-event-title {
    font-size: 0.5rem;
  }
}

.fc-event:hover {
  color: var(--color-text-light) !important;
}

/* Remove the default 'dot'*/
.fc-daygrid-event-dot {
  display: none !important;
}

.participate-calendar-toolbar {
  display: flex;
  flex-direction: column; /* Stacked for small screens */
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: flex-start;
}

.toolbar-nav-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Spacer is invisible on mobile, expands on desktop */
.toolbar-spacer {
  display: none;
}

/* Large Screen Logic */
@media (min-width: 680px) {
  .participate-calendar-toolbar {
    flex-direction: row; /* Single row */
    align-items: center;
  }

  .toolbar-spacer {
    display: block;
    flex-grow: 1; /* Pushes the next element to the far right */
  }

  .toolbar-action-group {
    margin-left: auto;
  }
}

/* Button & Font Refinement */
.nav-btn-today {
  border: 1px solid var(--participate-border);
  background: transparent;
  color: var(--colour-text-dark);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  height: 34px;
  line-height: 1;
  white-space: nowrap;
}

.nav-btn-today:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.circular-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--participate-border);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
}

.circular-btn:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.circular-btn:first-child {
  font-size: 1.2rem;
  font-weight: 900;
}

.participate-calendar-title {
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--colour-text-dark);
  white-space: nowrap;
}

#participate-timezone-select {
  min-width: 220px;
  border: 1px solid var(--participate-border);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--color-bg);
  font-family: inherit !important;
  outline: none !important;
  cursor: pointer;
}

#participate-timezone-select:focus {
  border-color: var(--color-primary) !important;
}

.fc .fc-daygrid-day.fc-day-today {
  background-color: var(--participate-accent-soft);
}

.fc-daygrid-event-harness {
  margin: 2px;
}

.fc-daygrid-day-events {
  margin: 0 0 0.5rem 0 !important;
}
