html,
body {
  min-height: 100%;
}

button {
  font-family: inherit;
}

.cg-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.cg-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .72;
}

.cg-main-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  background: #fafafa;
}

.cg-main-row {
  display: grid;
  grid-template-columns: minmax(0, 104px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.cg-main-label {
  color: #6b7280;
  font-size: 13px;
  line-height: 18px;
}

.cg-main-value {
  min-width: 0;
  padding: 0;
  border: 0;
  color: #111827;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  text-align: left;
  overflow-wrap: anywhere;
}

button.cg-main-value {
  cursor: pointer;
}

.cg-main-value_wallet {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}

.cg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 24, 39, .38);
  backdrop-filter: blur(8px);
}

.cg-overlay[hidden] {
  display: none !important;
}

.cg-dialog {
  width: min(100%, 420px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(17, 24, 39, .24);
}

.cg-dialog-small {
  width: min(100%, 360px);
}

.cg-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 0;
}

.cg-dialog-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #111827;
}

.cg-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.cg-dialog-body {
  padding: 20px;
}

.cg-lang-list {
  display: grid;
  gap: 8px;
}

.cg-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #111827;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.cg-lang-item.active {
  border-color: #ede9fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.cg-lang-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cg-lang-left img {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}

.cg-qr {
  position: relative;
  width: 184px;
  height: 184px;
  margin: 0 auto 20px;
}

.cg-qr > img:first-child {
  display: block;
  width: 184px;
  height: 184px;
}

.cg-qr-badge {
  position: absolute;
  top: 76px;
  left: 76px;
  width: 32px;
  height: 32px;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
}

.cg-info-row {
  display: grid;
  grid-template-columns: minmax(0, 112px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #f3f4f6;
}

.cg-info-row:first-of-type {
  border-top: 0;
}

.cg-info-label {
  color: #6b7280;
  font-size: 13px;
  line-height: 18px;
}

.cg-info-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.cg-copy-btn {
  min-width: 64px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #6d28d9;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

#lang-flag {
  border-radius: 2px;
  object-fit: cover;
}

@media (max-width: 430px) {
  .cg-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .cg-dialog {
    width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
  }

  .cg-info-row {
    grid-template-columns: 1fr auto;
  }

  .cg-info-label {
    grid-column: 1 / -1;
  }

  .cg-main-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
