/* Pasek awarii globalnych / prac planowanych — wektormedia.pl
   Dane z CRM eBOK przez proxy api-awarie.php. Design dopasowany do strony:
   font Kumbh Sans, brandowy ciemny niebieski (#003f9e — realny kolor strony), miękkie zaokrąglenia i cienie. */

#wm-awarie {
  --wm-navy: #003f9e; /* ciemny niebieski — realny kolor strony */
  --wm-navy-2: #0a4cb5; /* lekko jaśniejszy odcień na subtelny gradient (głębia) */
  --wm-damage: #ff4757; /* awaria */
  --wm-plan: #26c46a; /* prace planowane */
  --wm-ink: #ffffff;
  --wm-dim: rgba(255, 255, 255, 0.66);
  --wm-line: rgba(255, 255, 255, 0.12);

  position: relative;
  z-index: 2000;
  width: 100%;
  font-family: "Kumbh Sans", sans-serif;
  color: var(--wm-ink);
  background-color: var(
    --wm-navy
  ); /* solidny fallback — gdyby gradient nie wszedł, tło nie będzie białe */
  background-image: linear-gradient(
    135deg,
    var(--wm-navy) 0%,
    var(--wm-navy-2) 100%
  );
  box-shadow: 0 10px 30px -12px rgba(11, 21, 78, 0.55);
  border-bottom: 1px solid var(--wm-line);
  animation: wmAwarieDrop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wmAwarieDrop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#wm-awarie .wm-awarie__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 56px 0 20px;
}

#wm-awarie .wm-awarie__item {
  border-top: 1px solid var(--wm-line);
}
#wm-awarie .wm-awarie__item:first-child {
  border-top: 0;
}

/* klikalny nagłówek wiersza */
#wm-awarie .wm-awarie__head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 0;
  margin: 0;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border-radius: 14px;
  transition: background 0.18s ease;
}
#wm-awarie .wm-awarie__head:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* pill-badge z ikoną typu */
#wm-awarie .wm-awarie__badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 12px -3px rgba(0, 0, 0, 0.4);
}
#wm-awarie .wm-awarie__badge svg {
  width: 14px;
  height: 14px;
}
#wm-awarie .wm-awarie__badge--damage {
  background: var(--wm-damage);
}
#wm-awarie .wm-awarie__badge--plan {
  background: var(--wm-plan);
}

#wm-awarie .wm-awarie__title {
  flex: 1;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.35;
}
#wm-awarie .wm-awarie__chev {
  flex: none;
  width: 20px;
  height: 20px;
  opacity: 0.65;
  transition: transform 0.25s ease;
}
#wm-awarie .wm-awarie__item.is-open .wm-awarie__chev {
  transform: rotate(180deg);
  opacity: 1;
}

/* rozwijane szczegóły — płynne */
#wm-awarie .wm-awarie__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#wm-awarie .wm-awarie__item.is-open .wm-awarie__details {
  max-height: 320px;
}
#wm-awarie .wm-awarie__details-inner {
  padding: 0 0 16px 38px;
  font-size: 14px;
  line-height: 1.6;
}
#wm-awarie .wm-awarie__desc {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 70ch;
}
#wm-awarie .wm-awarie__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
}
#wm-awarie .wm-awarie__meta div {
  font-size: 13px;
  white-space: nowrap;
}
#wm-awarie .wm-awarie__meta b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wm-dim);
  margin-bottom: 1px;
}

/* zamknięcie całego paska */
#wm-awarie .wm-awarie__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: #fff;
  opacity: 0.6;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  transition:
    background 0.18s ease,
    opacity 0.18s ease;
}
#wm-awarie .wm-awarie__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}
#wm-awarie .wm-awarie__close svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 600px) {
  #wm-awarie .wm-awarie__inner {
    padding: 0 50px 0 16px;
  }
  #wm-awarie .wm-awarie__head {
    gap: 10px;
    padding: 12px 0;
  }
  #wm-awarie .wm-awarie__title {
    font-size: 14px;
  }
  #wm-awarie .wm-awarie__details-inner {
    padding-left: 4px;
  }
  #wm-awarie .wm-awarie__meta {
    gap: 8px 0;
    flex-direction: column;
  }
  #wm-awarie .wm-awarie__meta div {
    white-space: normal;
  }
}
