/* Basis */

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
  margin: 0;
  padding: 1.5rem;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */

.top-header {
  margin-bottom: 1.5rem;
}

.top-header h1 {
  margin: 0 0 0.5rem;
}

.info {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0;
}

.info-range {
  margin-top: 0.5rem;
}

/* View toolbar (Agenda / Week / Maand + nav) */

.view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.view-tabs {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.view-nav {
  display: inline-flex;
  gap: 0.25rem;
}

.view-tabs .btn {
  font-size: 0.8rem;
  padding-inline: 0.7rem;
}

.view-nav .btn {
  font-size: 0.8rem;
  padding-inline: 0.6rem;
}

.btn.is-active {
  background: #0ea5e9;
  color: #0b1120;
}

/* Kaarten */

.card {
  background: #020617;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #1f2937;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Form & inputs */

.grid-form {
  display: grid;
  gap: 0.75rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
}

input[type="text"]:focus,
input[type="url"]:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 1px #10b98155;
}

.small-input {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}

/* Buttons */

button {
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.btn-primary {
  background: #10b981;
  color: #022c22;
}

.btn-secondary {
  background: #374151;
  color: #e5e7eb;
}

.btn-danger {
  background: #ef4444;
  color: #fee2e2;
}

/* Pills */

.pill-wrap {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #020617;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Tabel links-overzicht (admin) */

.links-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.links-table th,
.links-table td {
  border-bottom: 1px solid #111827;
  padding: 0.5rem;
  vertical-align: middle;
}

.links-table th {
  text-align: left;
  background: #020617;
  position: sticky;
  top: 0;
  z-index: 1;
}

.field-checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.no-links {
  font-size: 0.9rem;
  color: #9ca3af;
}

/* Algemene meldingen */

.error {
  color: #fca5a5;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.loading {
  font-size: 0.9rem;
  color: #9ca3af;
}

/* ---------- Agenda-weergave (lijst per dag, alle events) ---------- */

.agenda-day {
  background: #020617;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #1f2937;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.agenda-day-header {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  text-transform: capitalize;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 0.35rem;
  color: #e5e7eb;
}

.agenda-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #111827;
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-time {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.1rem;
}

.agenda-title {
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.agenda-cal-tag {
  display: inline-block;
  margin-top: 0.1rem;
  margin-bottom: 0.2rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: #0f172a;
  color: #e5e7eb;
}

.agenda-location {
  font-size: 0.8rem;
  color: #9ca3af;
}

.agenda-description {
  font-size: 0.85rem;
  margin-top: 0.2rem;
  white-space: pre-wrap;
}

/* ---------- Week-grid ---------- */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.week-day-header {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.week-day-col {
  background: #020617;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  padding: 0.5rem;
  min-height: 5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.week-day-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.week-day-date {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.week-event {
  border-radius: 0.5rem;
  border: 1px solid #111827;
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  background: #020617;
}

.week-event-time {
  font-weight: 600;
  font-size: 0.75rem;
}

.week-event-title {
  font-size: 0.75rem;
  margin-top: 0.05rem;
}

.week-event-cal {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* ---------- Maand-grid ---------- */

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.month-weekday-header {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.month-cell {
  background: #020617;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  padding: 0.35rem 0.4rem;
  min-height: 4.5rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  font-size: 0.75rem;
}

.month-cell-outside {
  opacity: 0.35;
}

.month-day-number {
  font-weight: 600;
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
}

.month-event {
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-event-time {
  font-weight: 600;
  margin-right: 0.25rem;
}

.month-event-title {
  font-size: 0.75rem;
}
