.cookies {
  width: 100%;
  max-width: 100vw; /* FIX: Prevent overflow */
  position: fixed;
  bottom: 0;
  color: var(--color-light_gray);
  background-color: var(--color-green-interm);
  z-index: 300;
  display: none;
  box-sizing: border-box; /* FIX: Include padding in width */
}

@media only screen and (max-width: 75em) {
  .cookies {
    padding: 1rem 0;
  }
}

@media only screen and (max-width: 62.5em) {
  .cookies {
    padding: 2.5rem 0;
  }
}

@media only screen and (max-width: 58em) {
  .cookies {
    padding: 5rem 0;
  }
}

@media only screen and (max-width: 37.5em) {
  .cookies {
    padding: 8rem 0;
  }
}

.cookies__container {
  /* FIX: Changed from fixed 1600px to responsive max-width */
  width: 100%;
  max-width: 1600px;
  margin: auto;
  padding: 0 2rem; /* FIX: Add horizontal padding */
  box-sizing: border-box;
}

@media only screen and (max-width: 75em) {
  .cookies__container {
    width: 100%;
    padding: 0 2rem;
  }
}

.cookies__container-box {
  width: 85%;
  margin: auto;
}

@media only screen and (max-width: 58em) {
  .cookies__container-box {
    width: 95%; /* FIX: More width on smaller screens */
  }
}

.cookies__message {
  min-height: 7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookies__message p {
  font-size: 1.8rem;
  font-family: inherit;
  flex: 1; /* FIX: Allow text to shrink */
  min-width: 0; /* FIX: Allow text to wrap properly */
}

@media only screen and (max-width: 62.5em) {
  .cookies__message p {
    padding: 2rem 0;
  }
}

@media only screen and (max-width: 58em) {
  .cookies__message p {
    font-size: 2.5rem;
  }
}

@media only screen and (max-width: 37.5em) {
  .cookies__message p {
    font-size: 3rem;
  }
}

.cookies__message p a {
  text-decoration: underline;
  color: var(--color-green_light);
  font-style: italic;
  font-size: 1.5rem;
}

@media only screen and (max-width: 62.5em) {
  .cookies__message p a {
    padding: 1.8rem 0;
  }
}

@media only screen and (max-width: 58em) {
  .cookies__message p a {
    font-size: 2rem;
  }
}

@media only screen and (max-width: 37.5em) {
  .cookies__message p a {
    font-size: 2.2rem;
  }
}

.cookies-btn {
  border-radius: 0.5rem;
  padding: 0.8rem 1.2rem;
  font-size: 1.2rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 0.2rem solid var(--color-light_gray);
  background-color: var(--color-orange_light);
  color: var(--color-green);
  letter-spacing: 0.05rem;
  flex-shrink: 0; /* FIX: Prevent button from shrinking */
  white-space: nowrap; /* FIX: Keep button text on one line */
}

@media only screen and (max-width: 58em) {
  .cookies-btn {
    border-radius: 0.5rem;
    padding: 1.5rem 2rem;
    font-size: 2.4rem;
  }
}

@media only screen and (max-width: 37.5em) {
  .cookies-btn {
    border-radius: 0.6rem;
    padding: 1.5rem 3rem;
    font-size: 2.8rem;
  }
}