/* ==========================================================================
   Hello Events Calendar Widget
   ========================================================================== */

.hello-events-calendar {
  font-family: inherit;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   Navigation (prev / month label / next)
   -------------------------------------------------------------------------- */

.hello-events-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.hello-events-calendar__month-label {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hello-events-calendar__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition:
    opacity 0.2s ease,
    transform 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.hello-events-calendar__nav-btn:hover:not([disabled]) {
  transform: scale(1.1);
}

.hello-events-calendar__nav-btn[disabled],
.hello-events-calendar__nav-btn.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Two-column body layout
   -------------------------------------------------------------------------- */

.hello-events-calendar__body {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  background: #f7f8fa;
  border-radius: 16px;
  padding: 16px;
}

/* Left column — calendar grid, 50% width */
.hello-events-calendar__calendar-col {
  flex: 0 0 calc(50% - 16px);
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Calendar grid
   -------------------------------------------------------------------------- */

.hello-events-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Day-of-week header row */
.hello-events-calendar__weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  padding: 6px 0;
}

/* Individual day cell */
.hello-events-calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 400;
  color: inherit;
  background: transparent;
  transition: background-color 0.15s ease;
}

.hello-events-calendar__day--empty {
  background: transparent;
}

/* Day with a single-day event OR start day of a multi-day event */
.hello-events-calendar__day.has-event {
  background-color: #005fa3; /* overridden by Elementor accent color control */
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
}

/* Continuation day of a multi-day/long-term event — small yellow dot top-right */
.hello-events-calendar__day.has-event-multi {
  position: relative;
}

.hello-events-calendar__day.has-event-multi::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #f0c02a;
}

.hello-events-calendar__day-number {
  display: block;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Events list — right column, 50% width, scrollable
   -------------------------------------------------------------------------- */

.hello-events-calendar__events {
  flex: 0 0 calc(50% - 16px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  /* max-height matched to calendar column height by JS */
}

.hello-events-calendar__no-events {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 24px 0;
}

/* Single event card */
.hello-events-calendar__event {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: 10px;
  background: white;
  transition: box-shadow 0.2s ease;
}

.hello-events-calendar__event:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Thumbnail */
.hello-events-calendar__event-thumb {
  flex-shrink: 0;
  display: block;
  width: 100px;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.hello-events-calendar__event-thumb img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Body */
.hello-events-calendar__event-body {
  flex: 1;
  min-width: 0;
}

.hello-events-calendar__event-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #005fa3; /* overridden by accent color control */
}

.hello-events-calendar__event-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.hello-events-calendar__event-title a {
  color: inherit;
  text-decoration: none;
}

.hello-events-calendar__event-title a:hover {
  text-decoration: underline;
}

.hello-events-calendar__event-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 4px;
}

.hello-events-calendar__pin-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.hello-events-calendar__event-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Loading state
   -------------------------------------------------------------------------- */

.hello-events-calendar.is-loading .hello-events-calendar__grid,
.hello-events-calendar.is-loading .hello-events-calendar__events {
  opacity: 0.5;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Responsive — tablet (< 992px): stack columns to 100%
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .hello-events-calendar__body {
    flex-direction: column;
    gap: 40px;
  }

  .hello-events-calendar__calendar-col,
  .hello-events-calendar__events {
    flex: 0 0 100%;
    width: 100%;
    max-height: none !important; /* remove JS-set height */
  }

  .hello-events-calendar__month-label {
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Responsive — mobile (< 600px)
   -------------------------------------------------------------------------- */

@media (max-width: 599px) {
  .hello-events-calendar__event {
    flex-direction: column;
    gap: 14px;
  }

  .hello-events-calendar__event-thumb {
    width: 100%;
  }

  .hello-events-calendar__event-thumb img {
    width: 100%;
    height: 180px;
  }

  .hello-events-calendar__day {
    font-size: 0.75rem;
  }
}
