:root {
  --gc-green: #364C36;
  --gc-green-dark: #293B2A;
  --gc-green-light: #D1DDCD;
  --gc-border: #E2E8E0;
  --gc-muted: #6D746D;
  --gc-telegram: #2AABEE;
  --gc-chat-pink: #C78F9D;
}

.gc-root,
.gc-root * {
  box-sizing: border-box;
}

.gc-root {
  font-family: inherit;
}

.gc-root.gc-tawk-open {
  pointer-events: none;
}

.gc-root.gc-tawk-open .gc-launcher,
.gc-root.gc-tawk-open .gc-selector {
  display: none !important;
}

/* Warehouse side-cart: hide support while the native drawer is open.
   Pure CSS only; no DOM polling or cart-specific JavaScript. */
body:has(.ps-shoppingcart.side-cart.show #blockcart-content) #grozis-channels,
body:has(.ps-shoppingcart.side-cart .show #blockcart-content) #grozis-channels,
body:has(.ps-shoppingcart.side-cart #blockcart-content.show) #grozis-channels {
  display: none !important;
}

.gc-launcher {
  position: fixed;
  right: 24px;
  bottom: var(--gc-desktop-bottom, 88px);
  z-index: 150;
  min-width: 166px;
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--gc-green);
  border-radius: 999px;
  background: var(--gc-green);
  color: #fff;
  box-shadow: 0 7px 24px rgba(41, 59, 42, .20);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.gc-launcher:hover {
  background: var(--gc-green-light);
  color: var(--gc-green);
  border-color: var(--gc-green);
  box-shadow: 0 9px 26px rgba(41, 59, 42, .20);
}

.gc-launcher:active {
  transform: translateY(1px);
}

.gc-launcher:focus-visible,
.gc-close:focus-visible,
.gc-channel:focus-visible {
  outline: 3px solid var(--gc-green-light);
  outline-offset: 2px;
}

.gc-launcher-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  flex: 0 0 22px;
}

.gc-launcher-icon svg,
.gc-channel-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gc-selector {
  position: fixed;
  right: 24px;
  bottom: calc(var(--gc-desktop-bottom, 88px) + 62px);
  z-index: 200;
  width: min(360px, calc(100vw - 32px));
}

.gc-selector[hidden] {
  display: none !important;
}

.gc-panel {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(54, 76, 54, .12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(32, 43, 32, .18);
}

.gc-title {
  margin: 0 38px 18px 0;
  color: var(--gc-green);
  font: inherit;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.gc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #667066;
  cursor: pointer;
  font: inherit;
  font-size: 26px;
  font-weight: 300;
  line-height: 32px;
  text-align: center;
}

.gc-close:hover {
  background: var(--gc-green-light);
  color: var(--gc-green-dark);
}

.gc-channel-list {
  display: grid;
  gap: 10px;
}

.gc-channel {
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--gc-border);
  border-radius: 13px;
  background: #fff;
  color: #1E281F;
  text-decoration: none !important;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.gc-channel:hover {
  border-color: var(--gc-green);
  background: var(--gc-green-light);
  color: #1E281F;
  text-decoration: none !important;
}

.gc-channel:hover .gc-arrow {
  color: var(--gc-green-dark);
}

.gc-channel:active {
  transform: translateY(1px);
}

.gc-channel-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gc-telegram-icon {
  color: var(--gc-telegram);
}

.gc-telegram-icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.gc-chat-icon {
  color: var(--gc-chat-pink);
}

.gc-chat-icon svg {
  width: 31px;
  height: 31px;
}

.gc-channel-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gc-channel-copy strong {
  color: var(--gc-green-dark);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.gc-channel-copy small {
  color: var(--gc-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
}

.gc-arrow {
  color: var(--gc-green);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  text-align: center;
}

.gc-error {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #F6F3EE;
  color: #704A34;
  font-size: 12px;
  line-height: 1.35;
}

.gc-error[hidden] {
  display: none !important;
}

@media (max-width: 767.98px) {
  /* Warehouse/Amazing Filter uses z-index:10001 even while closed.
     Lower only its closed compact tab; when .show-filter is present, the theme's
     original 10001 layer wins and the open filter stays above Grozis UI. */
  .has-compact-filter:not(.show-filter) #amazing_filter {
    z-index: 130 !important;
  }

  .gc-launcher {
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    min-width: 0;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--gc-green);
    border-radius: 50%;
    background: var(--gc-green);
    color: #FFFFFF;
    box-shadow: 0 5px 16px rgba(41, 59, 42, .20);
  }

  .gc-launcher:hover {
    background: var(--gc-green-light);
    color: var(--gc-green);
    border-color: var(--gc-green);
  }

  .gc-launcher-text {
    display: none;
  }

  .gc-launcher-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .gc-selector {
    right: 14px;
    bottom: calc(152px + env(safe-area-inset-bottom, 0px));
    width: min(360px, calc(100vw - 28px));
  }

  .gc-panel {
    padding: 18px 16px 16px;
    border-radius: 16px;
  }

  .gc-title {
    margin-bottom: 15px;
    font-size: 19px;
  }

  .gc-channel {
    min-height: 68px;
    padding: 10px 12px;
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    gap: 10px;
  }

  .gc-channel-icon {
    width: 36px;
    height: 36px;
  }

  .gc-telegram-icon svg {
    width: 28px;
    height: 28px;
  }

  .gc-chat-icon svg {
    width: 29px;
    height: 29px;
  }

  .gc-channel-copy strong {
    font-size: 14px;
  }

  .gc-channel-copy small {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-launcher,
  .gc-channel {
    transition: none;
  }
}
