/* =============================================================
   ÖSBV Tournament Calendar – Frontend Styles
   ÖSBV Corporate Design: Red #C0392B, Dark #1a1a2e
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
  --oesbv-red:       #C0392B;
  --oesbv-red-dark:  #a03020;
  --oesbv-red-light: #f9e8e6;
  --oesbv-dark:      #1a1a2e;
  --oesbv-mid:       #2d2d44;
  --oesbv-teal:      #1a6b55;
  --oesbv-border:    #e0e0e0;
  --oesbv-bg:        #f8f8f8;
  --oesbv-white:     #ffffff;
  --oesbv-text:      #222222;
  --oesbv-muted:     #666666;
  --oesbv-radius:    6px;
  --oesbv-shadow:    0 2px 12px rgba(0,0,0,0.09);
  --oesbv-transition: 0.2s ease;
  --oesbv-font-head: 'Barlow Condensed', sans-serif;
  --oesbv-font-body: 'Barlow', sans-serif;
}

/* ── Reset ── */
.oesbv-cal-wrap *,
.oesbv-dashboard *,
.oesbv-fan-grid *,
.oesbv-upcoming-list * {
  box-sizing: border-box;
}
.oesbv-cal-wrap,
.oesbv-dashboard,
.oesbv-fan-grid,
.oesbv-upcoming-list {
  font-family: var(--oesbv-font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--oesbv-text);
}

/* ================================================================
   BUTTONS
================================================================ */
.oesbv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--oesbv-radius);
  font-family: var(--oesbv-font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--oesbv-transition);
  white-space: nowrap;
}
.oesbv-btn--primary {
  background: var(--oesbv-red);
  color: #fff;
  border-color: var(--oesbv-red);
}
.oesbv-btn--primary:hover {
  background: var(--oesbv-red-dark);
  border-color: var(--oesbv-red-dark);
  color: #fff;
}
.oesbv-btn--outline {
  background: transparent;
  color: var(--oesbv-red);
  border-color: var(--oesbv-red);
}
.oesbv-btn--outline:hover {
  background: var(--oesbv-red);
  color: #fff;
}
.oesbv-btn--reset {
  background: transparent;
  color: var(--oesbv-muted);
  border-color: var(--oesbv-border);
  padding: 8px 14px;
  font-size: 13px;
}
.oesbv-btn--reset:hover {
  border-color: var(--oesbv-red);
  color: var(--oesbv-red);
}
.oesbv-btn--disabled {
  background: #e0e0e0;
  color: #999;
  border-color: #e0e0e0;
  cursor: not-allowed;
  pointer-events: none;
}
.oesbv-btn--sm {
  padding: 5px 12px;
  font-size: 12px;
}
.oesbv-btn svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}

/* ================================================================
   BADGES
================================================================ */
.oesbv-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--oesbv-font-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--oesbv-red);
}
.oesbv-badge--new {
  background: var(--oesbv-red);
}
.oesbv-badge--region {
  background: #4a6fa5;
  font-size: 10px;
  padding: 1px 8px;
}
.oesbv-badge--admin-only {
  background: #6b7280;
  font-size: 10px;
  padding: 1px 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.oesbv-tournament-card.is-admin-only {
  border-left: 3px solid #6b7280;
  opacity: 0.70;
}
/* Admin-only field in edit modal */
.oesbv-admin-only-field {
  background: #f9fafb;
  border: 1.5px dashed #d1d5db;
  border-radius: 6px;
  padding: 10px 14px !important;
  margin-top: 4px;
}
.oesbv-card__regions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 4px;
}
.oesbv-badge--sm {
  font-size: 10px;
  padding: 1px 7px;
}
.oesbv-pulse {
  animation: oesbv-pulse 2s ease-in-out infinite;
}
@keyframes oesbv-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* ================================================================
   FILTERS
