/**
 * Shared footer chrome (all layouts).
 * Layout-specific rules: components/footer/layout-*.css
 */

.kutby-footer {
  background: var(--kutby-color-surface);
  border-top: 1px solid var(--kutby-color-border);
  padding-block: var(--kutby-space-8);
  margin-top: auto;
  color: var(--kutby-color-text);
}

.kutby-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--kutby-space-4);
  margin-bottom: var(--kutby-space-6);
}

.kutby-footer__grid {
  display: grid;
  gap: var(--kutby-space-6);
}

@media (min-width: 768px) {
  .kutby-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .kutby-footer__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kutby-footer__grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.kutby-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--kutby-space-4);
  margin-top: var(--kutby-space-6);
  padding-top: var(--kutby-space-4);
  border-top: 1px solid var(--kutby-color-border);
  color: var(--kutby-color-muted);
  font-size: var(--kutby-font-size-sm);
}

.kutby-footer-copyright a {
  color: inherit;
  text-decoration: none;
}

.kutby-footer-copyright a:hover,
.kutby-footer-copyright a:focus-visible {
  color: var(--kutby-color-link);
}

.kutby-footer-nav ul,
.kutby-footer-social,
.kutby-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--kutby-space-3);
}

.kutby-footer-nav a {
  color: var(--kutby-color-text);
  text-decoration: none;
  transition: color var(--kutby-transition);
}

.kutby-footer-nav a:hover,
.kutby-footer-nav a:focus-visible {
  color: var(--kutby-color-link);
}

.kutby-footer-social a,
.kutby-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kutby-color-text);
  text-decoration: none;
}

.kutby-footer-newsletter__title {
  margin: 0 0 var(--kutby-space-2);
  font-weight: 700;
}

.kutby-footer-newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kutby-space-2);
}

.kutby-footer-newsletter__input {
  flex: 1 1 12rem;
  min-width: 0;
  padding: var(--kutby-space-2) var(--kutby-space-3);
  border: 1px solid var(--kutby-color-border);
  border-radius: var(--kutby-radius-sm);
  background: var(--kutby-color-bg);
  color: var(--kutby-color-text);
  font: inherit;
}

.kutby-footer-newsletter__input:focus {
  outline: none;
  border-color: var(--kutby-color-link);
  box-shadow: var(--kutby-focus-ring);
}

.kutby-footer-payment {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--kutby-space-2);
}

.kutby-footer-payment__label {
  display: inline-block;
  padding: var(--kutby-space-1) var(--kutby-space-2);
  border: 1px solid var(--kutby-color-border);
  border-radius: var(--kutby-radius-sm);
  background: var(--kutby-color-bg);
  font-size: var(--kutby-font-size-sm);
}

.kutby-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kutby-space-4);
}

.kutby-back-to-top {
  position: fixed;
  inset-inline-end: var(--kutby-space-4);
  inset-block-end: var(--kutby-space-4);
  z-index: var(--kutby-z-sticky, 200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--kutby-color-border);
  border-radius: var(--kutby-radius-sm);
  background: var(--kutby-color-bg);
  color: var(--kutby-color-text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--kutby-transition), visibility var(--kutby-transition), background-color var(--kutby-transition);
}

.kutby-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.kutby-back-to-top:hover,
.kutby-back-to-top:focus-visible {
  background: var(--kutby-color-surface);
  color: var(--kutby-color-link);
}

.kutby-back-to-top:focus-visible {
  outline: none;
  box-shadow: var(--kutby-focus-ring);
}
