/* PHM Calendar Widget
   ------------------------------------------------------------ */

.phm-cal-widget {
    font-size: 16px;
    line-height: 1.4;
    min-height: 295px;
    display: flex;
    flex-direction: column;
}

/* ---- Day group ---- */

.phm-cal-day {
    margin-bottom: 1.5em;
}

.phm-cal-day:last-child {
    margin-bottom: 0;
}

.phm-cal-day-label {
    margin: 0 0 0.6em;
    padding: 0 0 0.35em;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    border-bottom: 2px solid #e8e8e8;
}

/* ---- Event list — reset all theme styles ---- */

.phm-cal-events {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.phm-cal-events li,
.phm-cal-event {
    list-style: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.phm-cal-events li::before,
.phm-cal-events li::after,
.phm-cal-event::before,
.phm-cal-event::after {
    display: none !important;
    content: none !important;
}

/* ---- Individual event card ---- */

.phm-cal-event {
    display: flex !important;
    flex-direction: column;
    gap: 0.15em;
    padding: 0.55em 0.6em !important;
    margin-bottom: 0.4em !important;
    border-left: 3px solid var(--light-color);
    background: #f8f9fa !important;
    border-radius: 0 4px 4px 0;
}

.phm-cal-event:last-child {
    margin-bottom: 0 !important;
}

/* ---- Event title ---- */

.phm-cal-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.3;
    margin-left: 5px;
}

.phm-cal-title a {
    color: inherit;
    text-decoration: none;
}

.phm-cal-title a:hover {
    color: var(--light-color);
}

/* ---- Event time ---- */

.phm-cal-time {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    background: var(--light-color);
    padding: 0.1em 0.45em;
    border-radius: 3px;
    white-space: nowrap;
    align-self: flex-start;
    order: -1; /* time appears above title */
}

/* All-day events get a softer colour */
.phm-cal-event--all-day .phm-cal-time {
    background: #555555;
}

.phm-cal-event--all-day {
    border-left-color: #555555;
}

/* ---- Location ---- */

.phm-cal-location {
    font-size: 16px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phm-cal-location::before {
    content: "📍 ";
    font-style: normal;
}

/* ---- Empty / error states ---- */

.phm-cal-footer {
    text-align: right;
    margin: auto 0 0;
    padding-top: 0.75em;
    font-size: 16px;
}

.phm-cal-footer a {
    color: #0000af;
    font-weight: 800;
}

.phm-cal-footer a:hover {
    color: var(--light-color);
}

.phm-cal-empty,
.phm-cal-notice {
    color: #bbb;
    font-size: 16px;
    margin: 0;
    font-style: italic;
}
