/* Församlingens kalender – avsiktligt sparsmakad och anpassningsbar till temat. */
.fk-calendar { width: 100%; max-width: 850px; font: inherit; }
.fk-calendar .fk-heading { margin: 0 0 1rem; font-size: 1.35em; line-height: 1.3; }
.fk-calendar .fk-list { list-style: none; padding: 0; margin: 0; }
.fk-calendar .fk-event { display: grid; grid-template-columns: minmax(105px, 135px) minmax(0, 1fr); gap: 12px; padding: 12px 0; margin: 0; border-bottom: 1px solid #e5e7eb; }
.fk-calendar .fk-event:last-child { border-bottom: 0; }
.fk-calendar .fk-when time { display: block; font-variant-numeric: tabular-nums; }
.fk-calendar .fk-date { display: block; font-weight: 600; text-transform: capitalize; }
.fk-calendar .fk-time { display: block; opacity: .75; }
.fk-calendar .fk-info { min-width: 0; }
.fk-calendar .fk-title { line-height: 1.45; }
.fk-calendar .fk-note { margin-top: 3px; font-size: .93em; opacity: .85; white-space: normal; overflow-wrap: anywhere; }
.fk-calendar .fk-stream { margin-top: 5px; font-size: .9em; }
.fk-calendar .fk-stream a { text-decoration: underline; text-underline-offset: 2px; }
.fk-calendar .fk-stream a:hover { text-decoration: none; }
.fk-calendar .fk-empty { margin: 0; }
@media (max-width: 480px) {
  .fk-calendar .fk-event { grid-template-columns: 94px minmax(0, 1fr); gap: 8px; padding: 10px 0; }
  .fk-calendar .fk-date, .fk-calendar .fk-time { font-size: .92em; }
}

/* Klassisk månadsvy med datumrutor och fullständig mötestext. */
.fk-month-calendar { max-width: 1200px; }
.fk-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.fk-month-nav strong { font-size: 1.2em; text-align: center; }
.fk-month-nav a, .fk-back-today a { text-decoration: underline; text-underline-offset: 2px; }
.fk-back-today { margin: -4px 0 12px; text-align: center; font-size: .9em; }
.fk-month-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.fk-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid #dce2e8; border-left: 1px solid #dce2e8; }
.fk-month-weekday { padding: 9px 5px; border-right: 1px solid #dce2e8; border-bottom: 1px solid #dce2e8; background: #f3f6f8; text-align: center; font-weight: 700; }
.fk-month-day { min-width: 0; min-height: 115px; padding: 8px 6px; border-right: 1px solid #dce2e8; border-bottom: 1px solid #dce2e8; overflow-wrap: anywhere; }
.fk-month-outside { background: #f6f7f9; }
.fk-month-today { background: #fff9e7; }
.fk-month-number { font-weight: 700; margin-bottom: 6px; }
.fk-month-event { padding: 5px 6px; background: #edf4fa; border-left: 3px solid #386e96; border-radius: 2px; margin-bottom: 5px; font-size: .82em; line-height: 1.35; }
.fk-month-event time { font-variant-numeric: tabular-nums; font-weight: 700; }
.fk-month-detail { margin-top: 3px; }
.fk-month-live { display: inline-block; margin-top: 4px; text-decoration: underline; }
@media (max-width: 760px) {
  .fk-month-grid { min-width: 700px; }
  .fk-month-nav strong { font-size: 1.05em; }
  .fk-month-nav a { font-size: .85em; }
}

/* Frivillig talarpresentation i vecko- och månadsvisningen. */
.fk-speaker-profile { margin: 5px 0; font-size: .9em; }
.fk-speaker-profile summary { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; width: fit-content; }
.fk-speaker-body { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.fk-speaker-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.fk-speaker-body p { margin: 3px 0 0; white-space: normal; overflow-wrap: anywhere; }
.fk-speaker-compact .fk-speaker-body { display: block; }
.fk-speaker-compact .fk-speaker-photo { width: 65px; height: 65px; margin-bottom: 4px; }

/* Kompakt sidofältsvy: enbart närmast kommande samling. */
.fk-next-widget { max-width: 100%; }
.fk-next-widget .fk-heading { font-size: 1.15em; margin-bottom: .65rem; }
.fk-next-content { padding: 10px 12px; border-left: 3px solid #386e96; background: #f4f7fa; overflow-wrap: anywhere; }
.fk-next-when { font-size: .94em; font-weight: 600; margin-bottom: 4px; }
.fk-next-title { font-size: 1.07em; line-height: 1.4; }
.fk-next-speaker { margin-top: 3px; }
.fk-two-month-list { max-width: 850px; }

/* Version 2.0: talarens namn ersätter den gamla länken ”Om talaren”. */
.fk-speaker-inline { display: inline-block; position: relative; margin: 0; vertical-align: baseline; font-size: inherit; }
.fk-speaker-inline summary { display: inline; list-style: none; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fk-speaker-inline summary::-webkit-details-marker { display: none; }
.fk-speaker-inline summary::marker { content: ''; }
.fk-speaker-inline summary:hover { text-decoration-thickness: 2px; }
.fk-speaker-inline summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.fk-speaker-inline[open] { display: inline; }
.fk-speaker-inline .fk-speaker-body { display: flex; margin: 5px 0 8px; font-weight: normal; font-size: .92em; }
.fk-speaker-compact .fk-speaker-body { display: flex; flex-wrap: wrap; }

/* v2.2: tydliga prenumerations-/exportlänkar under månadskalendern. */
.fk-calendar-export { margin: 18px 0 0; padding: 14px 16px; border: 1px solid #dce2e8; border-radius: 5px; }
.fk-calendar-export > strong { display: block; margin-bottom: 9px; }
.fk-export-links { display: flex; flex-wrap: wrap; gap: 8px; }
.fk-export-links a { display: inline-block; padding: 8px 11px; border: 1px solid #386e96; border-radius: 4px; text-decoration: none; line-height: 1.35; }
.fk-export-links a:hover, .fk-export-links a:focus-visible { background: #edf4fa; text-decoration: underline; }
.fk-calendar-export p { margin: 10px 0 0; font-size: .88em; opacity: .8; }

/* Version 2.5: inspelad predikan separat från live – miniatyr och TV-fönster. */
.fk-sermon { margin: 10px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fk-sermon-open { display: inline-flex; position: relative; align-items: center; gap: 9px; max-width: 100%; border: 1px solid #d7e1ea; border-radius: 8px; padding: 5px 10px 5px 5px; background: #f8fafc; color: #16436a; font: inherit; font-size: .9em; font-weight: 650; cursor: pointer; text-align: left; }
.fk-sermon-open:hover { background: #e9f2fb; }
.fk-sermon-open:focus-visible { outline: 3px solid #337ab7; outline-offset: 2px; }
.fk-sermon-open img { width: 84px; height: 48px; object-fit: cover; border-radius: 4px; }
.fk-sermon-play { position: absolute; left: 31px; top: 17px; background: #c40000; border-radius: 5px; color: white; font-size: 14px; padding: 0 6px; }
.fk-sermon-direct { font-size: .85em; }
.fk-sermon-small { display: block; }
.fk-sermon-small .fk-sermon-open { padding: 4px; display: flex; font-size: 11px; width: 100%; flex-wrap: wrap; }
.fk-sermon-small .fk-sermon-open img { width: 100%; height: auto; max-height: 75px; object-fit: cover; }
.fk-sermon-small .fk-sermon-play { left: 42%; top: 20%; }
.fk-sermon-small .fk-sermon-direct { display: block; margin-top: 4px; font-size: 11px; }
.fk-tv-is-open { overflow: hidden; }
.fk-tv-overlay[hidden] { display: none !important; }
.fk-tv-overlay { position: fixed; inset: 0; z-index: 999999; background: rgba(1, 9, 22, .9); display: flex; align-items: center; justify-content: center; padding: 16px; }
.fk-tv-frame { width: min(1060px, 100%); padding: 12px; background: #171d26; color: #fff; border: 6px solid #303a49; border-radius: 18px; box-shadow: 0 25px 75px #000b; }
.fk-tv-top { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 0 2px 10px; font-size: 16px; font-weight: 700; }
.fk-tv-close { border: 1px solid #a8b5c5; background: transparent; color: white; padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.fk-tv-close:focus-visible { outline: 3px solid white; }
.fk-tv-screen { aspect-ratio: 16 / 9; background: #000; border-radius: 7px; overflow: hidden; }
.fk-tv-screen iframe { display: block; width: 100%; height: 100%; border: 0; }

/* v3.3: Kompakt veckolista. Gäller enbart [forsamling_kalender] (inte månadsvyn). */
.fk-week-compact .fk-event {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 0;
  align-items: baseline;
  line-height: 1.35;
}
.fk-week-compact .fk-when time { display: flex; flex-wrap: wrap; gap: 0 7px; align-items: baseline; }
.fk-week-compact .fk-date, .fk-week-compact .fk-time { display: inline; font-size: .93em; line-height: 1.35; }
.fk-week-compact .fk-date { font-weight: 650; white-space: nowrap; }
.fk-week-compact .fk-time { opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fk-week-compact .fk-info { line-height: 1.35; }
.fk-week-compact .fk-title { display: inline; line-height: inherit; }
.fk-week-compact .fk-note { display: inline; margin: 0 0 0 5px; font-size: .89em; line-height: inherit; }
.fk-week-compact .fk-note::before { content: '· '; }
.fk-week-compact .fk-stream { display: inline; margin: 0 0 0 6px; font-size: .88em; }
.fk-week-compact .fk-sermon { display: inline-flex; vertical-align: middle; margin: 2px 0 2px 7px; gap: 5px; }
.fk-week-compact .fk-sermon-small .fk-sermon-open { display: inline-flex; width: auto; flex-wrap: nowrap; padding: 3px 6px; gap: 5px; font-size: .82em; }
.fk-week-compact .fk-sermon-small .fk-sermon-open img { width: 34px; height: 23px; object-fit: cover; }
.fk-week-compact .fk-sermon-small .fk-sermon-play { left: 12px; top: 7px; font-size: 9px; padding: 0 2px; }
.fk-week-compact .fk-sermon-small .fk-sermon-direct { display: inline; font-size: .79em; margin: 0; }
@media (max-width: 480px) {
  .fk-week-compact .fk-event { grid-template-columns: 100px minmax(0, 1fr); gap: 7px; padding: 6px 0; }
  .fk-week-compact .fk-date, .fk-week-compact .fk-time { font-size: .86em; }
  .fk-week-compact .fk-when time { gap: 0 5px; }
  .fk-week-compact .fk-sermon-small .fk-sermon-open img { width: 28px; height: 20px; }
}

/* v3.4: Live-länken på egen rad i den kompakta veckolistan. */
.fk-week-compact .fk-stream { display: block; margin: 2px 0 0; font-size: .88em; line-height: 1.3; }


/* v3.5: Grupperad veckolista – ett datum per dag, utan linjer mellan dagens möten. */
.fk-week-compact .fk-day-list,
.fk-week-compact .fk-day-events { list-style: none; margin: 0; padding: 0; }
.fk-week-compact .fk-day-group {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px solid #e5e7eb;
  align-items: start;
}
.fk-week-compact .fk-day-group:last-child { border-bottom: 0; }
.fk-week-compact .fk-day-date { font-weight: 650; line-height: 1.35; white-space: nowrap; }
.fk-week-compact .fk-day-event {
  display: grid;
  grid-template-columns: 53px minmax(0, 1fr);
  gap: 8px;
  padding: 2px 0;
  margin: 0;
  border: 0;
  align-items: start;
}
.fk-week-compact .fk-day-time { font-variant-numeric: tabular-nums; opacity: .85; line-height: 1.35; white-space: nowrap; }
.fk-week-compact .fk-day-event + .fk-day-event { margin-top: 3px; }
@media (max-width: 480px) {
  .fk-week-compact .fk-day-group { grid-template-columns: 80px minmax(0, 1fr); gap: 6px; padding: 7px 0; }
  .fk-week-compact .fk-day-date { font-size: .88em; }
  .fk-week-compact .fk-day-event { grid-template-columns: 45px minmax(0, 1fr); gap: 6px; }
  .fk-week-compact .fk-day-time { font-size: .88em; }
}
