/* Vikingur Event Calendar — frontend styles */
.vec {
  --vec-red: #d2232a;
  --vec-blue: #1d3f8a;
  --vec-ink: #16181d;
  --vec-muted: #6b7280;
  --vec-line: #e6e8ec;
  --vec-bg: #ffffff;
  --vec-soft: #f5f6f8;
  --vec-radius: 14px;
  font-family: inherit;
  color: var(--vec-ink);
  width: 100%;
  max-width: none;
}
.vec__list { width: 100%; }
.vec *, .vec *::before, .vec *::after { box-sizing: border-box; }

/* Toolbar */
.vec__toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.vec__search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.vec__search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--vec-muted);
  pointer-events: none;
}
.vec__search-input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  border: 1px solid var(--vec-line);
  border-radius: 999px;
  font-size: 15px;
  background: var(--vec-bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.vec__search-input:focus {
  border-color: var(--vec-blue);
  box-shadow: 0 0 0 3px rgba(29,63,138,.12);
}
.vec__search-clear {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: var(--vec-ink);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* Controls row: view toggle · filters · subscribe */
.vec__controls {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.vec__views {
  display: inline-flex;
  background: var(--vec-soft);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  flex: 0 0 auto;
}
.vec__view-btn {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vec-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .15s, color .15s;
}
.vec__view-btn svg { width: 16px; height: 16px; }
.vec__view-btn.is-active {
  background: var(--vec-bg);
  color: var(--vec-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.vec__subscribe {
  margin-left: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--vec-ink);
  background: var(--vec-bg);
  color: var(--vec-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.vec__subscribe svg { width: 16px; height: 16px; }
.vec__subscribe:hover { background: var(--vec-ink); color: #fff; }

/* Filter pills */
.vec__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}
.vec__pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--vec-line);
  background: var(--vec-bg);
  color: var(--vec-ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  line-height: 1.4;
}
.vec__pill:hover { border-color: #c9ccd3; }
.vec__pill.is-active { background: var(--vec-ink); color: #fff; border-color: var(--vec-ink); }
.vec__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  flex: 0 0 auto;
}

.vec__count {
  color: var(--vec-muted);
  font-size: 14px;
  margin: 2px 0 10px;
}
.vec__status {
  padding: 10px 0;
  color: var(--vec-muted);
  font-size: 14px;
}

/* List view */
.vec__month {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--vec-muted);
  margin: 48px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--vec-line);
}
.vec__month:first-child { margin-top: 8px; }

.vec__card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto minmax(0, 230px) auto;
  grid-template-areas: "date body time loc actions";
  align-items: center;
  column-gap: 22px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--vec-line);
  transition: background .15s;
}
.vec__card:hover { background: var(--vec-soft); }
.vec__card.is-cancelled .vec__title { text-decoration: line-through; opacity: .55; }

.vec__date {
  grid-area: date;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.vec__date-day { font-size: 26px; font-weight: 800; color: var(--vec-color, var(--vec-blue)); }
.vec__date-mon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--vec-muted); margin-top: 4px; }

.vec__body { grid-area: body; min-width: 0; }
.vec__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.vec__tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--vec-color, var(--vec-blue));
}
.vec__badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.vec__badge--cancelled { background: #fde8e8; color: #b91c1c; }
.vec__badge--postponed { background: #fef3c7; color: #92400e; }

.vec .vec__title {
  font-family: "GT America Standard", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.vec__score { display: inline-block; margin-left: 8px; padding: 0 8px; background: var(--vec-ink); color: #fff; border-radius: 6px; font-size: 14px; }

/* On desktop the info items become row columns (via display:contents). */
.vec__info { display: contents; }
.vec__info-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--vec-muted);
  font-size: 14px;
  min-width: 0;
}
.vec__info-item--time { grid-area: time; white-space: nowrap; }
.vec__info-item--loc { grid-area: loc; }
.vec__info-item--loc > span,
.vec__info-item--loc > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vec__info-item a { color: inherit; text-decoration: underline; }
.vec__icon { display: inline-flex; align-items: center; flex: 0 0 auto; }
.vec__icon svg { display: block; }

.vec__actions { grid-area: actions; display: flex; gap: 8px; align-items: center; }
.vec__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--vec-color, var(--vec-blue));
  color: var(--vec-color, var(--vec-blue));
  background: transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.vec__btn span { text-decoration: none !important; }
/* The theme's link styling thins anchor buttons (Nánar) — force the weight. */
.vec__btn, .vec__btn span { font-weight: 700 !important; }
.vec__btn .vec__icon svg { width: 16px; height: 16px; }
.vec__btn--arrow-shift { transition: transform .15s; }
.vec__btn:hover .vec__icon--arrow { transform: translateX(2px); transition: transform .15s; }
.vec__btn--primary:hover { background: var(--vec-color, var(--vec-blue)); color: #fff !important; }
.vec__btn--primary:hover span { color: #fff !important; }
.vec__btn--ghost { border-color: var(--vec-line); color: var(--vec-muted); }
.vec__btn--ghost:hover { background: var(--vec-soft); color: var(--vec-ink) !important; }
.vec__btn--ghost:hover span { color: var(--vec-ink) !important; }

.vec__empty { padding: 48px 16px; text-align: center; color: var(--vec-muted); font-size: 16px; }

/* Add-to-calendar dropdown */
.vec__addcal { position: relative; flex: 0 0 auto; }
.vec__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: var(--vec-bg);
  border: 1px solid var(--vec-line);
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
  padding: 6px;
  z-index: 40;
}
.vec__menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vec-ink);
  cursor: pointer;
  text-decoration: none !important;
}
.vec__menu-item:hover { background: var(--vec-soft); }