================================================================ */
.oesbv-filters {
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--oesbv-shadow);
}
.oesbv-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.oesbv-filters__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.oesbv-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  flex: 1;
}
.oesbv-filter-group--date { min-width: 120px; max-width: 150px; }
.oesbv-filter-group--past { min-width: auto; justify-content: flex-end; }
.oesbv-filters__row--regionen {
  border-top: 1px solid var(--oesbv-border);
  padding-top: 10px;
  margin-top: 4px;
}
.oesbv-filter-group--regionen { flex-direction: column; align-items: flex-start; min-width: 0; }
.oesbv-regionen-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 4px;
}
.oesbv-region-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px 12px;
  border: 1.5px solid var(--oesbv-border);
  border-radius: 20px;
  transition: all var(--oesbv-transition);
  background: var(--oesbv-bg);
  color: var(--oesbv-text);
  user-select: none;
}
.oesbv-region-label:hover {
  border-color: var(--oesbv-red);
  color: var(--oesbv-red);
}
.oesbv-region-label input[type="checkbox"] { display: none; }
.oesbv-region-label:has(input:checked) {
  background: var(--oesbv-red);
  border-color: var(--oesbv-red);
  color: #fff;
}
.oesbv-filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--oesbv-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.oesbv-filter-group select,
.oesbv-filter-group input[type="date"] {
  padding: 9px 12px;
  border: 1.5px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  font-family: var(--oesbv-font-body);
  font-size: 14px;
  background: var(--oesbv-bg);
  transition: border-color var(--oesbv-transition);
  width: 100%;
}
.oesbv-filter-group select:focus,
.oesbv-filter-group input:focus {
  outline: none;
  border-color: var(--oesbv-red);
}
.oesbv-checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--oesbv-text) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
}

/* ── View Toggle ── */
.oesbv-view-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  overflow: hidden;
}
.oesbv-view-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--oesbv-white);
  border: none;
  font-family: var(--oesbv-font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--oesbv-muted);
  transition: all var(--oesbv-transition);
}
.oesbv-view-btn svg { width: 15px; height: 15px; }
.oesbv-view-btn + .oesbv-view-btn { border-left: 1.5px solid var(--oesbv-border); }
.oesbv-view-btn.active,
.oesbv-view-btn:hover {
  background: var(--oesbv-red);
  color: #fff;
}

/* ── Sort Bar ── */
.oesbv-sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--oesbv-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.oesbv-sort-btn {
  background: transparent;
  border: 1px solid var(--oesbv-border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--oesbv-font-body);
  cursor: pointer;
  transition: all var(--oesbv-transition);
  color: var(--oesbv-muted);
}
.oesbv-sort-btn.active,
.oesbv-sort-btn:hover {
  background: var(--oesbv-dark);
  color: #fff;
  border-color: var(--oesbv-dark);
}
.oesbv-results-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--oesbv-muted);
}

/* ================================================================
   LOADING SPINNER
================================================================ */
.oesbv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--oesbv-muted);
}
.oesbv-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--oesbv-border);
  border-top-color: var(--oesbv-red);
  border-radius: 50%;
  animation: oesbv-spin 0.7s linear infinite;
}
@keyframes oesbv-spin { to { transform: rotate(360deg); } }

/* ================================================================
   LIST VIEW – Tournament Cards
================================================================ */
.oesbv-list-view { display: flex; flex-direction: column; gap: 12px; }

.oesbv-tournament-card {
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  box-shadow: var(--oesbv-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  transition: box-shadow var(--oesbv-transition), transform var(--oesbv-transition);
}
.oesbv-tournament-card:hover {
  box-shadow: 0 4px 24px rgba(192,57,43,0.13);
  transform: translateY(-1px);
}
.oesbv-tournament-card.is-cancelled { opacity: 0.65; }
.oesbv-tournament-card.is-featured {
  border-left: 4px solid var(--oesbv-red);
}
.oesbv-card__date-col {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  min-width: 90px;
}
.oesbv-card__date-col .oesbv-day {
  font-family: var(--oesbv-font-head);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.oesbv-card__date-col .oesbv-month {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}
.oesbv-card__date-col .oesbv-year {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 2px;
}
.oesbv-card__date-col .oesbv-multi-day {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 3px;
  text-align: center;
}
.oesbv-card__body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.oesbv-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.oesbv-card__title {
  font-family: var(--oesbv-font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--oesbv-dark);
  line-height: 1.2;
  margin: 0;
  text-decoration: none;
}
.oesbv-card__title:hover { color: var(--oesbv-red); }
.oesbv-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--oesbv-muted);
  align-items: center;
}
.oesbv-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.oesbv-card__meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.oesbv-card__excerpt { font-size: 14px; color: var(--oesbv-muted); margin-top: 4px; }
.oesbv-card__links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.oesbv-card__links a { font-size: 13px; }
.oesbv-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--oesbv-red);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.oesbv-pdf-link:hover { text-decoration: underline; }
.oesbv-pdf-link svg { width: 14px; height: 14px; }
.oesbv-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 16px;
  gap: 8px;
  min-width: 150px;
}
.oesbv-reg-deadline {
  font-size: 11px;
  color: var(--oesbv-muted);
  text-align: right;
}

