@font-face {
  font-family: 'HudsonNY';
  src: url('fonts/Hudson NY Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.avc-wrapper {
  font-family: 'Hudson NY', 'Segoe UI', Roboto, Arial, sans-serif;
  margin: 20px auto;
  max-width: 1200px;
  color: #333;
}

/* -------------------- HEADER LAYOUT -------------------- */
.avc-header {
  display: grid;
  grid-template-areas:
    "buttons"
    "nav";
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px; /* more space before calendar */
}

/* 🔹 Always 2x2 grid of buttons */
.avc-buttons-grid {
  grid-area: buttons;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  justify-items: center;
}

.avc-buttons-grid button {
  width: 100%;
  text-align: center;
}

/* Navigation (below buttons) */
.avc-nav {
  grid-area: nav;
  display: flex;
  justify-content: center;
}

.avc-month-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  margin-bottom: 6px; /* small buffer under nav */
}

#avc-month-label {
  font-size: 20px;
  text-align: center;
}

/* -------------------- BUTTON STYLES -------------------- */
.avc-tab {
  padding: 12px 24px;
  font-size: 15px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  transition: transform 0.25s ease;
  color: #fff;
  background: #282828;
  box-shadow: 0 3px 6px rgba(73, 197, 177, 0.6);
}
.avc-tab.active {
  background: #7D55C7;
  box-shadow: 0 3px 6px rgba(27, 54, 93, 0.6);
}
.avc-tab:hover { transform: scale(1.02); }

/* Today button */
#avc-today-btn {
  padding: 12px 24px;
  font-size: 15px;
  background: #1B365D;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(73, 197, 177, 0.6);
  transition: background 0.25s ease, transform 0.25s ease;
}
#avc-today-btn:hover {
  background: #49C5B1;
  transform: scale(1.02);
}

/* Monthly toggle button — same as Today */
#avc-toggle-view {
  padding: 12px 24px;
  font-size: 15px;
  background: #1B365D;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(73, 197, 177, 0.6);
  transition: background 0.25s ease, transform 0.25s ease;
}
#avc-toggle-view:hover {
  background: #49C5B1;
  transform: scale(1.02);
}

/* Month arrows */
#avc-prev-month,
#avc-next-month {
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  padding: 0;
  cursor: pointer;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s ease;
}
#avc-prev-month {
  background-image: url('https://www.airunlimited.co.uk/wp-content/uploads/2025/09/leftarrow.png');
}
#avc-next-month {
  background-image: url('https://www.airunlimited.co.uk/wp-content/uploads/2025/09/RightArrow.png');
}
#avc-prev-month:hover,
#avc-next-month:hover {
  transform: scale(1.2);
}

/* -------------------- CALENDAR GRID -------------------- */
#avc-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.avc-day {
  border-radius: 10px;
  padding: 12px;
  min-height: 90px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.avc-day:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.avc-day .date {
  color: #000; /* black date numbers */
  margin-bottom: 6px;
}

.avc-header-day {
  background-color: #1B365D;
  color: #fff;
  text-align: center;
  padding: 4px 0;
  border-radius: 6px;
  min-height: 40px !important;
  font-size: 13px;
}

/* States */
.avc-day.open  { background: #49C5B1; color: #fff; }
.avc-day.closed{ background: #F35664; color: #fff; }

/* Closed label */
.closed-label {
  font-style: italic;
  opacity: 0.9;
  font-size: 1em; /* normal size on desktop */
}

.dimmed    { color: #bbb; font-style: italic; }
.avc-today { outline: 3px solid #333; }

/* Holidays */
.avc-day.holiday {
  background: #7D55C7;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.avc-day.holiday:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.avc-day.holiday .date {
  color: #000; /* force holiday cell date to black too */
}

/* ===== MOBILE LAYOUT (<=800px) ===== */
@media (max-width: 800px) {
  .avc-wrapper {
    padding: 0 6px;
    overflow-x: hidden;
    overflow-y: visible; /* let boxes extend fully */
    max-width: 100% !important;
    width: 100%;
    margin: 0;
  }

  .avc-header {
    margin-bottom: 24px; /* more space before calendar on mobile */
  }

  #avc-calendar {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding-bottom: 8px; /* extra breathing room at the bottom */
  }

  .avc-day,
  .avc-header-day { min-width: 0; }

  /* Mobile sizing */
  .avc-day {
    padding: 5px;
    font-size: 11px;
    min-height: 70px; /* taller so the bottom isn’t clipped */
  }
  .avc-header-day {
    font-size: 11px;
    min-height: 32px !important;
    padding: 2px 0;
  }

  /* Smaller Closed text on mobile only */
  .closed-label {
    font-size: 0.75em;
  }

  .avc-buttons-grid {
    gap: 10px;
  }

  .avc-month-nav {
    column-gap: 8px;
    max-width: 320px;
    margin-bottom: 8px; /* extra buffer under nav on mobile */
  }

  #avc-prev-month, #avc-next-month {
    width: 32px;
    height: 32px;
  }

  #avc-month-label {
    font-size: 16px;
  }
}