.upv2-voice-modal {
  background: linear-gradient(160deg, #12121b 0%, #2a1447 60%, #181824 100%);
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.upv2-voice-grid {
  max-height: 600px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
}

.upv2-voice-grid::-webkit-scrollbar {
  width: 8px;
}

.upv2-voice-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.upv2-voice-card {
  height: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(12, 12, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow:
    inset 0 6px 18px rgba(0, 0, 0, 0.18),
    0 4px 14px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.upv2-voice-card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 10px 24px rgba(0, 0, 0, 0.22),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

.upv2-voice-thumb {
  position: relative;
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
}

.upv2-voice-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 10px !important;
}

.upv2-voice-thumb::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 0;
  height: 0;
  border-left: 14px solid rgba(255, 255, 255, 0.9);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.upv2-voice-card:hover .upv2-voice-thumb::after {
  opacity: 0.35;
}

.upv2-voice-name {
  color: #f3efff;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.custom-control-input:checked + .custom-control-label .upv2-voice-card {
  border-color: rgba(141, 75, 255, 0.8);
  box-shadow:
    0 0 0 2px rgba(141, 75, 255, 0.35),
    0 8px 24px rgba(141, 75, 255, 0.25);
}

.upv2-voice-choice {
  position: relative;
}

.upv2-voice-choice .custom-control-input {
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.upv2-voice-choice .custom-control-label::before,
.upv2-voice-choice .custom-control-label::after {
  display: none;
}

.upv2-voice-audio {
  display: none;
}

/* Seletor compacto compartilhado pelas doacoes normal e guiada. */
#sonsIaPicker.upv2-voice-inline-panel {
  width: 100%;
  max-height: none !important;
  margin: 0 0 8px;
  padding: 0;
  overflow: visible !important;
  background: transparent;
}

.upv2-page .upv2-voice-combobox {
  --voice-surface: color-mix(in srgb, var(--upv2-card) 38%, var(--upv2-interacao) 62%);
  --voice-surface-strong: color-mix(in srgb, var(--upv2-card) 50%, var(--upv2-interacao) 50%);
  --voice-row-active: color-mix(in srgb, var(--upv2-accent) 20%, transparent);
  --voice-border: color-mix(in srgb, var(--upv2-accent) 35%, transparent);
  --voice-divider: color-mix(in srgb, var(--upv2-text) 10%, transparent);
  width: 100%;
  position: relative;
}

.upv2-voice-combobox-control {
  display: block;
}

.upv2-page .upv2-voice-combobox-toggle {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  padding: 8px 14px 8px 9px;
  border: 1px solid var(--voice-border);
  border-radius: 14px;
  color: var(--upv2-text);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--upv2-accent) 10%, transparent), transparent 58%),
    var(--voice-surface);
  box-shadow:
    0 7px 16px color-mix(in srgb, var(--upv2-bg) 34%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--upv2-text) 10%, transparent);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.upv2-page .upv2-voice-combobox.has-selection .upv2-voice-combobox-toggle {
  border-color: color-mix(in srgb, var(--upv2-accent) 58%, transparent);
}

.upv2-page .upv2-voice-combobox-toggle:hover,
.upv2-page .upv2-voice-combobox-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--upv2-accent) 75%, transparent);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--upv2-accent) 16%, transparent), transparent 62%),
    var(--voice-surface-strong);
  outline: none;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--upv2-accent) 20%, transparent),
    0 9px 20px color-mix(in srgb, var(--upv2-bg) 38%, transparent);
}

.upv2-voice-combobox-avatar-wrap {
  width: 44px;
  height: 44px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--upv2-accent) 38%, transparent);
  border-radius: 11px;
  color: var(--upv2-text);
  background: color-mix(in srgb, var(--upv2-accent) 18%, var(--upv2-interacao));
}

.upv2-voice-combobox-placeholder-icon {
  font-size: 17px;
  opacity: 0.88;
}

.upv2-voice-combobox-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upv2-voice-combobox-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upv2-voice-combobox-kicker {
  color: var(--upv2-muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.upv2-voice-combobox-value {
  overflow: hidden;
  color: var(--upv2-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upv2-voice-combobox-chevron {
  color: var(--upv2-muted);
  font-size: 11px;
  transition: transform 0.16s ease, color 0.16s ease;
}

.upv2-voice-combobox.is-expanded .upv2-voice-combobox-chevron {
  color: var(--upv2-text);
  transform: rotate(180deg);
}

.upv2-page .upv2-voice-combobox-menu {
  display: none;
  max-height: 224px;
  margin-top: 5px;
  padding: 4px 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--voice-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--upv2-accent) 7%, transparent), transparent 42%),
    var(--voice-surface);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--upv2-bg) 34%, transparent);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.upv2-page .upv2-voice-combobox-menu:hover {
  scrollbar-color: color-mix(in srgb, var(--upv2-accent) 55%, transparent) transparent;
}

