body.modal-open {
  overflow: hidden;
}

.site-platform-modal[hidden] {
  display: none !important;
}

.site-platform-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.site-platform-modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.site-platform-modal__panel {
  position: relative;
  z-index: 1;
  width: min(400px, calc(100vw - 32px));
  max-height: 80vh;
  overflow: hidden;
  border-radius: 18px;
  background: #f4fbff;
  box-shadow: 0 24px 70px rgba(10, 56, 110, 0.26);
}

.site-platform-modal__header {
  height: 54px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--button-bg, linear-gradient(180deg, #31b8f3 0%, #0d91d8 100%));
  color: #fff;
}

.site-platform-modal__header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  color: #fff;
}

.site-platform-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-platform-modal__close::before,
.site-platform-modal__close::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 7px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.site-platform-modal__close::before {
  transform: rotate(45deg);
}

.site-platform-modal__close::after {
  transform: rotate(-45deg);
}

.site-platform-modal__body {
  max-height: calc(80vh - 54px);
  overflow: hidden;
  padding: 0;
}

.site-platform-modal__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 12px 18px 8px;
  color: var(--primary-color, #0d91d8);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
}

.site-platform-modal__notice-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary-color, #0d91d8);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
}

.site-platform-modal__list {
  display: block;
  max-height: calc(80vh - 110px);
  overflow-y: auto;
  padding: 8px 14px 16px;
}

.site-platform-modal__item {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 76px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #dcedf8;
  color: var(--title-color, #344464);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-platform-modal__item:hover {
  color: var(--title-color, #344464);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(34, 115, 190, 0.14);
}

.site-platform-modal__item[aria-disabled="true"] {
  cursor: default;
}

.site-platform-modal__item:last-child {
  margin-bottom: 0;
}

.site-platform-modal__logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.site-platform-modal__content {
  flex: 1 1 auto;
  min-width: 0;
}

.site-platform-modal__content strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: #3a4d71;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-platform-modal__content p {
  margin: 0;
  overflow: hidden;
  color: #4d4d4d;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-platform-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 34px;
  flex: 0 0 74px;
  margin-left: auto;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--button-bg, linear-gradient(180deg, #31b8f3 0%, #0d91d8 100%));
  box-shadow: var(--button-shadow, 0 10px 22px rgba(13, 145, 216, 0.22));
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-platform-modal__panel {
    width: calc(100vw - 32px);
    max-width: 400px;
    max-height: 82vh;
  }

  .site-platform-modal__header {
    height: 52px;
  }

  .site-platform-modal__header h2 {
    font-size: 21px;
  }

  .site-platform-modal__list {
    max-height: calc(82vh - 108px);
    padding: 8px 12px 14px;
  }

  .site-platform-modal__item {
    min-height: 74px;
    padding: 10px;
    gap: 10px;
  }

  .site-platform-modal__logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .site-platform-modal__content strong {
    font-size: 16px;
  }

  .site-platform-modal__content p {
    font-size: 12px;
  }

  .site-platform-modal__btn {
    width: 70px;
    height: 32px;
    flex-basis: 70px;
    font-size: 12px;
  }
}
