/*
 * GnomeWorks Client Footer v1.3.3
 * Reusable component for Bootstrap/plain HTML and WordPress themes.
 *
 * IMPORTANT: keep geometry/opacity behavior intact. Adapt a client website by
 * overriding only the theme tokens below (and max-width only when needed).
 */

.gw-credit-footer {
  /* ===== THEME TOKENS: map these to the client website ===== */
  --gw-credit-bg: #ffffff;
  --gw-credit-text: #657168;
  --gw-credit-strong: #173f2c;
  --gw-credit-accent: #173f2c;
  --gw-credit-logo-figure: #ffffff;
  --gw-credit-border: color-mix(in srgb, var(--gw-credit-accent) 10%, transparent);
  --gw-credit-max-width: 1320px;

  /* ===== COMPONENT GEOMETRY: normally do not change ===== */
  width: 100%;
  border-top: 1px solid var(--gw-credit-border);
  background: var(--gw-credit-bg);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
}

.gw-credit-inner {
  width: min(calc(100% - 48px), var(--gw-credit-max-width));
  margin: 0 auto;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--gw-credit-text);
  opacity: .56;
  transition: opacity .18s ease;
}

.gw-credit-footer:hover .gw-credit-inner,
.gw-credit-footer:focus-within .gw-credit-inner {
  opacity: .96;
}

.gw-credit-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font: inherit;
}

.gw-credit-brand:hover,
.gw-credit-brand:focus-visible {
  color: inherit;
  text-decoration: none;
}

/* Two-layer logo: the rounded square follows the client's accent color,
   while the gnome figure stays white. No site-specific logo export needed. */
.gw-credit-logo {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-block;
}

.gw-credit-logo::before,
.gw-credit-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.gw-credit-logo::before {
  color: var(--gw-credit-accent);
  -webkit-mask-image: url("logo-square-mask.png");
  mask-image: url("logo-square-mask.png");
}

.gw-credit-logo::after {
  color: var(--gw-credit-logo-figure);
  -webkit-mask-image: url("logo-figure-mask.png");
  mask-image: url("logo-figure-mask.png");
}

.gw-credit-brand strong {
  font-weight: 700;
  color: var(--gw-credit-strong);
}

.gw-credit-muted {
  color: inherit;
}

/* Explicitly force right-hand typography to match the left-hand brand line. */
.gw-credit-footer .gw-credit-copy {
  margin: 0;
  text-align: right;
  color: inherit;
  font-family: inherit !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.gw-credit-footer .gw-credit-copy a {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.gw-credit-footer .gw-credit-copy a:hover,
.gw-credit-footer .gw-credit-copy a:focus-visible {
  color: var(--gw-credit-accent);
  text-decoration: none;
}

@media (max-width: 991.98px) {
  /* Tablet + phone: keep the component visibly present and use the compact centered brand-only layout. */
  .gw-credit-footer {
    display: block !important;
    visibility: visible !important;
  }

  .gw-credit-inner {
    width: min(calc(100% - 40px), var(--gw-credit-max-width));
    padding: 8px 0;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
    visibility: visible !important;
  }

  .gw-credit-brand {
    display: inline-flex !important;
    visibility: visible !important;
  }

  .gw-credit-copy {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .gw-credit-inner {
    width: min(calc(100% - 28px), var(--gw-credit-max-width));
  }

  .gw-credit-logo {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gw-credit-inner {
    transition: none;
  }
}
