:root {
  --blue-dark: #6c95a6;
  --blue-light: #e1e6e6;
  --blue-mid:  #4fa3c6;
  --text-default: #333;
  --btn-color: #4fa3c6;
  --btn-hover: #357a8a;
  --btn-size: 36px;
}

.hidden { display: none; }

input, select, button, textarea {
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: var(--text-default);
  background-color: var(--blue-light);
}

/* =========================
   WRAPPER / CALENDAR
========================= */
.wrapper {
  max-width: 1100px;
  padding: 0 20px;
  margin: 20px auto;
}

.container-calendar {
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  border-radius: 8px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#monthAndYear {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin: 0;
}

.nav-btn {
  background-color: var(--btn-color);
  color: white;
  border: none;
  border-radius: 6px;
  width: var(--btn-size);
  height: var(--btn-size);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-btn:hover {
  background-color: var(--btn-hover);
}

/* =========================
   CALENDAR TABLE
========================= */
.table-calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Days of week header — reduced height */
.table-calendar th {
  background-color: var(--blue-dark);
  color: white;
  padding: 4px 6px;     /* smaller padding */
  height: auto;         /* allow natural height */
  line-height: 1.2;     /* tighten vertical spacing */
  font-weight: 600;
}

/* Date cells only */
.table-calendar td {
  border: 1px solid #e2e2e2;
  text-align: center;
  vertical-align: top;
  height: 65px;         /* unchanged */
  padding: 6px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

/* Diagonal slash */
.has-events::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom right,
      transparent 49%,
      #cfcfcf 50%,
      transparent 51%
    );
  z-index: 0;
}

/* Event dots */
.event-dots-am,
.event-dots-pm {
  position: absolute;
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  z-index: 2;
}

.event-dots-am { top: 4px; left: 4px; }
.event-dots-pm { bottom: 4px; right: 4px; justify-content: flex-end; }

.event-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Event colors */
.event-socialEvent  { background-color: #1f7a1f; }  /* darker green */
.event-smallGroup   { background-color: #340be9; }
.event-largeGroup   { background-color: #e80ce8; }
.event-boardMeeting { background-color: #ed1000; }
.event-paidEvent    { background-color: #d97706; }
.event-default      { background-color: #999;    }

/* =========================
   REMINDERS
========================= */
.reminder-header {
  padding: 6px;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  cursor: pointer;
}

.reminder-details {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 0 6px;
  margin-top: 4px;
  border-radius: 4px;
  font-size: 13px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.reminder-details.show {
  max-height: 200px;
  padding: 6px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {

  .table-calendar td {
    height: 45px;
    font-size: 11px;
  }

  .event-dot {
    width: 7px;
    height: 7px;
  }

  .nav-btn {
    width: 28px;
    height: 28px;
    font-size: 1.2rem;
  }

  /* Keep header compact on mobile too */
  .table-calendar th {
    padding: 3px;
    font-size: 12px;
  }
}
/* =========================
   LEGEND
========================= */
.calendar-legend {
  margin-top: 20px;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.calendar-legend h3 {
  margin-top: 0;
  color: var(--blue-dark);
}

.legend-items {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 15px 30px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* MOBILE */
@media (max-width: 600px) {
  .legend-items {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* WALK-IN BADGES */
.walkin-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 12px;
  color: #fff;
}

.walkin-badge.open {
  background: #2ecc71;
}

.walkin-badge.closed {
  background: #e74c3c;
}

.walkin-badge.contact {
  background: #3498db;
}

.event-time {
  margin-bottom: 6px;
  font-weight: 600;
}

.event-description {
  margin-bottom: 6px;
}

.walkin-contact {
  font-size: 13px;
  margin-top: 4px;
}
