/* ============================================================
   VIG1 plugin – Modern Slate "shell" (FullCalendar fölötti rész)
   Scope: #vig1-calendar-shell  (a teljes plugin wrapper)
   Lefedi:
     - Tartozás / figyelmeztető sáv
     - Bejelentkezve sor (nyelv, user, ÁRAK/PROFIL/KILÉPÉS gombok)
     - Helyszín / Terem select-ek
   Nem nyúl a FullCalendar belsejéhez (#vig1-calendar) – azt a
   vig1-calendar-header.css és vig1-calendar.css kezeli.
   ============================================================ */
#vig1-calendar-shell {
  --vig-radius: 10px;
  --vig-bg: #ffffff;
  --vig-bg-muted: #f8fafc;            /* slate-50 */
  --vig-border: #e2e8f0;              /* slate-200 */
  --vig-border-strong: #cbd5e1;       /* slate-300 */
  --vig-text: #0f172a;                /* slate-900 */
  --vig-text-muted: #475569;          /* slate-600 */
  --vig-text-soft: #64748b;           /* slate-500 */
  --vig-primary: #4f46e5;             /* indigo-600 */
  --vig-primary-hover: #4338ca;       /* indigo-700 */
  --vig-danger-bg: #fef2f2;           /* red-50 */
  --vig-danger-border: #fecaca;       /* red-200 */
  --vig-danger-text: #b91c1c;         /* red-700 */
  --vig-danger-text-soft: #dc2626;    /* red-600 */
  --vig-info-bg: #eef2ff;             /* indigo-50 */
  --vig-info-border: #c7d2fe;         /* indigo-200 */
  --vig-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --vig-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  color: var(--vig-text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
/* ---------- 1) Tartozás / figyelmeztetés sáv ---------- */
#vig1-calendar-shell .vig1-debt-banner {
  background: var(--vig-danger-bg);
  border: 1px solid var(--vig-danger-border);
  border-left: 4px solid var(--vig-danger-text-soft);
  border-radius: var(--vig-radius);
  padding: 12px 16px;
  color: var(--vig-danger-text);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--vig-shadow-sm);
}
#vig1-calendar-shell .vig1-debt-banner strong,
#vig1-calendar-shell .vig1-debt-banner b {
  font-weight: 700;
}
#vig1-calendar-shell .vig1-debt-banner .vig1-debt-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--vig-danger-text-soft);
}
/* ---------- 2) Bejelentkezve sor ---------- */
#vig1-calendar-shell .vig1-userbar {
  background: var(--vig-info-bg);
  border: 1px solid var(--vig-info-border);
  border-radius: var(--vig-radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--vig-shadow-sm);
}
#vig1-calendar-shell .vig1-lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--vig-border);
  color: var(--vig-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
#vig1-calendar-shell .vig1-lang-switch:hover {
  background: var(--vig-bg-muted);
  border-color: var(--vig-border-strong);
}
#vig1-calendar-shell .vig1-userbar-info {
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--vig-text-muted);
}
#vig1-calendar-shell .vig1-userbar-info strong,
#vig1-calendar-shell .vig1-userbar-info b {
  color: var(--vig-text);
  font-weight: 600;
}
#vig1-calendar-shell .vig1-userbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* Action gombok (ÁRAK / PROFIL / KILÉPÉS) */
#vig1-calendar-shell .vig1-btn,
#vig1-calendar-shell a.vig1-btn,
#vig1-calendar-shell button.vig1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--vig-primary);
  border: 1px solid var(--vig-primary);
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.05s ease, box-shadow 0.15s ease;
}
#vig1-calendar-shell .vig1-btn:hover:not(:disabled) {
  background: var(--vig-primary-hover);
  border-color: var(--vig-primary-hover);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}
#vig1-calendar-shell .vig1-btn:active:not(:disabled) {
  transform: translateY(1px);
}
#vig1-calendar-shell .vig1-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--vig-primary) 30%, transparent);
}
/* "Kilépés" – másodlagos / veszély hangsúly */
#vig1-calendar-shell .vig1-btn.vig1-btn-secondary,
#vig1-calendar-shell .vig1-btn-logout {
  background: #ffffff;
  color: var(--vig-text) !important;
  border-color: var(--vig-border);
  box-shadow: var(--vig-shadow-sm);
}
#vig1-calendar-shell .vig1-btn.vig1-btn-secondary:hover:not(:disabled),
#vig1-calendar-shell .vig1-btn-logout:hover:not(:disabled) {
  background: var(--vig-bg-muted);
  border-color: var(--vig-border-strong);
  color: var(--vig-text) !important;
}
/* ---------- 3) Helyszín / Terem select panel ---------- */
#vig1-calendar-shell .vig1-filters {
  background: var(--vig-bg);
  border: 1px solid var(--vig-border);
  border-radius: var(--vig-radius);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  box-shadow: var(--vig-shadow-sm);
}
#vig1-calendar-shell .vig1-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#vig1-calendar-shell .vig1-field label,
#vig1-calendar-shell .vig1-filters label {
  font-size: 12px;
  font-weight: 600;
  color: var(--vig-text-muted);
  letter-spacing: 0.01em;
  margin: 0;
}
#vig1-calendar-shell .vig1-filters select,
#vig1-calendar-shell select.vig1-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  border: 1px solid var(--vig-border);
  border-radius: 8px;
  color: var(--vig-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: var(--vig-shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}
#vig1-calendar-shell .vig1-filters select:hover,
#vig1-calendar-shell select.vig1-select:hover {
  border-color: var(--vig-border-strong);
}
#vig1-calendar-shell .vig1-filters select:focus,
#vig1-calendar-shell .vig1-filters select:focus-visible,
#vig1-calendar-shell select.vig1-select:focus,
#vig1-calendar-shell select.vig1-select:focus-visible {
  outline: none;
  border-color: var(--vig-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--vig-primary) 22%, transparent);
}
#vig1-calendar-shell .vig1-filters select:disabled,
#vig1-calendar-shell select.vig1-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--vig-bg-muted);
}
/* ---------- Reszponzív ---------- */
@media (max-width: 640px) {
  #vig1-calendar-shell .vig1-userbar {
    padding: 10px 12px;
  }
  #vig1-calendar-shell .vig1-userbar-info {
    flex-basis: 100%;
    order: 2;
  }
  #vig1-calendar-shell .vig1-userbar-actions {
    width: 100%;
    justify-content: flex-end;
    order: 3;
  }
  #vig1-calendar-shell .vig1-btn {
    flex: 1 1 auto;
    padding: 0 10px;
    font-size: 10px;
  }
  #vig1-calendar-shell .vig1-filters {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}