/* status pills */
.oesbv-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.oesbv-status-pill--upcoming  { background: #e8f5ee; color: var(--oesbv-teal); }
.oesbv-status-pill--ongoing   { background: #fff8e6; color: #b07d00; }
.oesbv-status-pill--completed { background: #f0f0f0; color: #555; }
.oesbv-status-pill--cancelled { background: var(--oesbv-red-light); color: var(--oesbv-red); }

/* ================================================================
   CALENDAR (Month) VIEW
================================================================ */
.oesbv-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.oesbv-cal-month-title {
  font-family: var(--oesbv-font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--oesbv-dark);
  margin: 0;
}
.oesbv-cal-prev,
.oesbv-cal-next {
  background: var(--oesbv-white);
  border: 1.5px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  padding: 6px 14px;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--oesbv-transition);
  color: var(--oesbv-dark);
  font-weight: 600;
}
.oesbv-cal-prev:hover,
.oesbv-cal-next:hover {
  background: var(--oesbv-red);
  border-color: var(--oesbv-red);
  color: #fff;
}
.oesbv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.oesbv-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oesbv-muted);
  padding: 6px 0;
}
.oesbv-cal-day {
  min-height: 80px;
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: 4px;
  padding: 4px 6px;
  position: relative;
  cursor: default;
  transition: background var(--oesbv-transition);
}
.oesbv-cal-day.is-other-month { background: var(--oesbv-bg); }
.oesbv-cal-day.is-today {
  border-color: var(--oesbv-red);
  box-shadow: inset 0 0 0 1px var(--oesbv-red);
}
.oesbv-cal-day.has-events { cursor: pointer; }
.oesbv-cal-day.has-events:hover { background: var(--oesbv-red-light); }
.oesbv-cal-day__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--oesbv-dark);
}
.oesbv-cal-day.is-other-month .oesbv-cal-day__num { color: #ccc; }
.oesbv-cal-day.is-today .oesbv-cal-day__num { color: var(--oesbv-red); }
.oesbv-cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.oesbv-cal-event-dot {
  display: block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.oesbv-cal-event-dot--admin-only {
  opacity: 0.70;
  display: flex;
  align-items: center;
}
.oesbv-cal-more {
  font-size: 10px;
  color: var(--oesbv-red);
  font-weight: 600;
  padding: 1px 5px;
  cursor: pointer;
}
/* Detail popup */
.oesbv-cal-event-detail {
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
  box-shadow: var(--oesbv-shadow);
  padding: 18px 20px;
  margin-top: 12px;
}
.oesbv-cal-event-detail h4 {
  font-family: var(--oesbv-font-head);
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--oesbv-dark);
}
.oesbv-cal-event-detail p { margin: 0 0 6px; font-size: 14px; color: var(--oesbv-muted); }
.oesbv-cal-detail-close {
  float: right;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--oesbv-muted);
  line-height: 1;
  padding: 0;
}
.oesbv-cal-detail-close:hover { color: var(--oesbv-red); }

/* ================================================================
   NO RESULTS
================================================================ */
.oesbv-no-results {
  padding: 40px 20px;
  text-align: center;
  color: var(--oesbv-muted);
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: var(--oesbv-radius);
}

/* ================================================================
   CALENDAR FOOTER
================================================================ */
.oesbv-cal-footer {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--oesbv-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.oesbv-ical-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--oesbv-muted);
  text-decoration: none;
  font-weight: 600;
}
.oesbv-ical-link svg { width: 14px; height: 14px; }
.oesbv-ical-link:hover { color: var(--oesbv-red); }

