.qbc-market-rename {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.qbc-market-rename:hover {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.qbc-market-rename-detail {
  padding: 10px 16px;
}

.qbc-rename-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}

.qbc-rename-dialog {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px -28px rgba(15, 23, 42, 0.55);
  animation: qbc-rename-in 0.18s ease-out;
}

@keyframes qbc-rename-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.qbc-rename-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eff6ff;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}

.qbc-rename-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.qbc-rename-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
}

.qbc-rename-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qbc-rename-close:hover {
  background: #fff;
  color: #0f172a;
}

.qbc-rename-body {
  padding: 20px 22px 8px;
}

.qbc-rename-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.qbc-rename-current span {
  color: #64748b;
  font-size: 12px;
}

.qbc-rename-current strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qbc-rename-field {
  display: block;
}

.qbc-rename-field > span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.qbc-rename-field input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  padding: 11px 12px;
  color: #0f172a;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qbc-rename-field input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.qbc-rename-hint {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-rename-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-rename-status[data-tone="success"] {
  color: #15803d;
}

.qbc-rename-status[data-tone="error"] {
  color: #dc2626;
}

.qbc-rename-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 20px;
}

.qbc-rename-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qbc-rename-footer button {
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.qbc-rename-reset {
  border: 0;
  background: transparent;
  color: #64748b;
}

.qbc-rename-reset:hover {
  color: #0f172a;
}

.qbc-rename-cancel {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.qbc-rename-cancel:hover {
  background: #f8fafc;
}

.qbc-rename-save {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
}

.qbc-rename-save:hover {
  background: #1d4ed8;
}

.qbc-rename-footer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

@media (max-width: 520px) {
  .qbc-rename-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .qbc-rename-dialog {
    border-radius: 14px;
  }

  .qbc-rename-header,
  .qbc-rename-body,
  .qbc-rename-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .qbc-rename-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .qbc-rename-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .qbc-rename-reset {
    align-self: flex-start;
  }
}
