/* =========================================================
   eLearning.ee — Cookie consent
   Dark premium variant
========================================================= */

.cookie-consent[hidden] {
  display: none;
}

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

  padding: 18px;

  opacity: 0;
  transform: translateY(14px);

  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.cookie-consent.show {
  opacity: 1;
  transform: translateY(0);
}

.cookie-consent-inner {
  width: min(940px, 100%);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 28px;

  padding: 22px 24px;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      rgba(31, 31, 33, 0.98),
      rgba(39, 39, 42, 0.96)
    );

  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}


/* ---------------------------------------------------------
   Copy
--------------------------------------------------------- */

.cookie-consent-copy {
  min-width: 0;
  max-width: 650px;
}

.cookie-consent-title {
  font-size: 16px;
  font-weight: 700;

  line-height: 1.25;

  letter-spacing: -0.02em;

  color: rgba(255, 255, 255, 0.96);
}

.cookie-consent-text {
  margin-top: 7px;

  font-size: 13px;
  line-height: 1.6;

  color: rgba(255, 255, 255, 0.62);
}

.cookie-consent-privacy {
  display: inline-flex;

  margin-top: 8px;

  font-size: 12px;
  font-weight: 550;

  text-decoration: underline;
  text-underline-offset: 3px;

  color: rgba(255, 255, 255, 0.78);

  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

.cookie-consent-privacy:hover {
  color: #fff;
}


/* ---------------------------------------------------------
   Actions
--------------------------------------------------------- */

.cookie-consent-actions {
  display: flex;
  align-items: center;

  gap: 10px;

  flex: 0 0 auto;
}

.cookie-choice-btn {
  appearance: none;

  min-height: 42px;

  padding: 10px 16px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 650;

  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.cookie-choice-btn:hover {
  transform: translateY(-1px);
}

.cookie-choice-btn:active {
  transform: translateY(0);
}


/*
 * Decline = dark transparent button.
 */
.cookie-choice-btn[data-cookie-decline] {
  border: 1px solid rgba(255, 255, 255, 0.24);

  background: rgba(255, 255, 255, 0.015);

  color: rgba(255, 255, 255, 0.88);
}

.cookie-choice-btn[data-cookie-decline]:hover {
  border-color: rgba(255, 255, 255, 0.38);

  background: rgba(255, 255, 255, 0.05);

  color: #fff;
}


/*
 * Accept = light primary button.
 */
.cookie-choice-btn[data-cookie-accept] {
  border: 1px solid rgba(255, 255, 255, 0.9);

  background: #fff;

  color: #1d1d1f;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.16);
}

.cookie-choice-btn[data-cookie-accept]:hover {
  background: #f4f4f5;

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.2);
}


/* ---------------------------------------------------------
   Cookie settings link used on Privacy page / footer
--------------------------------------------------------- */

.cookie-settings-link {
  appearance: none;

  padding: 0;

  border: 0;

  background: transparent;

  font: inherit;
  font-size: 13px;

  color: rgba(0, 0, 0, 0.5);

  cursor: pointer;

  text-decoration: underline;
  text-underline-offset: 3px;

  transition: color 0.18s ease;
}

.cookie-settings-link:hover {
  color: var(--text);
}


/* ---------------------------------------------------------
   Focus states
--------------------------------------------------------- */

.cookie-choice-btn:focus-visible,
.cookie-consent-privacy:focus-visible,
.cookie-settings-link:focus-visible {
  outline: 3px solid rgba(114, 185, 230, 0.42);
  outline-offset: 3px;
}


/* ---------------------------------------------------------
   Tablet / small desktop
--------------------------------------------------------- */

@media (max-width: 820px) {

  .cookie-consent {
    padding: 14px;
  }

  .cookie-consent-inner {
    align-items: stretch;

    flex-direction: column;

    gap: 16px;

    padding: 20px;

    border-radius: 22px;
  }

  .cookie-consent-copy {
    max-width: none;
  }

  .cookie-consent-actions {
    width: 100%;
  }

  .cookie-choice-btn {
    flex: 1 1 0;
  }
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 520px) {

  .cookie-consent {
    padding: 10px;
  }

  .cookie-consent-inner {
    padding: 18px;

    gap: 16px;

    border-radius: 20px;
  }

  .cookie-consent-title {
    font-size: 15px;
  }

  .cookie-consent-text {
    font-size: 12.5px;

    line-height: 1.58;
  }

  .cookie-consent-actions {
    flex-direction: column;
  }

  .cookie-choice-btn {
    width: 100%;

    min-height: 44px;

    font-size: 12px;
  }
}


/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

  .cookie-consent,
  .cookie-choice-btn,
  .cookie-consent-privacy,
  .cookie-settings-link {
    transition: none;
  }
}
