.wc-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.wc-choice-modal[hidden] {
  display: none;
}

.wc-choice-modal *,
.wc-choice-modal *::before,
.wc-choice-modal *::after {
  box-sizing: border-box;
}

.wc-choice-modal__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(19, 26, 35, 0.48);
  cursor: pointer;
}

.wc-choice-modal__panel {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  max-height: min(860px, calc(100vh - 64px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 38px;
  box-shadow: var(--wc-v2-shadow);
  overflow: hidden;
  outline: none;
}

.wc-choice-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 34px 36px 22px;
}

.wc-choice-modal__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 800;
}

.wc-choice-modal__close {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--wc-v2-border-strong);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.wc-choice-modal__close-icon::before,
.wc-choice-modal__close-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px;
  height: 1.5px;
  background: #343a43;
}

.wc-choice-modal__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.wc-choice-modal__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.wc-choice-modal__body {
  min-height: 0;
  overflow-y: auto;
  padding: 0 36px 36px;
}

.wc-choice-modal__tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 0;
  padding: 0 0 12px;
  margin: 0 0 32px;
  overflow-x: auto;
  background: #fff;
  scrollbar-width: none;
}

.wc-choice-modal__tabs::-webkit-scrollbar {
  display: none;
}

.wc-choice-modal__tab {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 0;
  background: transparent;
  color: #1e2430;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.wc-choice-modal__tab + .wc-choice-modal__tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 1.2em;
  background: var(--wc-v2-border);
  transform: translateY(-50%);
}

.wc-choice-modal__tab.is-active {
  color: var(--wc-v2-accent);
}

.wc-choice-modal__groups {
  display: grid;
  gap: 40px;
}

.wc-choice-modal__group {
  scroll-margin-top: 64px;
}

.wc-choice-modal__group-title {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 800;
}

.wc-choice-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 34px;
}

.wc-choice-modal__item {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--wc-v2-text);
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.wc-choice-modal__item.is-selected,
.wc-choice-modal__item:hover,
.wc-choice-modal__item:focus-visible {
  color: var(--wc-v2-accent);
}

body.is-wc-choice-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .wc-choice-modal {
    align-items: flex-start;
    padding: 12px;
  }

  .wc-choice-modal__panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    border-radius: 28px;
  }

  .wc-choice-modal__header {
    padding: 26px 20px 16px;
  }

  .wc-choice-modal__title {
    font-size: 18px;
  }

  .wc-choice-modal__body {
    padding: 0 20px 28px;
  }

  .wc-choice-modal__tabs {
    margin-bottom: 22px;
  }

  .wc-choice-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .wc-choice-modal__item {
    font-size: 15px;
  }
}
