/* Essaouira UI — Year Calendar v0.1, desktop-first */
.ec-year-calendar { display: none; }

@media (min-width: 768px) {
  .ec-year-calendar {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
  }

  .ec-year-calendar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 28px;
    border: 1px solid rgba(91, 7, 87, .22);
    border-radius: 999px;
    background: #5b0757;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(91, 7, 87, .18);
  }

  .ec-year-calendar__overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    padding: 18px;
    background: rgba(31, 21, 28, .72);
    overflow: auto;
  }

  .ec-year-calendar__overlay[hidden] { display: none !important; }

  .ec-year-calendar__dialog {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 22px;
    border-radius: 28px;
    background: #fffaf3;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
  }

  .ec-year-calendar__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
  }

  .ec-year-calendar__header h2 {
    margin: 0 0 6px;
    color: #2d252b;
    font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  }

  .ec-year-calendar__header p { margin: 0; color: #6f656b; }

  .ec-year-calendar__close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #5b0757;
    color: #fff;
    font-size: 1.75rem;
    cursor: pointer;
  }

  .ec-year-calendar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    color: #554950;
    font-size: .88rem;
  }

  .ec-year-calendar__legend-item { display: inline-flex; align-items: center; gap: 7px; }
  .ec-year-calendar__legend-dot { width: 11px; height: 11px; border-radius: 50%; }

  .ec-year-calendar__months {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .ec-year-calendar__month {
    padding: 10px;
    border: 1px solid rgba(91, 7, 87, .12);
    border-radius: 18px;
    background: #fff;
  }

  .ec-year-calendar__month h3 {
    margin: 0 0 8px;
    color: #5b0757;
    text-align: center;
    font-size: 1rem;
    text-transform: capitalize;
  }

  .ec-year-calendar__weekdays,
  .ec-year-calendar__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }

  .ec-year-calendar__weekday {
    padding-bottom: 3px;
    color: #8a7d84;
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
  }

  .ec-year-calendar__day {
    position: relative;
    min-width: 0;
    aspect-ratio: 1;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #3b3137;
    font-size: .76rem;
  }

  button.ec-year-calendar__day { cursor: pointer; font-weight: 700; }
  button.ec-year-calendar__day:hover,
  button.ec-year-calendar__day:focus-visible { outline: 2px solid #5b0757; outline-offset: 1px; }
  .ec-year-calendar__day--empty { visibility: hidden; }
  .ec-year-calendar__day--bookable { background: #e4f7e9; color: #12652e; }
  .ec-year-calendar__day--waiting-list { background: #fff0d8; color: #8a4f00; }
  .ec-year-calendar__day--not-open-yet { background: #f8e7cf; color: #8a5520; }
  .ec-year-calendar__day--sold-out,
  .ec-year-calendar__day--closed { background: #ece8ea; color: #82777d; }
  .ec-year-calendar__day.is-selected { background: #5b0757; color: #fff; }

  .ec-year-calendar__selection {
    margin-top: 22px;
    padding: 20px;
    border-radius: 18px;
    background: #f4eee8;
  }

  .ec-year-calendar__selection[hidden] { display: none !important; }
  .ec-year-calendar__selection h3 { margin: 0 0 14px; color: #2d252b; }
  .ec-year-calendar__session-list { display: grid; gap: 10px; }

  .ec-year-calendar__session {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
  }

  .ec-year-calendar__session strong,
  .ec-year-calendar__session span { display: block; }
  .ec-year-calendar__session-meta { color: #6f656b; font-size: .9rem; }

  .ec-year-calendar__choose {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #5b0757;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
  }

  .ec-year-calendar__status { color: #796e74; font-size: .88rem; font-weight: 700; }
  body.ec-year-calendar-open { overflow: hidden; }
}

@media (min-width: 768px) and (max-width: 860px) {
  .ec-year-calendar__months { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 768px) {
  .ec-show-more-classes { display: none !important; }
}
