/*
 * Rotary-Kalender-Plugin — Frontend-Styles.
 * Markenfarben Navy/Gold/Cream. Alle Selektoren mit Praefix `rk-`,
 * damit das Theme nicht ueberschrieben wird und umgekehrt.
 */

.rk-kalender {
  --rk-navy: #1A2744;
  /* Gold im Plugin-Frontend = Markenton der Vereins-Website (#eea03c).
     Admin-Dashboard und oeffentliches Einreichungsformular nutzen
     bewusst das elegantere #C9A84C — das hier ist nur die Listendarstellung
     auf rotary-frankfurt-am-main.de, die mit dem WP-Theme harmonieren soll. */
  --rk-gold: #eea03c;
  --rk-gold-dark: #d68628;
  --rk-cream: #F8F4ED;
  --rk-text: #1C1C1C;
  --rk-muted: #888;
  --rk-border: rgba(201, 168, 76, 0.25);
  --rk-radius: 4px;

  font-family: inherit;
  color: var(--rk-text);
  max-width: 1100px;
  margin: 0 auto;
}

.rk-kalender-error,
.rk-empty {
  background: var(--rk-cream);
  border: 1px solid var(--rk-border);
  border-radius: var(--rk-radius);
  padding: 24px;
  text-align: center;
  color: var(--rk-muted);
}

/* ─── Monats-Trenner ─── */
.rk-month {
  margin-bottom: 48px;
}

.rk-month-title {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  color: var(--rk-text);
  padding-bottom: 14px;
  margin: 0 auto 28px;
  position: relative;
}
.rk-month-title::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}
.rk-month-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--rk-gold);
}

/* ─── Event-Karte ─── */
.rk-event {
  display: grid;
  grid-template-columns: 140px 52px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px 32px;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

/* Porträt-Spalte (Listen-Karte) — kompakt, etwa Hoehe einer Textzeile + Share-Buttons */
.rk-portrait {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rk-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rk-portrait img.rk-portrait-placeholder {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.55;
}

.rk-event:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Datums-Spalte */
.rk-date {
  text-align: left;
  background: none;
  padding: 0;
  color: inherit;
}

.rk-date-top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  line-height: 1;
}

.rk-date .rk-day {
  display: inline;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 64px;
  font-weight: 400;
  color: var(--rk-gold);
  line-height: 1;
}

.rk-date .rk-month-name {
  display: inline;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rk-text);
  font-weight: 400;
  margin: 0;
  opacity: 1;
}

.rk-date .rk-weekday {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rk-muted);
  font-weight: 400;
  margin-top: 14px;
  opacity: 1;
}

/* Body */
.rk-body {
  min-width: 0;
}

.rk-title {
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--rk-text);
  margin: 0 0 10px;
  line-height: 1.4;
}

.rk-title a {
  color: inherit;
  text-decoration: none;
}

.rk-title a:hover {
  color: var(--rk-gold-dark);
}

.rk-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 3px 10px;
  background: var(--rk-gold);
  color: #fff;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1;
}
.rk-online-badge svg {
  width: 12px;
  height: 12px;
}

.rk-speaker {
  font-size: 13px;
  color: var(--rk-gold-dark);
  font-weight: 600;
  margin: 0 0 6px;
}

.rk-location-line {
  font-size: 14px;
  color: var(--rk-gold-dark);
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Share-Buttons (Shariff-Verfahren — kein Consent erforderlich) */
.rk-share {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.rk-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rk-text);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.rk-share-btn:hover {
  color: var(--rk-gold-dark);
}

.rk-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #666;
  transition: all 0.15s;
}

.rk-share-icon svg {
  width: 16px;
  height: 16px;
}

.rk-share-btn:hover .rk-share-icon {
  background: var(--rk-gold);
  color: #fff;
  border-color: var(--rk-gold);
}

/* DETAILS-Button (Gold-Stil aus der Vorlage) */
.rk-details-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--rk-gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
  align-self: center;
}

.rk-details-btn:hover {
  background: var(--rk-gold-dark);
  color: #fff;
}

/* ─── Detailansicht ─── */
.rk-detail-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 36px 40px;
}

.rk-detail-head {
  display: grid;
  grid-template-columns: 140px 72px 1fr;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  align-items: center;
}

/* Porträt im Detail-Header — etwas groesser als in der Liste, aber dezent */
.rk-detail-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rk-detail-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rk-detail-portrait img.rk-portrait-placeholder {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.55;
}

.rk-detail-headtext {
  min-width: 0;
}

.rk-detail-category {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rk-gold-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.rk-detail-title {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--rk-text);
  margin: 0 0 8px;
  line-height: 1.3;
}

.rk-detail-speaker {
  font-size: 15px;
  color: var(--rk-gold-dark);
  font-weight: 600;
  margin: 0;
}

