/*
Theme Name: Staff Intranet
Author: Werner Pries
Description: A custom theme for HSD Staff Intranet.
Version: 1.0.0
Text Domain: Staff Intranet
Tags: 
*/
/* HSD Calendar plugin */
.hsd-calendar-legend {
    margin-bottom: 10px;
}

.hsd-toggle {
    cursor: pointer;
    margin-right: 12px;
    opacity: 1;
}

.hsd-toggle.inactive {
    opacity: 0.8;
}

.color-box {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--color);
    margin-right: 5px;
}
.hsd-calendar {
    max-width: 100%;
    margin: 0 auto;
    /* flexible height: FullCalendar will adjust */
    height: auto;
    min-height: 500px;  /* optional, ensures month view is tall enough */
}
.hsd-calendar-wrapper {
    overflow: hidden; /* prevent extra scroll */
}

.hsd-calendar-legend {
    margin-bottom: 10px; /* fine, not too tall */
}
.hsd-toggle .color-box { display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: middle; background-color: var(--color); }
.hsd-toggle.inactive { color: #222; }
.hsd-toggle.active { font-weight: bold; }

.fc-timegrid-event.fc-timegrid-event-short {
    min-height: 25px;       /* ensures text fits */
    padding: 2px 4px;
    line-height: 1.2em;
}

.fc-timegrid-event .fc-event-main {
    white-space: normal;
    overflow: visible;
}

/* Optional: force text to be readable */
.fc-timegrid-event .fc-event-title {
    white-space: normal;
    overflow: visible;
    color: #fff;            /* ensures contrast */
}

/* Remove the tiny dot for timed events */
.fc-timegrid-event .fc-event-dot {
    display: none;
}
.fc-h-event .fc-event-main {
    color: inherit !important;
}
.fc-event-main {
    white-space: normal;    /* allow line breaks */
    overflow: visible;      /* prevent clipping */
    word-wrap: break-word;  /* break long words if necessary */
    line-height: 1.2em;    /* optional, adjusts spacing for readability */
	padding: 2px;
}
.fc-timegrid-event.fc-timegrid-event-short {
    min-height: 25px;       /* ensures text fits */
    padding: 2px 4px;
    line-height: 1.2em;
}
/* Overlay */
/* Overlay */
#hsd-event-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;       /* vertical center */
    justify-content: center;   /* horizontal center */
    text-align: center;        /* ensures inline-block content centers */
}

/* Dark background */
.hsd-event-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

/* Popup box */
.hsd-event-content {
    position: relative;
    background: #fff;
    width: auto;
    max-width: 50%;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    z-index: 2;
}
.hsd-event-popup h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
/* Close button */
.hsd-close {
    position: absolute;
    right: 10px;
    top: 5px;
    cursor: pointer;
    font-size: 20px;
}
.hsd-event-calendar {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 20px;
    opacity: 0.8;
}
.fc-col-header-cell {
	background: #228ccc;
}
.fc-col-header-cell-cushion {
    font-weight: bold;
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase;
}
/* Lighten all primary buttons */
.fc {
    --fc-button-bg-color: #c0c0c0;      /* light gray background */
    --fc-button-active-bg-color: #f0f0f0;      /* light gray background */
    --fc-button-border-color: #ccc;     /* lighter border */
    --fc-button-text-color: #222;       /* dark text for contrast */
}

/* Optional: hover effect */
.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus {
    background-color: #e0e0e0;  /* lighter gray on hover */
    color: #222;                /* keep text dark */
    border-color: #bbb;         /* optional: slightly darker border */
}
/* Force FullCalendar header to stack vertically on small screens */
@media (max-width: 600px) {
  .fc-header-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;  /* centers everything horizontally */
  }
  .fc-header-toolbar .fc-toolbar-chunk {
    width: 100%;
    display: flex;
    justify-content: center; /* center buttons/title in each row */
    margin-bottom: 4px; /* optional spacing */
  }
}
.hsd-upcoming-events-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hsd-upcoming-events-widget li {
    display: flex;
    gap: 10px;
    align-items: flex-start; /* key fix */
    padding: 2px 2px;      /* add some space inside each row */
    border-bottom: 1px solid #ddd;  /* subtle divider */
}

.hsd-event-date {
    width: 55px;
    flex-shrink: 0;
    text-align: left;
}

.hsd-event-title {
    text-align: left;
}
.hsd-upcoming-events-widget li:nth-child(even) {
    background-color: #ffffff; /* white */
}

.hsd-upcoming-events-widget li:nth-child(odd) {
    background-color: #e5e5e5; /* light gray */
}
@media print {
    body * {
        visibility: hidden;
    }
    .hsd-calendar, .hsd-calendar * {
        visibility: visible;
    }
    .hsd-calendar {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}