
/* bricksextras styles */

.x-calendar-wrapper {
    width: 100%;
}

.x-calendar {
  /* buttons - transparent background, dark text to match v6 */
  --fc-classic-button: transparent;
  --fc-classic-button-border: #ddd;
  --fc-classic-button-strong: #f4f4f4;
  --fc-classic-button-strong-border: #ddd;
  --fc-classic-button-outline: #47556980;
  --fc-classic-button-foreground: #111;
  --fc-classic-button-strong-foreground: #111; /* custom: active/hover text color */

  /* primary - dark to match v6 event colors */
  --fc-classic-primary: #111;
  --fc-classic-primary-foreground: #fff;

  /* calendar content - events dark (#111), today light (#f5f5f5) */
  --fc-classic-event: #111;
  --fc-classic-event-contrast: #fff;
  --fc-classic-background-event: #64748b;
  --fc-classic-background-event-opacity: 10%;
  --fc-classic-background-event-foreground-opacity: 80%;
  --fc-classic-highlight: #cffafe66;
  --fc-classic-today: #f5f5f5;
  --fc-classic-now: #ef4444;
  /* non-colors */
  --fc-classic-small-dot-width: 8px;
  --fc-classic-large-dot-width: 10px;

  /* neutral backgrounds */
  --fc-classic-background: #ffffff;
  --fc-classic-faint: #0000000A;
  --fc-classic-muted: #00000008;
  --fc-classic-strong: #00000024;

  /* neutral foregrounds */
  --fc-classic-foreground: #030712;
  --fc-classic-faint-foreground: #555;
  --fc-classic-muted-foreground: #444;

  /* neutral borders */
  --fc-classic-border: #e6e6e6;
  --fc-classic-strong-border: #9ca3af;

  /* event padding */
  --fc-classic-event-padding: 3px;
  
}

.x-calendar [role=button] {
    cursor: pointer;
}

.x-calendar [type=button] {
    transition: all .1s ease;
}

/* Apply custom active/hover text color to buttons */
.x-calendar [type=button][aria-selected="true"],
.x-calendar [type=button]:hover,
.x-calendar [type=button]:active {
    color: var(--fc-classic-button-strong-foreground);
}

.x-calendar .fc-toolbar button {
    border-style: var(--fc-classic-border-style);
    border-width: 1px;
    border-radius: 0;
}

.x-calendar-event-inner {
      padding: var(--fc-classic-event-padding);
}

@media not print {
  [data-brx-theme=dark] :where(.x-calendar) {
    /* calendar content */
    --fc-classic-highlight: #3b82f633;
    --fc-classic-today: #222;

    /* neutral backgrounds */
    --fc-classic-background: #111;
    --fc-classic-faint: #ffffff0A;
    --fc-classic-muted: #ffffff14;
    --fc-classic-strong: #ffffff24;

    /* neutral foregrounds */
    --fc-classic-foreground: #fff;
    --fc-classic-faint-foreground: #999;
    --fc-classic-muted-foreground: #9ca3af;
    --fc-classic-button-foreground: #fff;

    /* neutral borders */
    --fc-classic-border: #1f2937;
    --fc-classic-strong-border: #374151;

    --fc-classic-event: #fff;
    --fc-classic-event-contrast: #111;

    /* buttons - dark mode selected/hover states */
    --fc-classic-button-border: #374151;
    --fc-classic-button-strong: #ffffff24;
    --fc-classic-button-strong-border: #374151;
    --fc-classic-button-strong-foreground: #fff; /* custom: active/hover text color */
  }
}

:where(.fc-header-toolbar) {
    gap: 1em;
}

@media (max-width: 767px) {
   :where(.x-calendar) .fc-header-toolbar.fc-toolbar {
        flex-direction: column;
    }
     :where(.x-calendar) .fc-footer-toolbar.fc-toolbar {
        flex-direction: column;
    }
}
