/**
 * Lemon Interactive
 *
 * @author      Lemon Interactive
 * @copyright   2026 Lemon Interactive
 * @license     One time purchase Licence
 * Registered Trademark & Property of lemon-interactive.fr
 **/
:root {
  --lmaltcha-spacing-sm: 0.5rem;
  --lmaltcha-spacing-md: 1rem;
  --lmaltcha-spacing-lg: 1.5rem;
  --lmaltcha-overlay-bg: rgb(255 255 255 / 0.4);
  --lmaltcha-overlay-border: rgb(255 255 255 / 0.5);
  --lmaltcha-overlay-radius: 10px;
  --lmaltcha-overlay-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --lmaltcha-overlay-min-inline-size: 320px;
  --lmaltcha-overlay-font-size: 1rem;
  --lmaltcha-overlay-footer-font-size: 0.66rem;
  --lmaltcha-z-overlay: 10000;
  --lmaltcha-color-text: rgba(0, 0, 0, 0.8);
}

/* Widget wrapper — specificity bump avoids !important */
body .lmaltcha-widget-wrapper {
  margin-block-end: var(--lmaltcha-spacing-md);
}

/* Altcha component internals */
.altcha-main {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  padding: 0.33rem 0.5rem !important;
  /* override library */
  position: relative;
}

.altcha-widget-wrap .altcha-main {
  line-height: 1;
}

.altcha-widget-wrap .altcha-main svg {
  display: block;
}

/* Code challenge overlay */
.altcha-code-challenge {
  z-index: var(--lmaltcha-z-overlay);
}

.altcha-code-challenge form {
  margin-block-end: 0;
}

/* Floating overlay */
.altcha-overlay {
  --altcha-max-width: 100%;
  --altcha-border-radius: 6px;
  --altcha-color-border: rgb(0 0 0);
  background-color: var(--lmaltcha-overlay-bg);
  border: 1px solid var(--lmaltcha-overlay-border);
  border-radius: var(--lmaltcha-overlay-radius);
  box-shadow: var(--lmaltcha-overlay-shadow);
  min-inline-size: var(--lmaltcha-overlay-min-inline-size);
  padding-block: var(--lmaltcha-spacing-sm) var(--lmaltcha-spacing-md);
  padding-inline: var(--lmaltcha-spacing-md);
}

.altcha-overlay .altcha {
  font-family: system-ui, sans-serif;
  font-size: var(--lmaltcha-overlay-font-size);
}

altcha-widget {
  color: var(--lmaltcha-color-text);
}

altcha-widget .altcha:not([data-floating]) {
  --altcha-max-width: 100%;
}

altcha-widget .altcha:is([data-floating]) {
  --altcha-max-width: 300px;
  box-shadow: var(--lmaltcha-overlay-shadow) !important;
  filter: none !important;
}

.altcha-footer {
  align-items: center;
  background-color: var(--altcha-color-footer-bg, transparent);
  display: flex;
  font-size: var(--lmaltcha-overlay-footer-font-size) !important;
  /* override library */
  justify-content: end;
  opacity: 0.65 !important;
  /* override library */
  padding: 0 0.5rem !important;
}

/* Obfuscation link-as-button */
.altcha-obfuscation-button {
  all: unset;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