/* Subscribe modal */
.vec__modal-back {
  position: fixed; inset: 0;
  background: rgba(16,18,21,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.vec__modal {
  position: relative;
  width: 100%; max-width: 420px;
  background: var(--vec-bg);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}
.vec__modal-title { font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.vec__modal-help { color: var(--vec-muted); font-size: 14px; line-height: 1.5; margin: 0 0 18px; }
.vec__modal-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.vec__modal .vec__btn--primary { background: var(--vec-ink); border-color: var(--vec-ink); color: #fff; }
.vec__modal .vec__btn--primary:hover { opacity: .9; background: var(--vec-ink); }
.vec__copyrow { display: flex; gap: 8px; margin-top: 14px; }
.vec__copyinput {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--vec-line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--vec-muted);
  background: var(--vec-soft);
}
.vec__modal-close {
  position: absolute; top: 14px; right: 14px;
  border: 0; background: transparent;
  color: var(--vec-muted); cursor: pointer;
  display: inline-flex; padding: 4px;
}
.vec__modal-close:hover { color: var(--vec-ink); }

/* Calendar (Dagatal) view */
.vec__calendar {
  --fc-border-color: var(--vec-line);
  --fc-today-bg-color: rgba(210,35,42,.05);
  --fc-page-bg-color: var(--vec-bg);
  --fc-neutral-bg-color: transparent;
}
/* Neutralise the theme's link colour/underline inside FullCalendar. */
.vec .fc a { color: inherit; text-decoration: none !important; }

/* Toolbar */
.vec .fc .fc-toolbar.fc-header-toolbar { margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.vec .fc .fc-toolbar-title { font-size: 1.3rem; font-weight: 800; text-transform: capitalize; }
.vec .fc .fc-button {
  background: var(--vec-bg);
  border: 1px solid var(--vec-line);
  color: var(--vec-ink);
  box-shadow: none !important;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}
.vec .fc .fc-button:focus { box-shadow: none !important; }
.vec .fc .fc-button:hover { background: var(--vec-soft); border-color: #c9ccd3; color: var(--vec-ink); }
.vec .fc .fc-button-primary:not(:disabled):active,
.vec .fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--vec-ink); border-color: var(--vec-ink); color: #fff;
}
.vec .fc .fc-button-primary:disabled { background: var(--vec-bg); border-color: var(--vec-line); color: var(--vec-muted); opacity: 1; }
.vec .fc .fc-button-group > .fc-button { border-radius: 999px; }
.vec .fc .fc-button-group { gap: 4px; }

/* Weekday header */
.vec .fc .fc-col-header-cell { background: transparent; border-bottom-width: 1px; }
.vec .fc .fc-col-header-cell-cushion {
  display: block;
  padding: 10px 8px;
  color: var(--vec-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Day cells */
.vec .fc .fc-daygrid-day-frame { min-height: 94px; }
.vec .fc .fc-daygrid-day-top { flex-direction: row; }
.vec .fc .fc-daygrid-day-number {
  padding: 8px 10px;
  color: var(--vec-ink);
  font-size: 13px;
  font-weight: 600;
}
.vec .fc .fc-day-other .fc-daygrid-day-number { color: var(--vec-muted); opacity: .55; }
.vec .fc .fc-day-today .fc-daygrid-day-number {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; margin: 5px 6px; padding: 0 5px;
  background: var(--vec-red); color: #fff; border-radius: 999px; font-weight: 800;
}

/* Events as colored chips */
.vec .fc-daygrid-event {
  border: 0 !important;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 1px 6px 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.vec .fc-daygrid-event,
.vec .fc-daygrid-event .fc-event-title,
.vec .fc-daygrid-event .fc-event-time { color: #fff !important; }
.vec .fc-daygrid-event .fc-event-time { font-weight: 700; opacity: .9; margin-right: 2px; }
.vec .fc-daygrid-event .fc-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vec .fc-daygrid-event:hover { opacity: .9; }
.vec .fc-daygrid-more-link { font-size: 12px; font-weight: 700; color: var(--vec-muted) !important; margin: 1px 6px; }
.vec .fc-event { cursor: pointer; }
.vec .fc-popover { border-radius: 12px; border: 1px solid var(--vec-line); box-shadow: 0 12px 34px rgba(0,0,0,.14); }
.vec .fc-popover-title { font-weight: 700; }

/* Responsive */
/* Tablet/mobile: stack the time + location under the title. */
@media (max-width: 768px) {
  .vec__card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date body"
      "date info"
      "actions actions";
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
  }
  .vec__date { flex-direction: row; gap: 6px; align-items: baseline; padding-top: 2px; }
  .vec__date-day { font-size: 20px; }
  .vec__date-mon { margin-top: 0; }
  .vec__info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    grid-area: info;
  }
  .vec__info-item--loc > span,
  .vec__info-item--loc > a { white-space: normal; }
  .vec__actions { margin-top: 10px; }
}

@media (max-width: 640px) {
  .vec__toolbar { flex-direction: column; align-items: stretch; }
  .vec__views { flex: 1; }
  .vec__view-btn { flex: 1; justify-content: center; }
  .vec__subscribe { margin-left: 0; }
  .vec__actions { width: 100%; }
  .vec__actions .vec__btn { flex: 1; justify-content: center; }
  .vec .fc-toolbar.fc-header-toolbar { flex-direction: column; gap: 8px; }
}
