.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #222;
  color: white;
  padding: 15px 20px;
  font-family: 'Poppins', sans-serif;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  overflow: hidden;
  max-height: 80px;
  transition: max-height 0.3s ease;
  box-sizing: border-box;
}

.cookie-banner.expanded {
  flex-direction: column;
  align-items: flex-start;
  max-height: 220px; /* lub kontrolowane JS */
  padding-bottom: 15px;
  overflow: hidden;
}

.cookie-message p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.cookie-banner button {
  background-color: #ff4444;
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
  display: inline-block; /* zapewniamy widoczność */
  min-width: 80px; /* minimalna szerokość */
  box-sizing: border-box;
}

.cookie-banner button:hover {
  background-color: #cc0000;
}

.cookie-expanded {
  width: 100%;
  margin-top: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.cookie-expanded.hidden {
  display: none;
}

#short-text {
  width: 100%;
}

/* Responsywność dla ekranów do 480px */
@media (max-width: 480px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 15px;
    max-height: 100px;
  }

  .cookie-banner.expanded {
    max-height: 300px;
    padding-bottom: 12px;
  }

  .cookie-message p {
    font-size: 0.9rem;
  }

  .cookie-banner button {
    font-size: 0.9rem;
    padding: 6px 12px;
    margin-top: 10px;
    align-self: flex-end;
  }

  .cookie-expanded {
    font-size: 0.9rem;
    margin-top: 12px;
  }
}

/* Dodatkowa poprawka dla bardzo wąskich ekranów poniżej 400px */
@media (max-width: 400px) {
  .cookie-banner button {
    font-size: 0.85rem;
    padding: 6px 10px;
    margin-top: 10px;
    align-self: flex-end;
    display: inline-block !important; /* wymusza widoczność */
    min-width: 70px; /* minimalna szerokość */
    box-sizing: border-box;
  }
}