.rk-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 36px;
  align-items: start;
}

.rk-detail-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--rk-text);
  margin-bottom: 28px;
}

.rk-detail-placeholder {
  font-style: italic;
  color: var(--rk-muted);
}

/* Unterlagen-Block (Protokoll, Anwesenheitsliste, ...) */
.rk-detail-attachments {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.rk-detail-attachments h3 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rk-muted);
  font-weight: 700;
  margin: 0 0 12px;
}
.rk-detail-attachments ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rk-detail-attachments li {
  margin-bottom: 6px;
}
.rk-detail-attachments a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--rk-text);
  text-decoration: none;
  font-size: 15px;
}
.rk-detail-attachments a:hover {
  color: var(--rk-gold-dark);
}
.rk-att-icon {
  width: 18px;
  height: 18px;
  color: var(--rk-gold);
  flex-shrink: 0;
}
.rk-att-meta {
  color: var(--rk-muted);
  font-size: 13px;
}

.rk-detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.rk-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: var(--rk-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.rk-action-btn:hover {
  border-color: var(--rk-gold);
  color: var(--rk-gold-dark);
  background: #fffaf3;
}
.rk-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--rk-gold);
}
.rk-action-icon svg {
  width: 20px;
  height: 20px;
}

/* Sidebar */
.rk-detail-sidebar {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 4px;
}

.rk-countdown-box {
  background: var(--rk-gold);
  color: #fff;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 12px;
}
.rk-countdown-box .rk-info-label {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
  font-weight: 600;
}
.rk-countdown-box .rk-info-value,
.rk-countdown-box .rk-countdown {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

/* Vergangene Veranstaltung — neutraler Ton, kein gold-Hintergrund */
.rk-countdown-past {
  background: #f0f0f0;
  color: var(--rk-muted);
  padding: 18px;
}
.rk-countdown-past .rk-info-value {
  color: var(--rk-muted);
  font-size: 16px;
  font-weight: 600;
}

.rk-info {
  padding: 14px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.rk-info:first-of-type,
.rk-countdown-box + .rk-info {
  border-top: none;
}

.rk-info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rk-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.rk-info-icon {
  width: 14px;
  height: 14px;
  color: var(--rk-gold);
}

.rk-info-value {
  font-size: 14px;
  color: var(--rk-text);
  font-weight: 500;
  line-height: 1.4;
}

.rk-countdown {
  font-family: inherit;
}

/* ─── Link zur Archiv-Seite, unter der Hauptliste ─── */
.rk-archive-link-wrap {
  text-align: center;
  margin: 24px 0 12px;
}
.rk-archive-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #fff;
  border: 1px solid var(--rk-gold);
  color: var(--rk-gold-dark);
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}
.rk-archive-link:hover {
  background: var(--rk-gold);
  color: #fff;
}

/* ─── Archiv-Ansicht ─── */
.rk-archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}
.rk-archive-nav a {
  display: inline-block;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: var(--rk-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}
.rk-archive-nav a:hover {
  border-color: var(--rk-gold);
  color: var(--rk-gold-dark);
}

.rk-archive-year { margin-bottom: 40px; scroll-margin-top: 80px; }
.rk-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
}
.rk-archive-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.rk-archive-item:first-child {
  border-top: none;
}
.rk-archive-date {
  flex: 0 0 65px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  color: var(--rk-gold);
}
.rk-archive-mon {
  font-size: 12px;
  margin-left: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rk-text);
  font-family: inherit;
}
.rk-archive-title {
  flex: 1;
  font-size: 15px;
  color: var(--rk-text);
  text-decoration: none;
  font-weight: 500;
}
.rk-archive-title:hover {
  color: var(--rk-gold-dark);
}
.rk-online-badge-sm {
  font-size: 9px;
  padding: 2px 6px;
}

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .rk-event {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date    portrait"
      "body    body"
      "btn     btn";
    gap: 16px 18px;
    padding: 24px 20px;
  }
  .rk-date     { grid-area: date; }
  .rk-portrait { grid-area: portrait; justify-self: end; }
  .rk-body     { grid-area: body; }
  .rk-details-btn { grid-area: btn; text-align: center; }

  .rk-date .rk-day { font-size: 48px; }
  .rk-date .rk-weekday { margin-top: 8px; }

  .rk-detail-grid {
    grid-template-columns: 1fr;
  }
  .rk-detail-card {
    padding: 24px 20px;
  }
  .rk-detail-head {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date    portrait"
      "txt     txt";
    gap: 16px;
  }
  .rk-detail-date     { grid-area: date; }
  .rk-detail-portrait { grid-area: portrait; justify-self: end; }
  .rk-detail-headtext { grid-area: txt; }
  .rk-detail-title {
    font-size: 18px;
  }
  .rk-archive-item {
    flex-wrap: wrap;
  }
}
