/* calendar.css */

body.calendar-page::before{
  content: "calendar.css loaded";
  position: fixed;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: #000;
  color: #fff;
  font: 12px/1 system-ui;
  border-radius: 8px;
  z-index: 99999;
}



/* Calendar theme variables */
:root{
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #555555;

  --border: rgba(0, 0, 0, 0.18);
  --border2: rgba(0, 0, 0, 0.08);

  --accent: #b22222;
  --accent2: #1f3a5f;
}

/* Background + base text */
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(178, 34, 34, .08), transparent 65%),
    radial-gradient(900px 500px at 90% 20%, rgba(31, 58, 95, .08), transparent 65%),
    var(--bg);
  color: var(--text);
}

/* Hover + click feedback for calendar day cells */
.cell:hover{
  background: rgba(0, 0, 0, 0.04);
}

.cell.selected{
  background: rgba(0, 0, 0, 0.06);
  outline: 2px solid rgba(0, 0, 0, 0.18);
  outline-offset: -2px;
}

.cell.today.selected{
  background: rgba(31, 58, 95, 0.10);
  outline-color: rgba(31, 58, 95, 0.55);
}
/* Calendar style from the original page */
:root{
  --bg:#f2f4f7;
  --card:#ffffff;
  --text:#1a1a1a;
  --muted:#555555;

  --border:rgba(0,0,0,.18);
  --border2:rgba(0,0,0,.08);

  --accent:#b22222;
  --accent2:#1f3a5f;
}

*{ box-sizing:border-box; }

body.calendar-page{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(178,34,34,.08), transparent 65%),
    radial-gradient(900px 500px at 90% 20%, rgba(31,58,95,.08), transparent 65%),
    var(--bg);
  color:var(--text);
}

header{
  max-width:1100px;
  margin:0 auto;
  padding:28px 18px 14px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

h1{
  margin:0;
  font-size:20px;
  letter-spacing:.3px;
  font-weight:700;
  color:var(--accent2);
}

.sub{ margin:6px 0 0; color:var(--muted); font-size:13px; }

.controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

button{
  background:var(--card);
  border:1px solid var(--accent2);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}

button:hover{
  border-color:rgba(0,0,0,.28);
  background:rgba(31,58,95,.05);
}

.pill{
  padding:10px 12px;
  border-radius:12px;
  font-weight:700;
  color:var(--accent2);
  border:1px solid rgba(31,58,95,.35);
  background:#fff;
  min-width:210px;
  text-align:center;
}

a.buttonLink{
  background:var(--card);
  border:1px solid var(--accent2);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  display:inline-block;
}
a.buttonLink:hover{
  border-color:rgba(0,0,0,.28);
  background:rgba(31,58,95,.05);
}

main{
  max-width:1100px;
  margin:0 auto;
  padding:0 18px 32px;
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:14px;
}
@media (max-width:900px){
  main{ grid-template-columns:1fr; }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.10);
}

.cardHeader{
  padding:14px 16px;
  border-bottom:1px solid rgba(0,0,0,.18);
  color:#333;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:700;
}

.grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border-top:1px solid var(--border);
}

.dow{
  padding:10px;
  font-weight:700;
  color:var(--text);
  border-bottom:1px solid var(--border);
  background:rgba(0,0,0,.03);
}

.cell{
  min-height:96px;
  padding:10px;
  border-right:1px solid var(--border);
  border-bottom:1px solid var(--border);
  position:relative;
  cursor:pointer;

  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.cell:nth-child(7n){ border-right:none; }

.dayNum{
  font-size:13px;
  color:var(--text);
  font-weight:700;
}

.today{
  outline:2px solid var(--accent2);
  outline-offset:-2px;
  background:rgba(31,58,95,.08);
}

.notThisMonth .dayNum{ opacity:.35; }

.badges{ margin-top:8px; display:flex; flex-direction:column; gap:6px; }

.badge{
  font-size:12px;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.22);
  background:rgba(0,0,0,.06);

  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.2;
  max-height:3em;
  overflow:hidden;
}

.badge strong{ color:#1a1a1a; font-weight:700; }
.badge .time{ color:var(--accent2); font-weight:700; }

.badgeCount{
  font-size:12px;
  color:var(--accent);
  font-weight:700;
  margin-top:6px;
}

.list{ padding:10px 0; }

.eventItem{
  padding:12px 16px;
  border-bottom:1px solid rgba(0,0,0,.18);
}
.eventItem:last-child{ border-bottom:none; }

.eventTitle{
  margin:0;
  font-size:14px;
  font-weight:700;
  color:var(--text);
}
.eventMeta{
  margin:6px 0 0;
  font-size:12px;
  color:#333;
}

.hint{ padding:12px 16px; color:var(--muted); font-size:13px; }

/* Hover + click feedback */
.cell:hover{
  background:rgba(0,0,0,.04);
}
.cell.selected{
  background:rgba(0,0,0,.06);
  outline:2px solid rgba(0,0,0,.18);
  outline-offset:-2px;
}
.cell.today.selected{
  background:rgba(31,58,95,.10);
  outline-color:rgba(31,58,95,.55);
}

