/* Shared UI components used across public pages:
   floating contacts, scroll-top button and cart toast. */

.floating-contacts {
  position: fixed;
  right: 18px;
  bottom: 15vh;
  z-index: 45;
  transform: none;
}

.floating-contacts__toggle {
  position: relative;
  width: 122px;
  min-height: 72px;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(17, 182, 93, 0.96), rgba(255, 213, 74, 0.9));
  box-shadow: 0 22px 48px rgba(17, 182, 93, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 18px;
}

.floating-contacts__toggle-ring {
  position: absolute;
  inset: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-contacts__toggle-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #07110d;
  line-height: 1;
}

.floating-contacts__toggle-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.floating-contacts__toggle-copy small {
  margin-top: 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.floating-contacts__rail {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.floating-contacts.is-open .floating-contacts__rail {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-contacts__item {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  text-decoration: none;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: floatingContactsBob 4.8s ease-in-out infinite;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.floating-contacts__item:nth-child(2) {
  animation-delay: 0.35s;
}

.floating-contacts__item:nth-child(3) {
  animation-delay: 0.7s;
}

.floating-contacts__item:nth-child(4) {
  animation-delay: 1.05s;
}

.floating-contacts__item:hover {
  transform: translateX(-6px) scale(1.04);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34);
  border-color: rgba(255, 255, 255, 0.22);
}

.floating-contacts__item img,
.floating-contacts__item span {
  width: 30px;
  height: 30px;
  display: block;
}

.floating-contacts__item--vodafone {
  background: linear-gradient(135deg, #c9062f, #ff4868);
}

.floating-contacts__item--kyivstar {
  background: linear-gradient(135deg, #1294ff, #35c4ff);
}

.floating-contacts__item--viber {
  background: linear-gradient(135deg, #6e38cb, #8d63ff);
}

.floating-contacts__item--telegram {
  background: linear-gradient(135deg, #1d8fe1, #47d0ff);
}

.account-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid rgba(123, 240, 176, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.account-nav-link__icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  position: relative;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.account-nav-link__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 22px;
  height: 12px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  transform: translateX(-50%);
}

@keyframes floatingContactsBob {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-4px) translateY(-6px);
  }
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 30;
  min-width: 74px;
  height: 74px;
  padding: 10px 12px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(124, 240, 177, 0.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 28%, rgba(124, 240, 177, 0.26), transparent 42%),
    linear-gradient(180deg, rgba(15, 44, 29, 0.96), rgba(8, 19, 14, 0.96));
  color: var(--text);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 18px, 0) scale(0.92);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    visibility 0.28s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.scroll-top:hover {
  border-color: rgba(124, 240, 177, 0.52);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(124, 240, 177, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.scroll-top__icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(124, 240, 177, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.scroll-top__icon::before,
.scroll-top__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
}

.scroll-top__icon::before {
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--brand2);
  border-left: 2px solid var(--brand2);
  transform: translate(-50%, -22%) rotate(45deg);
}

.scroll-top__icon::after {
  width: 2px;
  height: 11px;
  background: linear-gradient(180deg, var(--brand2), rgba(124, 240, 177, 0.3));
  border-radius: 999px;
  transform: translate(-50%, -2%);
}

.scroll-top__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 247, 244, 0.82);
}

.cart-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 130;
  width: min(360px, calc(100% - 24px));
  padding: 16px 18px;
  border-radius: 7px;
  border: 1px solid rgba(123, 240, 176, 0.16);
  background: rgba(7, 15, 13, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-toast__title {
  display: block;
  margin-bottom: 6px;
  color: var(--brand2);
  font-size: 1rem;
}

.cart-toast__detail {
  color: var(--muted);
  line-height: 1.6;
}

.order-success-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 7, 6, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.order-success-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.order-success-modal__dialog {
  position: relative;
  width: min(520px, 100%);
  padding: 34px;
  border-radius: 28px;
  border: 1px solid rgba(124, 240, 177, 0.18);
  background:
    radial-gradient(circle at 22% 14%, rgba(124, 240, 177, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(13, 29, 25, 0.98), rgba(5, 12, 10, 0.98));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.order-success-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
}

.order-success-modal__logo {
  width: min(220px, 70%);
  height: auto;
  object-fit: contain;
  margin-bottom: 24px;
}

.order-success-modal__mark {
  width: 70px;
  height: 70px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #d8ff63);
  color: #06110d;
  font-size: 2.2rem;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(17, 182, 93, 0.28);
}

.order-success-modal__dialog h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.05;
}

.order-success-modal__dialog p {
  margin: 0 auto 22px;
  max-width: 38ch;
  color: var(--muted);
  line-height: 1.65;
}

.order-success-modal__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand2), #e8ff75);
  color: #04100c;
  text-decoration: none;
  font-weight: 800;
}

.order-success-modal__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.order-success-modal__link--ghost {
  border: 1px solid rgba(123, 240, 176, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.order-success-modal__link--account {
  gap: 10px;
  border: 1px solid rgba(123, 240, 176, 0.28);
  background:
    linear-gradient(135deg, rgba(123, 240, 176, 0.12), rgba(255, 213, 74, 0.08)),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.order-success-modal__google {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex: 0 0 28px;
}

.order-success-modal__google img {
  width: 16px;
  height: 16px;
  display: block;
}

.order-success-modal__link[hidden] {
  display: none;
}

.footer__meta {
  padding: 24px 8px 0;
  display: grid;
  gap: 18px;
}

.footer__trust-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 4px 0 0;
}

.footer__trust-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(238, 247, 244, 0.68);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer__trust-nav a:hover {
  color: var(--brand2);
  transform: translateY(-1px);
  border-color: rgba(123, 240, 176, 0.2);
  background: rgba(123, 240, 176, 0.055);
}

.footer__meta-line {
  color: rgba(238, 247, 244, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: none;
}

.footer__meta-center {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.footer__creator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  min-width: 0;
}

.footer__creator-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.9);
  font-family: "Bahnschrift SemiBold", "Arial Black", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.footer__creator-copy {
  color: rgba(238, 247, 244, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.footer__bottom .footer__meta-center {
  grid-column: 2;
}

@media (max-width: 980px) {
  .floating-contacts {
    right: 12px;
  }

  .floating-contacts__toggle {
    width: 110px;
    min-height: 64px;
    border-radius: 20px;
  }

  .floating-contacts__item {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .scroll-top {
    right: 14px;
    bottom: 16px;
    min-width: 66px;
    height: 66px;
    border-radius: 22px;
  }

  .scroll-top__label {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .footer__meta {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer__bottom {
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }

  .footer__bottom .footer__meta-center {
    grid-column: auto;
    order: 1;
    width: 100%;
  }

  .footer__bottom .footer__creator {
    justify-self: center;
    order: 2;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .floating-contacts {
    top: auto;
    bottom: 92px;
    right: 12px;
    transform: none;
  }

  .floating-contacts__toggle {
    width: 102px;
    min-height: 58px;
    border-radius: 18px;
    padding: 0 14px;
  }

  .floating-contacts__toggle-copy strong {
    font-size: 0.88rem;
  }

  .floating-contacts__toggle-copy small {
    font-size: 0.64rem;
  }

  .floating-contacts__rail {
    gap: 10px;
  }

  .floating-contacts__item {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .scroll-top {
    right: 12px;
    bottom: 14px;
  }

  .footer__meta {
    padding-top: 18px;
    padding-bottom: 26px;
    gap: 14px;
  }

  .footer__trust-nav {
    gap: 8px;
  }

  .footer__trust-nav a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .footer__bottom .footer__creator {
    width: 100%;
    max-width: 310px;
    justify-content: center;
    gap: 10px;
  }

  .footer__creator-mark {
    width: 34px;
    height: 34px;
    font-size: 0.68rem;
  }

  .footer__creator-copy {
    font-size: 0.78rem;
    letter-spacing: 0.035em;
  }

  .footer__meta-line {
    font-size: 0.78rem;
    letter-spacing: 0.045em;
  }
}

@media (max-width: 640px) {
  .cart-toast {
    right: 12px;
    bottom: 12px;
  }
}
