/* Branded Telegram contact loop. */
.og-contact-loop {
  position: fixed;
  z-index: 85;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

body.og-search-open .og-contact-loop,
body.og-favorites-open .og-contact-loop,
body.og-mobile-nav-open .og-contact-loop,
body.og-catalog-filters-open .og-contact-loop,
body.og-gallery-lightbox-open .og-contact-loop {
  visibility: hidden;
  opacity: 0;
}

.og-contact-loop [hidden] {
  display: none !important;
}

.og-contact-loop button,
.og-contact-loop a {
  -webkit-tap-highlight-color: transparent;
}

.og-contact-loop-trigger {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(107, 38, 63, .22);
  border-radius: 50%;
  background: rgba(255, 253, 249, .97);
  color: var(--og-berry, #6b263f);
  box-shadow: 0 12px 34px rgba(44, 30, 25, .18), 0 2px 8px rgba(44, 30, 25, .1);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  backdrop-filter: blur(12px);
}

.og-contact-loop-trigger::after {
  position: absolute;
  inset: -1px;
  content: "";
  border: 1px solid rgba(107, 38, 63, .18);
  border-radius: inherit;
  opacity: 0;
  transform: scale(.94);
}

.og-contact-loop-trigger:hover {
  border-color: rgba(107, 38, 63, .46);
  box-shadow: 0 15px 38px rgba(44, 30, 25, .22), 0 3px 10px rgba(44, 30, 25, .12);
  transform: translateY(-2px);
}

.og-contact-loop-trigger:focus-visible,
.og-contact-loop-close:focus-visible,
.og-contact-loop-hint:focus-visible,
.og-contact-loop-topics a:focus-visible {
  outline: 2px solid var(--og-berry, #6b263f);
  outline-offset: 3px;
}

.og-contact-loop-trigger[aria-expanded="true"] {
  border-color: var(--og-berry, #6b263f);
  box-shadow: 0 12px 34px rgba(44, 30, 25, .18), 0 0 0 4px rgba(107, 38, 63, .08);
}

.og-contact-loop-trigger img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.og-contact-loop-trigger > span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  line-height: 1;
}

.og-contact-loop-menu {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(292px, calc(100vw - 32px));
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid rgba(36, 31, 28, .12);
  border-radius: 16px;
  background: rgba(255, 253, 249, .985);
  color: var(--og-ink, #241f1c);
  box-shadow: 0 24px 64px rgba(44, 30, 25, .2), 0 3px 12px rgba(44, 30, 25, .08);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transform-origin: right bottom;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(16px);
}

.og-contact-loop-menu.is-open {
  opacity: 1;
  transform: none;
}

.og-contact-loop-head {
  min-height: 72px;
  padding: 15px 14px 13px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(36, 31, 28, .1);
}

.og-contact-loop-miniature {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(107, 38, 63, .14);
  border-radius: 50%;
  background: var(--og-paper, #fbf8f3);
  color: var(--og-berry, #6b263f);
  font-size: 10px;
  font-weight: 700;
}

.og-contact-loop-miniature img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.og-contact-loop-head > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.og-contact-loop-head strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.og-contact-loop-head small {
  color: var(--og-muted, #726a64);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.35;
}

.og-contact-loop-close {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--og-muted, #726a64);
  font: 300 24px/1 Arial, sans-serif;
  transition: background-color .18s ease, color .18s ease;
}

.og-contact-loop-close:hover {
  background: var(--og-cream, #f3eee6);
  color: var(--og-ink, #241f1c);
}

.og-contact-loop-topics {
  padding: 5px 12px;
  display: grid;
}

body.og-brand-design .og-contact-loop-topics a,
body.og-brand-design .og-contact-loop-topics a:visited {
  min-height: 48px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(36, 31, 28, .09);
  color: var(--og-ink, #241f1c);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: color .18s ease, padding .18s ease;
}

body.og-brand-design .og-contact-loop-topics a:last-child {
  border-bottom: 0;
}

body.og-brand-design .og-contact-loop-topics a:hover {
  padding-right: 0;
  padding-left: 6px;
  color: var(--og-berry, #6b263f);
}

.og-contact-loop-topics b {
  color: var(--og-berry, #6b263f);
  font-size: 15px;
  font-weight: 400;
}

.og-contact-loop-menu > p {
  margin: 0;
  padding: 10px 15px 12px;
  border-top: 1px solid rgba(36, 31, 28, .08);
  background: rgba(243, 238, 230, .55);
  color: var(--og-muted, #726a64);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .035em;
  line-height: 1.45;
  text-align: center;
}

.og-contact-loop-hint {
  position: absolute;
  right: 68px;
  bottom: 2px;
  width: min(272px, calc(100vw - 102px));
  min-height: 54px;
  padding: 10px 14px;
  display: grid;
  gap: 2px;
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(36, 31, 28, .12);
  border-radius: 12px;
  background: rgba(255, 253, 249, .985);
  color: var(--og-ink, #241f1c);
  box-shadow: 0 14px 40px rgba(44, 30, 25, .16);
  opacity: 0;
  text-align: left;
  transform: translateX(8px);
  transition: opacity .2s ease, transform .2s ease;
  backdrop-filter: blur(14px);
}

.og-contact-loop-hint::after {
  position: absolute;
  top: 20px;
  right: -7px;
  width: 12px;
  height: 12px;
  content: "";
  border-top: 1px solid rgba(36, 31, 28, .12);
  border-right: 1px solid rgba(36, 31, 28, .12);
  background: rgba(255, 253, 249, .985);
  transform: rotate(45deg);
}

.og-contact-loop-hint.is-visible {
  opacity: 1;
  transform: none;
}

.og-contact-loop-hint strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.15;
}

.og-contact-loop-hint span {
  color: var(--og-muted, #726a64);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .og-contact-loop {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  body.home .og-contact-loop,
  body.single-product .og-contact-loop {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .og-contact-loop-menu {
    width: min(292px, calc(100vw - 24px));
  }

  .og-contact-loop-hint {
    right: 66px;
    width: min(250px, calc(100vw - 94px));
  }

  body.og-catalog-context .og-contact-loop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .og-contact-loop-trigger,
  .og-contact-loop-menu,
  .og-contact-loop-hint,
  .og-contact-loop-close,
  .og-contact-loop-topics a {
    transition: none !important;
  }
}