/* ================================================================
   FAN GRID
================================================================ */
.oesbv-fan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 4px 0;
}
.oesbv-fan-card {
  background: var(--oesbv-white);
  border-radius: 8px;
  box-shadow: var(--oesbv-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--oesbv-transition), transform var(--oesbv-transition);
  border: 1px solid var(--oesbv-border);
}
.oesbv-fan-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.13);
  transform: translateY(-3px);
}
.oesbv-fan-card__img {
  height: 180px;
  overflow: hidden;
  background: var(--oesbv-dark);
}
.oesbv-fan-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.oesbv-fan-card:hover .oesbv-fan-card__img img { transform: scale(1.04); }
.oesbv-fan-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.oesbv-fan-card__title {
  font-family: var(--oesbv-font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--oesbv-dark);
  margin: 0;
  line-height: 1.2;
}
.oesbv-fan-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--oesbv-muted);
}
.oesbv-fan-card__date,
.oesbv-fan-card__loc {
  display: flex;
  align-items: center;
  gap: 5px;
}
.oesbv-fan-card__date svg,
.oesbv-fan-card__loc svg { width: 13px; height: 13px; flex-shrink: 0; }
.oesbv-fan-card__body .oesbv-btn { margin-top: auto; align-self: flex-start; }

/* ================================================================
   ATHLETE DASHBOARD
================================================================ */
.oesbv-dashboard {
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-radius: 8px;
  box-shadow: var(--oesbv-shadow);
  overflow: hidden;
}
.oesbv-dashboard__header {
  background: var(--oesbv-dark);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.oesbv-dashboard__header h3 {
  font-family: var(--oesbv-font-head);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

/* Quick Links */
.oesbv-dashboard__quicklinks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--oesbv-border);
}
.oesbv-ql-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  text-decoration: none;
  color: var(--oesbv-dark);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-right: 1px solid var(--oesbv-border);
  transition: all var(--oesbv-transition);
}
.oesbv-ql-card:last-child { border-right: none; }
.oesbv-ql-card svg { width: 24px; height: 24px; color: var(--oesbv-red); }
.oesbv-ql-card:hover {
  background: var(--oesbv-red);
  color: #fff;
}
.oesbv-ql-card:hover svg { color: #fff; }

/* Dashboard upcoming list */
.oesbv-dashboard__upcoming { padding: 18px 20px; }
.oesbv-dashboard__upcoming h4 {
  font-family: var(--oesbv-font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--oesbv-dark);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.oesbv-dashboard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.oesbv-dashboard__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--oesbv-bg);
  border-radius: var(--oesbv-radius);
  border: 1px solid var(--oesbv-border);
}
.oesbv-dashboard__item-date {
  background: var(--oesbv-dark);
  color: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  text-align: center;
  min-width: 50px;
  flex-shrink: 0;
}
.oesbv-dashboard__item-date .oesbv-day {
  display: block;
  font-family: var(--oesbv-font-head);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.oesbv-dashboard__item-date .oesbv-month {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.75;
  letter-spacing: 0.06em;
}
.oesbv-dashboard__item-info {
  flex: 1;
  min-width: 0;
}
.oesbv-dashboard__item-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--oesbv-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oesbv-dashboard__item-info small {
  display: block;
  font-size: 12px;
  color: var(--oesbv-muted);
}
.oesbv-dashboard__item-action { flex-shrink: 0; }
.oesbv-all-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--oesbv-red);
  text-decoration: none;
}
.oesbv-all-link:hover { text-decoration: underline; }

