/* v1.3.37 — independently editable, natural-aspect header/footer widget logos.
 * These classes also support WordPress's standard Image block inside either
 * dedicated widget area. Inline CSS variables come from sanitized dimensions. */
.kl-brand-logo-area {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}
.kl-brand-logo-area .kl-brand-logo-widget {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  align-items: center;
}
.kl-brand-logo-area .kl-brand-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  text-decoration: none;
}
/* The image must retain its own aspect ratio. The previous forced 40px
 * image box produced a tiny logo for images with different proportions. */
.kl-brand-logo-area .kl-brand-logo-image {
  display: block;
  flex: 0 1 auto;
  width: min(100%, var(--kl-logo-desktop-width, 198px));
  height: auto;
  max-height: var(--kl-logo-desktop-height, 56px);
  max-width: 100%;
  object-fit: contain;
}
.kl-brand-logo-area .kl-brand-logo-mark {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: auto;
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
}
/* A standard Image block is also accepted in logo widget areas. */
.kl-brand-logo-area .wp-block-image,
.kl-brand-logo-area .widget_media_image {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}
.kl-brand-logo-area :is(.wp-block-image, .widget_media_image) img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 68px;
  object-fit: contain;
}
/* Desktop header: preserve original alignment with the navigation. */
#desktop-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-image {
  width: min(100%, var(--kl-logo-desktop-width, 162px));
  max-height: var(--kl-logo-desktop-height, 40px);
}
#desktop-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-mark {
  width: 30px;
  max-height: 32px;
}
/* Footer gets its own larger default, not the cramped header size. */
.kl-footer--desktop .kl-brand-logo-area .kl-brand-logo-image {
  width: min(100%, var(--kl-logo-desktop-width, 240px));
  max-height: var(--kl-logo-desktop-height, 64px);
}
.kl-footer--desktop .kl-brand-logo-area .kl-brand-logo-mark {
  width: 52px;
  max-height: 52px;
}
.kl-footer--desktop .kl-brand-logo-area :is(.wp-block-image, .widget_media_image) img {
  max-height: 80px;
}
@media (max-width: 899px) {
  #mobile-header [data-name="Brand"] .kl-brand-logo-area {
    max-width: 100%;
    flex: 0 1 auto;
  }
  #mobile-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-link { gap: 3px; }
  #mobile-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-image {
    width: min(100%, var(--kl-logo-mobile-width, 106px));
    height: auto;
    max-height: var(--kl-logo-mobile-height, 30px);
  }
  #mobile-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-mark {
    width: 24px; max-height: 24px;
  }
  #mobile-header [data-name="Brand"] .kl-brand-logo-area :is(.wp-block-image, .widget_media_image) img {
    max-height: 30px;
  }
  .kl-footer--mobile .kl-brand-logo-area .kl-brand-logo-image {
    width: min(100%, var(--kl-logo-mobile-width, 190px));
    max-height: var(--kl-logo-mobile-height, 56px);
  }
  .kl-footer--mobile .kl-brand-logo-area .kl-brand-logo-mark {
    width: 32px; max-height: 32px;
  }
  .kl-footer--mobile .kl-brand-logo-area :is(.wp-block-image, .widget_media_image) img {
    max-height: 64px;
  }
}
@media (max-width: 350px) {
  #mobile-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-image {
    width: min(100%, var(--kl-logo-mobile-width, 86px));
    max-height: var(--kl-logo-mobile-height, 26px);
  }
  #mobile-header [data-name="Brand"] .kl-brand-logo-area .kl-brand-logo-mark {
    width: 20px; max-height: 22px;
  }
}
