/* Event color variables */
:root {
    --event-default-color: #2196F3; /* Changed to a nice blue */
    --event-default-text: #ffffff;
    --holiday-color: #e31b23;
    --holiday-bg: #fff5f5;
    --course-color: #4CAF50;
  }
  
  /* Calendar container stays fluid */
  .fyc-fullcalendar{ max-width:100%; }
  
  /* Increase day cell height */
  .fc .fc-daygrid-day {
    min-height: 150px !important;
  }
  
  /* Adjust day number position */
  .fc .fc-daygrid-day-top {
    padding: 8px !important;
  }
  
  /* Give more space for events */
  .fc .fc-daygrid-day-events {
    margin-top: 4px !important;
    padding: 0 8px !important;
  }
  
  /* Gray out previous month days */
  .fc .fc-day-other {
    background-color: #f8f9fa !important;
  }
  .fc .fc-day-other .fc-daygrid-day-top a {
    color: #adb5bd !important;
    opacity: 1 !important;
  }
  
  /* Tooltip card */
  .fyc-fc-tooltip {
    position: absolute;
    z-index: 9999;
    display: none;
    min-width: 250px;
    background: #fff;
    color: #111;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    border: 1px solid rgba(0,0,0,.1);
  }
  
  .fyc-fc-tooltip .fyc-tip-title {
    font-weight: 600;
    margin-bottom: 8px;
  }
  
  .fyc-fc-tooltip .fyc-tip-row {
    color: #666;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .fyc-fc-tooltip .fyc-ico {
    opacity: 0.7;
    font-size: 16px;
  }
  
  .fyc-fc-tooltip .fyc-tip-excerpt {
    margin-top: 8px;
    color: #666;
    font-style: italic;
  }
  .fyc-fc-tooltip.show{ display:block; }
  
  /* --- Side arrow for tooltip (flips automatically) --- */
  .fyc-fc-tooltip::after{
    content:"";
    position:absolute;
    width:0; height:0;
    border:none;
  }
  .fyc-fc-tooltip.side-right::after{
    left:-8px; top:12px;
    border-width:8px 8px 8px 0;
    border-style:solid;
    border-color: transparent #fff transparent transparent;
    filter: drop-shadow(-1px 1px 1px rgba(0,0,0,.08));
  }
  .fyc-fc-tooltip.side-left::after{
    right:-8px; top:12px;
    border-width:8px 0 8px 8px;
    border-style:solid;
    border-color: transparent transparent transparent #fff;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,.08));
  }
  
  .fyc-tip-title{ font-weight:700; margin-bottom:6px; }
  .fyc-tip-row{ margin-top:6px; display:flex; align-items:flex-start; gap:6px; }
  .fyc-ico{ opacity:.85; }
  .fyc-tip-thumb{ margin-top:10px; }
  .fyc-tip-thumb img{ display:block; max-width:100%; height:auto; border-radius:6px;width:100%;}
  .fyc-tip-excerpt{ margin-top:8px; opacity:.9; }
  
  /* Holiday styling */
  .fc .fc-daygrid-day.holiday-day {
    background-color: #fff5f5 !important;
  }
  
  .holiday-event {
    background: none !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  .holiday-event .fc-event-title {
    text-align: center;
    font-size: 0.85em;
    padding: 2px 4px;
    font-weight: 600;
    color: #e31b23 !important;
  }
  
  /* Event styling */
  .fc .fc-daygrid-event {
    padding: 2px 4px !important;
    margin: 1px 0 !important;
    border-radius: 4px !important;
  }
  
  .fc .fc-daygrid-event .fc-event-time{ 
    display:none!important; 
  }
  
  .fc .fc-daygrid-event .fc-event-title{ 
    white-space:normal;
    padding: 0 !important;
  }
  
  /* List view (mobile) styles */
  .fc .fc-list{ border:0; }
  .fc .fc-list-event-dot { display: none !important; } /* Hide default dots */
  
  .fyc-list-item { 
    position: relative;
    padding-left: 24px;
  }
  
  /* Event indicators */
  .fyc-list-indicator {
    position: absolute;
    left: 0;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 2px;
  }
  
  .fyc-list-title{ font-weight:700; }
  .fyc-list-meta{ margin-top:4px; font-size:12px; opacity:.8; }
  .fyc-list-excerpt{ margin-top:6px; font-size:13px; line-height:1.4; }
  .holiday-list-item {
    background-color: #fff5f5;
  }
  
  /* Toolbar title capitalize (month names) */
  .fc .fc-toolbar-title{ text-transform:capitalize; }
  
  /* Loading overlay */
  .fyc-fc-wrap{ position:relative; }
  .fyc-fc-loading{
    position:absolute;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.6);
    backdrop-filter:saturate(150%) blur(2px);
    z-index: 999;
  }
  .fyc-fc-loading.show{ display:flex; }
  .fyc-spinner{
    width:34px; height:34px;
    border-radius:50%;
    border:3px solid rgba(0,0,0,.15);
    border-top-color:#2a5bd7;
    animation:fyc-spin 1s linear infinite;
  }
  @keyframes fyc-spin{ to{ transform: rotate(360deg); } }
  
  
  .fyc-fc-tooltip.side-top::after {
    bottom: -8px; left: 50%; transform: translateX(-50%);
    border-width: 8px 8px 0 8px; border-style: solid;
    border-color: #fff transparent transparent transparent;
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,.08));
  }
  .fyc-fc-tooltip.side-bottom::after {
    top: -8px; left: 50%; transform: translateX(-50%);
    border-width: 0 8px 8px 8px; border-style: solid;
    border-color: transparent transparent #fff transparent;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.08));
  }
  
  @media screen and (max-width:675px) {
    .fc .fc-toolbar-title{
      font-size:1rem;
    }
  }