/* ================================================================
   UPCOMING SIDEBAR LIST
================================================================ */
.oesbv-upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.oesbv-upcoming-item {
  padding: 10px 12px;
  background: var(--oesbv-white);
  border: 1px solid var(--oesbv-border);
  border-left: 3px solid var(--oesbv-red);
  border-radius: 0 var(--oesbv-radius) var(--oesbv-radius) 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.oesbv-upcoming-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--oesbv-red);
  font-family: var(--oesbv-font-head);
  letter-spacing: 0.05em;
}
.oesbv-upcoming-item a {
  font-size: 14px;
  font-weight: 600;
  color: var(--oesbv-dark);
  text-decoration: none;
}
.oesbv-upcoming-item a:hover { color: var(--oesbv-red); }
.oesbv-upcoming-item small {
  font-size: 12px;
  color: var(--oesbv-muted);
}
.oesbv-no-events { color: var(--oesbv-muted); font-style: italic; font-size: 14px; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
  .oesbv-dashboard__quicklinks { grid-template-columns: repeat(2, 1fr); }
  .oesbv-ql-card:nth-child(2) { border-right: none; }
  .oesbv-ql-card:nth-child(3) { border-top: 1px solid var(--oesbv-border); }
  .oesbv-tournament-card { grid-template-columns: 80px 1fr; }
  .oesbv-card__actions { grid-column: 1 / -1; flex-direction: row; padding: 0 14px 14px; border-top: 1px solid var(--oesbv-border); justify-content: flex-start; }
}
@media (max-width: 640px) {
  .oesbv-filters__row { flex-direction: column; }
  .oesbv-filter-group, .oesbv-filter-group--date { min-width: 100%; max-width: 100%; }
  .oesbv-filters__actions { flex-direction: column; align-items: stretch; }
  .oesbv-regionen-checkboxes { gap: 6px 10px; }
  .oesbv-view-toggle { width: 100%; }
  .oesbv-view-btn { flex: 1; justify-content: center; }
  .oesbv-tournament-card { grid-template-columns: 70px 1fr; }
  .oesbv-card__date-col .oesbv-day { font-size: 24px; }
  .oesbv-card__title { font-size: 17px; }
  .oesbv-cal-grid { gap: 2px; }
  .oesbv-cal-day { min-height: 60px; }
  .oesbv-cal-event-dot { display: none; }
  .oesbv-cal-day.has-events::after {
    content: '';
    display: block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--oesbv-red);
    margin: 3px auto 0;
  }
  .oesbv-fan-grid { grid-template-columns: 1fr; }
  .oesbv-dashboard__quicklinks { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .oesbv-dashboard__item { flex-wrap: wrap; }
  .oesbv-sort-bar { font-size: 12px; }
}

/* =============================================================
   QUICK-ADD TOURNAMENT MODAL
============================================================= */

/* Overlay / backdrop */
.oesbv-qa-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 10, 20, 0.65);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.oesbv-qa-overlay.is-open {
    display: flex;
}

/* Modal box */
.oesbv-qa-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
    animation: oesbv-qa-in 0.22s ease;
    overflow: hidden;
}
@keyframes oesbv-qa-in {
    from { opacity: 0; transform: translateY(-18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}

/* Header */
.oesbv-qa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: var(--oesbv-dark, #1a1a2e);
    color: #fff;
    flex-shrink: 0;
}
.oesbv-qa-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.oesbv-qa-header__left svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--oesbv-red, #C0392B);
    stroke: var(--oesbv-red, #C0392B);
}
.oesbv-qa-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
}
.oesbv-qa-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    line-height: 0;
    transition: background 0.15s, color 0.15s;
}
.oesbv-qa-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.oesbv-qa-close svg {
    width: 20px;
    height: 20px;
}

/* Notice bar */
.oesbv-qa-notice {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    flex-shrink: 0;
}
.oesbv-qa-notice--error {
    background: #fdf0ee;
    color: #c0392b;
    border-color: #f5c6c0;
}
.oesbv-qa-notice--success {
    background: #edfaf3;
    color: #1a6b40;
    border-color: #b7e4ca;
}

