/* ========== Cookie Consent Banner (Full CSS) ========== */

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 999999;

  padding: 16px;
  box-sizing: border-box;

  background: linear-gradient(135deg, #7F94F5, #5D72E8);
  color: #fff;

  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
}

/* Content width (keeps it nice on big screens) */
.cookie-consent p,
#cookie-preferences,
.cookie-buttons {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Main text */
.cookie-consent p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.55;
  color: #fff;
  text-align: left;
}

/* ========== Preferences Accordion Panel ========== */
#cookie-preferences {
  display: none;            /* accordion starts closed */
  overflow: hidden;         /* prevents jumpy edges */
  will-change: height;      /* smoother slide in some browsers */

  margin-top: 12px;
  padding: 12px 14px;
  box-sizing: border-box;

  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;

  text-align: left;
}

/* "Valige küpsiste seaded:" line */
#cookie-preferences p {
  margin: 0 0 10px 0;
  font-weight: 800;
  color: #fff;
}

/* Checkboxes + labels */
#cookie-preferences input[type="checkbox"] {
  margin: 0 8px 0 0;
  transform: translateY(1px);
}

#cookie-preferences label {
  color: #fff;              /* <-- this makes Vajalik/Eelistused/etc white */
  font-weight: 700;
  margin-right: 16px;
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

/* ========== Buttons ========== */
.cookie-buttons {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-buttons button {
  appearance: none;
  border: 0;
  border-radius: 10px;

  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}

/* "Seaded" button (secondary) */
#allow-preferences-cookies {
  position: relative;
  padding-right: 40px; /* room for arrow */

  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

#allow-preferences-cookies:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Arrow icon */
#allow-preferences-cookies::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  font-size: 14px;
  opacity: 0.95;
}

/* Open state */
#allow-preferences-cookies.is-open {
  background: rgba(255, 255, 255, 0.28);
}

#allow-preferences-cookies.is-open::after {
  transform: translateY(-50%) rotate(180deg);
}

/* "Luba kõik küpsised" button (primary) */
#allow-all-cookies {
  background: #fff;
  color: #2b2b2b;
}

#allow-all-cookies:hover {
  opacity: 0.92;
}

.cookie-buttons button:active {
  transform: scale(0.98);
}

/* ========== Mobile ========== */
@media (max-width: 768px) {
  .cookie-consent {
    padding: 14px;
  }

  .cookie-consent p {
    font-size: 13px;
  }

  .cookie-buttons {
    justify-content: stretch;
  }

  .cookie-buttons button {
    width: 100%;
  }

  #cookie-preferences label {
    margin-right: 12px;
  }
}