.upv2-voice-combobox.is-expanded .upv2-voice-combobox-menu {
  display: block;
}

.upv2-voice-combobox-menu::-webkit-scrollbar {
  width: 5px;
}

.upv2-voice-combobox-menu::-webkit-scrollbar-track {
  background: transparent;
}

.upv2-voice-combobox-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.upv2-voice-combobox-menu:hover::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--upv2-accent) 55%, transparent);
}

.upv2-voice-combobox .upv2-voice-choice {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0;
}

.upv2-voice-combobox .upv2-voice-choice .custom-control-input {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: auto;
  cursor: pointer;
}

.upv2-voice-combobox .upv2-voice-choice + .upv2-voice-choice {
  border-top: 1px solid var(--voice-divider);
}

.upv2-page .upv2-voice-combobox .upv2-voice-row {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 72px 6px 6px;
  overflow: hidden;
  border: 0;
  border-radius: 9px;
  color: var(--upv2-text);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.upv2-page .upv2-voice-combobox .upv2-voice-row:hover {
  background: color-mix(in srgb, var(--upv2-accent) 12%, transparent);
}

.upv2-page .upv2-voice-combobox .custom-control-input:focus + .upv2-voice-row {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--upv2-accent) 70%, transparent);
}

.upv2-page .upv2-voice-combobox .custom-control-input:checked + .upv2-voice-row,
.upv2-page .upv2-voice-combobox .upv2-voice-row.is-selected {
  background: var(--voice-row-active);
  box-shadow: inset 3px 0 0 var(--upv2-accent);
}

.upv2-voice-row-avatar-wrap {
  width: 40px;
  height: 40px;
  position: relative;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--upv2-text) 14%, transparent);
  border-radius: 10px;
  color: var(--upv2-muted);
  background: color-mix(in srgb, var(--upv2-accent) 12%, var(--upv2-interacao));
}

.upv2-voice-row-avatar-fallback {
  font-size: 14px;
  opacity: 0.8;
}

.upv2-voice-row-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upv2-voice-row-avatar.is-unavailable {
  display: none;
}

.upv2-voice-row-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upv2-voice-combobox .upv2-voice-name {
  min-height: 0;
  display: block;
  overflow: hidden;
  color: var(--upv2-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upv2-voice-row-hint {
  overflow: hidden;
  color: var(--upv2-muted);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upv2-voice-row-check {
  position: absolute;
  top: 50%;
  right: 45px;
  width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--upv2-accent);
  font-size: 8px;
  transform: translateY(-50%);
}

.upv2-voice-combobox .custom-control-input:checked + .upv2-voice-row .upv2-voice-row-check,
.upv2-voice-combobox .upv2-voice-row.is-selected .upv2-voice-row-check {
  display: grid;
}

.upv2-page .upv2-voice-preview-button {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--upv2-accent) 30%, transparent);
  border-radius: 9px;
  color: var(--upv2-text);
  background: color-mix(in srgb, var(--upv2-accent) 10%, transparent);
  font-size: 9px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.upv2-page .upv2-voice-preview-button:hover,
.upv2-page .upv2-voice-preview-button:focus-visible {
  border-color: color-mix(in srgb, var(--upv2-accent) 72%, transparent);
  color: #fff;
  background: color-mix(in srgb, var(--upv2-accent) 30%, transparent);
  outline: none;
  transform: translateY(-50%) scale(1.04);
}

.upv2-page #sonsIaContainer {
  display: none !important;
}

@media (max-width: 480px) {
  .upv2-page .upv2-voice-combobox-toggle {
    min-height: 56px;
    grid-template-columns: 40px minmax(0, 1fr) 16px;
    gap: 9px;
  }

  .upv2-voice-combobox-avatar-wrap,
  .upv2-voice-row-avatar-wrap {
    width: 40px;
    height: 40px;
  }

  .upv2-voice-row-avatar-wrap {
    flex-basis: 40px;
  }

  .upv2-voice-row-hint {
    display: none;
  }
}