/* Scrollable body */
.oesbv-qa-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Field row (two columns) */
.oesbv-qa-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Individual field */
.oesbv-qa-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.oesbv-qa-field--full {
    grid-column: 1 / -1;
}
.oesbv-qa-field label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}
.oesbv-qa-required {
    color: var(--oesbv-red, #C0392B);
    margin-left: 2px;
}
.oesbv-qa-field input[type="text"],
.oesbv-qa-field input[type="url"],
.oesbv-qa-field input[type="date"],
.oesbv-qa-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    appearance: auto;
}
.oesbv-qa-field input:focus,
.oesbv-qa-field select:focus {
    border-color: var(--oesbv-red, #C0392B);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
    outline: none;
}
.oesbv-qa-field input.oesbv-qa-error {
    border-color: var(--oesbv-red, #C0392B);
    background: #fff8f7;
}

/* Checkbox label */
.oesbv-qa-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-transform: none;
    letter-spacing: 0;
}
.oesbv-qa-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--oesbv-red, #C0392B);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* Footer */
.oesbv-qa-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    flex-shrink: 0;
}
.oesbv-qa-btn-cancel {
    background: #fff;
    color: #555;
    border: 1.5px solid #ddd;
}
.oesbv-qa-btn-cancel:hover {
    border-color: #bbb;
    color: #222;
}
.oesbv-qa-btn-save {
    display: flex;
    align-items: center;
    gap: 8px;
}
.oesbv-qa-btn-save svg {
    width: 16px;
    height: 16px;
}
.oesbv-qa-btn-save:disabled,
.oesbv-qa-btn-save.is-saving {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Admin hint on calendar day cells */
.oesbv-cal-day.is-clickable-admin {
    cursor: pointer;
}
.oesbv-cal-day.is-clickable-admin:not(.is-other-month):hover {
    background: rgba(192, 57, 43, 0.06);
    outline: 2px dashed rgba(192, 57, 43, 0.35);
    outline-offset: -3px;
}
.oesbv-cal-day.is-clickable-admin:not(.is-other-month):hover .oesbv-cal-day__num::after {
    content: ' +';
    color: var(--oesbv-red, #C0392B);
    font-weight: 900;
    font-size: 0.9em;
}

/* Mobile adjustments */
@media (max-width: 520px) {
    .oesbv-qa-modal { max-height: 100vh; border-radius: 0; }
    .oesbv-qa-overlay { padding: 0; align-items: flex-end; }
    .oesbv-qa-modal { animation: oesbv-qa-in-mobile 0.25s ease; }
    @keyframes oesbv-qa-in-mobile {
        from { opacity: 0; transform: translateY(40px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .oesbv-qa-row { grid-template-columns: 1fr; }
    .oesbv-qa-footer { flex-direction: column-reverse; }
    .oesbv-qa-footer .oesbv-btn { width: 100%; justify-content: center; }
}

/* =============================================================
   DUPLICATE BUTTON
============================================================= */
.oesbv-btn--duplicate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid var(--oesbv-border, #ddd);
    border-radius: 6px;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    line-height: 1;
    white-space: nowrap;
}
.oesbv-btn--duplicate svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.oesbv-btn--duplicate:hover {
    border-color: var(--oesbv-red, #C0392B);
    color: var(--oesbv-red, #C0392B);
    background: rgba(192,57,43,0.04);
}
.oesbv-btn--duplicate:active {
    background: rgba(192,57,43,0.09);
}
/* small variant used in calendar day detail */
.oesbv-btn--duplicate.oesbv-btn--sm {
    padding: 4px 10px;
    font-size: 12px;
}
.oesbv-btn--duplicate.oesbv-btn--sm svg {
    width: 12px;
    height: 12px;
}

/* =============================================================
   QUICK-ADD MODAL: info notice (used during duplication)
============================================================= */
.oesbv-qa-notice--info {
    background: #f0f4ff;
    color: #1a3a8f;
    border-color: #c0d0f5;
}

/* =============================================================
   EDIT TOURNAMENT MODAL
============================================================= */

/* Wider modal for the richer edit form */
.oesbv-edit-modal {
    max-width: 700px;
}

/* Header accent colour: teal/blue to visually distinguish from the
   create-modal (dark) at a glance */
.oesbv-edit-modal .oesbv-qa-header {
    background: #1a3a5c;
}
.oesbv-edit-modal .oesbv-qa-header__left svg {
    color: #4db8ff;
    stroke: #4db8ff;
}

/* Backend link row */
.oesbv-edit-admin-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f4ff;
    border: 1px solid #c0d0f5;
}
.oesbv-edit-admin-link a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a8f;
    text-decoration: none;
}
.oesbv-edit-admin-link a:hover {
    text-decoration: underline;
}
.oesbv-edit-admin-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Edit button inside calendar day-detail panel */
.oesbv-edit-btn {
    background: #f0f4ff;
    color: #1a3a5c;
    border: 1.5px solid #c0d0f5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.oesbv-edit-btn:hover {
    background: #1a3a5c;
    color: #fff;
    border-color: #1a3a5c;
}

/* Clickable title + date-col in list cards for admins */
.oesbv-cal-wrap.has-edit-role .oesbv-tournament-card .oesbv-card__title,
.oesbv-cal-wrap.has-edit-role .oesbv-tournament-card .oesbv-card__date-col {
    cursor: pointer;
}
.oesbv-cal-wrap.has-edit-role .oesbv-tournament-card .oesbv-card__date-col {
    position: relative;
}
.oesbv-cal-wrap.has-edit-role .oesbv-tournament-card .oesbv-card__date-col::after {
    content: '✎';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s;
    color: rgba(255,255,255,0.9);
}
.oesbv-cal-wrap.has-edit-role .oesbv-tournament-card:hover .oesbv-card__date-col::after {
    opacity: 1;
}
