/* ==========================================================================
   Web window (js/webwindow.js): external pages and PDFs of the navbar menus.
   Window frame from requires/obsadzovnik.css; this file adds the page, the loader and the tabs.
   ========================================================================== */

.ww-body {
  background: #f8fafc;
}

.ww-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ww-frame.is-ready {
  opacity: 1;
}

/* ---- Loader ---- */
.ww-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.ww-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.ww-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: obsSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ww-loader-card * {
  text-align: center;
}

.ww-spinner {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
}

.ww-spinner svg {
  width: 100%;
  height: 100%;
  animation: wwSpin 1.4s linear infinite;
}

.ww-spinner-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 6;
}

.ww-spinner-arc {
  fill: none;
  stroke: #3da870;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 60 214;
  animation: wwArc 1.4s ease-in-out infinite;
}

.ww-spinner i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #3da870;
  animation: wwBreathe 1.4s ease-in-out infinite;
}

.ww-loader-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.ww-loader-host {
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
}

.ww-loader-bar {
  position: relative;
  width: 240px;
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.ww-loader-bar span {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6fcf97, #3da870);
  animation: wwBar 1.3s ease-in-out infinite;
}

.ww-loader-hint {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ww-loader-hint.is-visible {
  opacity: 1;
}

@keyframes wwSpin {
  to { transform: rotate(360deg); }
}

@keyframes wwArc {
  0% { stroke-dasharray: 20 214; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 130 214; stroke-dashoffset: -40; }
  100% { stroke-dasharray: 20 214; stroke-dashoffset: -214; }
}

@keyframes wwBreathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes wwBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ---- Header ---- */
.ww-status.is-loading {
  color: #64748b;
}

.ww-status-spin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #c3ebd5;
  border-top-color: #3da870;
  animation: wwSpin 0.8s linear infinite;
}

.ww-restart {
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ww-restart i {
  color: #3da870;
}

.ww-restart:hover {
  background: #eef8f2;
  border-color: #c3ebd5;
}

.ww-restart:active {
  transform: scale(0.97);
}

/* ---- Bottom bar: the pages of the menu (scrolls sideways when they do not fit) ---- */
.ww-picker {
  min-width: 0;
}

.ww-tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}

.ww-tabs::-webkit-scrollbar {
  display: none;
}

.ww-tabs .obs-day-card-btn {
  flex: 1 0 auto;
  padding: 0 14px;
  /* Sizes change instantly so fitTabs() measures the final width */
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ww-tabs .obs-day-card-btn:hover {
  transform: none;
}

.ww-tabs .obs-day-name {
  white-space: nowrap;
  font-size: 14.5px;
}

/* Set by fitTabs() when the buttons do not fit: tighter first, then smaller text without the menu name */
.ww-picker.is-compact .ww-tabs {
  gap: 4px;
}

.ww-picker.is-compact .ww-tabs .obs-day-card-btn {
  padding: 0 9px;
}

.ww-picker.is-compact .ww-tabs .obs-day-name {
  font-size: 13.5px;
}

.ww-picker.is-tight .obs-box-header-title {
  display: none;
}

.ww-picker.is-tight .ww-tabs .obs-day-card-btn {
  padding: 0 7px;
}

.ww-picker.is-tight .ww-tabs .obs-day-name {
  font-size: 12.5px;
}
