/* =========================================
   🌫️  GLASS NAV + BACKGROUND (self-contained)
   ========================================= */
:root { color-scheme: only light; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(to bottom, #9ba0a8, #858b96);
  color: #111;
  min-height: 100vh;
}

/* Fixed glass nav wrapper */
.nav-wrap {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* Frosted glass nav bar */
.glass-nav {
  pointer-events: all;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 9999px;
  padding: 0.55rem 1rem;
  gap: 0.4rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* Nav tabs */
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  padding: .4rem .75rem;
  transition: all 0.25s ease;
  opacity: 0.8;
  -webkit-touch-callout: none;
  user-select: none;
}

.nav-tab:hover { opacity: 1; transform: translateY(-2px); }

.nav-tab img {
  filter: grayscale(30%) brightness(0.95);
  transition: filter .25s ease;
}

.nav-tab.active img {
  filter: brightness(1.1) drop-shadow(0 0 6px rgba(255,215,0,0.5));
}

.nav-tab.active {
  background: rgba(255,255,255,0.9);
  opacity: 1 !important;
}

.nav-label {
  font-size: 0.75rem;
  color: #111;
  font-weight: 500;
  margin-top: 2px;
}

/* Ensure page content sits below nav */
.nav-offset { padding-top: 6rem; }

/* =========================================
   🧊  MAIN CONTENT
   ========================================= */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.glass-section {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  margin-bottom: 2rem;
}

h2 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #111;
}

input, select {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: rgba(255,255,255,0.9);
  color: #111;
}

button.btn-primary {
  background: #FFD700;
  color: #000;
  font-weight: 700;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
button.btn-primary:hover { background: #ffea80; }

.hidden { display: none; }

/* =========================================
   🧭  EVENT CARDS
   ========================================= */
.event-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: transform .2s;
}
.event-card:hover { transform: translateY(-3px); }

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.badge {
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.registered {
  background: rgba(16,185,129,0.25);
  color: #065f46;
}
.badge.not-registered {
  background: rgba(239,68,68,0.25);
  color: #7f1d1d;
}

.countdown {
  text-align: right;
  color: #000;
  font-weight: 500;
  margin-top: 0.5rem;
}
/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.filter-btn {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 9999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  background: rgba(255,255,255,0.85);
}
.filter-btn.active {
  background: #FFD700;
  color: #000;
  border-color: rgba(255,215,0,0.5);
}

.edit-link {
  font-size: 0.85em;
  margin-left: 8px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s ease;
}

.edit-link:hover {
  color: #fff;
  text-decoration: underline;
}
.event-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-name {
  font-weight: 600;
  color: #111;
}
/* ===== Registration Link Button ===== */
.reg-link-btn {
  display: inline-block;
  padding: 6px 12px;
  margin-top: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #00bfff;
  font-size: 0.9em;
  text-decoration: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
  word-break: break-all; /* Ensures long URLs wrap */
}

.reg-link-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
  color: #40cfff;
}
/* ===== Year Calendar Layout (Equal gaps, color-coded highlights) ===== */
.year-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; /* equal row + column spacing */
  margin: 15px auto;
  padding: 0 6px;
  max-width: 520px;
  color: #222;
  text-align: center;
  justify-content: center;
  justify-items: center;
}

.month-block {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  width: 160px;
}

.month-block h3 {
  margin: 3px 0 5px;
  font-size: 0.85em;
  font-weight: 600;
  color: #000;
}

.week-header,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  text-align: center;
}

.week-header div {
  font-weight: bold;
  color: #333;
  font-size: 0.65em;
}

.day,
.empty {
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  font-size: 0.65em;
  color: #333;
  background: rgba(0, 0, 0, 0.03);
}

.calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  opacity: 0.8;
}

.lg-box {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
}

.lg-yellow { background: rgba(255,230,0,0.9); }
.lg-green  { background: rgba(0,200,100,0.9); }
.lg-orange { background: orange; }
.lg-blue   { background: rgba(0,150,255,0.9); }

/* 🟨 Not Registered */
.day.event-day.not-registered {
  background: rgba(255, 230, 0, 0.9);
  color: #000;
  font-weight: bold;
  border: 1px solid rgba(255, 200, 0, 0.6);
  box-shadow: 0 0 3px rgba(255, 220, 0, 0.3);
}

/* 🟩 Registered */
.day.event-day.registered {
  background: rgba(0, 200, 100, 0.9);
  color: #fff;
  font-weight: bold;
  border: 1px solid rgba(0, 150, 70, 0.6);
  box-shadow: 0 0 3px rgba(0, 200, 100, 0.3);
}

.day.event-day:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .year-calendar {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; /* ensure vertical gaps are same as horizontal */
    max-width: 100%;
    padding: 0 8px;
  }

  .month-block {
    width: 100%;
    padding: 4px;
  }

  .month-block h3 {
    font-size: 0.8em;
  }

  .day, .empty {
    height: 16px;
    line-height: 16px;
    font-size: 0.6em;
  }
}

@media (max-width: 420px) {
.year-calendar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 14px;  /* horizontal spacing */
    row-gap: 14px;     /* vertical spacing */
    /* or simply: gap: 20px; */
}


  .month-block {
    padding: 3px;
  }

  .month-block h3 {
    font-size: 0.75em;
  }

  .day, .empty {
    height: 15px;
    line-height: 15px;
    font-size: 0.58em;
  }
}

/* ===== Calendar Overlap Color ===== */
.overlap-event {
  background: orange !important;
  color: #000 !important;
  font-weight: bold;
}

/* ===== Multiline Tooltip anchored to day cell ===== */
.calendar-tooltip {
    position: absolute;
    background: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 200px;
    line-height: 1.3;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 99999;
    white-space: normal;
}


/* Ensures tooltip stays inside month card */
.month-block {
  position: relative;
  overflow: visible; /* <— keep all tooltips inside box */
}

.nav-tab {
    -webkit-touch-callout: none;
    user-select: none;
}
#tabList, .nav-tab {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
/* ===== Holiday (Blue) ===== */
.holiday-day {
  background: rgba(0, 150, 255, 0.9) !important;
  color: #fff !important;
  font-weight: bold;
  border: 1px solid rgba(0, 120, 220, 0.7);
  box-shadow: 0 0 3px rgba(0, 140, 255, 0.3);
}

.delete-link {
  font-size: 0.85em;
  margin-left: 10px;
  cursor: pointer;
  color: #e57373; /* red */
  transition: color 0.2s ease;
}

.delete-link:hover {
  color: #d32f2f;
  text-decoration: underline;
}














