/* Fixed container anchored at screen bottom */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0f172a; /* Deep POPIA-compliant dark background */
  color: #f8fafc;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  z-index: 99999;
  
  /* Slide-up / Down animations */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease-in-out;
}

/* Class toggled by JavaScript to slide up */
.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-text {
  flex: 1 1 500px;
}

.cookie-text p {
  margin: 0;
}

.cookie-text a {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 500;
}

.cookie-text a:hover {
  color: #7dd3fc;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Button styles */
.cookie-btn {
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.cookie-btn-primary {
  background-color: #0284c7; /* Healthcare professional blue */
  color: #ffffff;
}

.cookie-btn-primary:hover {
  background-color: #0369a1;
}

.cookie-btn-secondary {
  background-color: #334155;
  color: #f1f5f9;
}

.cookie-btn-secondary:hover {
  background-color: #475569;
}

/* Mobile Layout */
@media (max-width: 640px) {
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    /* 1. REMOVED height: 30% to let it shrink wrap */
    padding: 12px 16px; /* 2. Reduced vertical padding from 16px to 12px */
    gap: 65px;          /* 3. Reduced gap between text and buttons from 20px to 12px */
  }
  
  .cookie-text {
    flex: unset;        /* 4. Resets the 500px flex-basis constraint */
    font-size: 13px;    /* 5. Slightly smaller text to save vertical lines */
    text-align: center; /* Optional: centers text for a cleaner stacked look */
  }

  .cookie-actions {
    width: 100%;
    flex-direction: row; /* 6. Keeps buttons side-by-side to save huge vertical space */
    gap: 8px;            /* 7. Tight gap between buttons */
  }
  
  .cookie-btn {
    flex: 1;             /* 8. Makes both buttons equal width side-by-side */
    padding: 8px 12px;   /* 9. Slimmer button padding to reduce overall height */
    font-size: 12.5px;
    text-align: center;
  }
}
