/* ============================================
   Top Info Banner – style front office
   ============================================ */

.topinfobanner {
  position: relative;
  width: 100%;
  z-index: 1050;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  animation: topinfobanner-slide-in 0.4s ease-out;
}

.topinfobanner__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 48px 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topinfobanner__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
}

.topinfobanner__text {
  flex: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topinfobanner__text p {
  margin: 0;
}

.topinfobanner__text a {
  text-decoration: underline;
  color: inherit;
  font-weight: 700;
}

.topinfobanner__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.topinfobanner__close:hover {
  opacity: 1;
}

/* ---------- Warianty kolorystyczne ---------- */

.topinfobanner--warning {
  background: linear-gradient(90deg, #fff3cd 0%, #ffe69c 100%);
  color: #664d03;
  border-bottom: 3px solid #ffc107;
}
.topinfobanner--warning .topinfobanner__icon { color: #b58900; }

.topinfobanner--info {
  background: linear-gradient(90deg, #cfe2ff 0%, #b6d4fe 100%);
  color: #084298;
  border-bottom: 3px solid #0d6efd;
}
.topinfobanner--info .topinfobanner__icon { color: #0d6efd; }

.topinfobanner--danger {
  background: linear-gradient(90deg, #f8d7da 0%, #f1aeb5 100%);
  color: #58151c;
  border-bottom: 3px solid #dc3545;
}
.topinfobanner--danger .topinfobanner__icon { color: #dc3545; }

.topinfobanner--success {
  background: linear-gradient(90deg, #d1e7dd 0%, #a3cfbb 100%);
  color: #0a3622;
  border-bottom: 3px solid #198754;
}
.topinfobanner--success .topinfobanner__icon { color: #198754; }

/* ---------- Animacja wejścia ---------- */

@keyframes topinfobanner-slide-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------- Responsywność ---------- */

@media (max-width: 767px) {
  .topinfobanner__inner {
    padding: 10px 40px 10px 12px;
    gap: 8px;
  }
  .topinfobanner {
    font-size: 0.875rem;
  }
  .topinfobanner__icon {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
}

@media print {
  .topinfobanner {
    display: none !important;
  }
}
