/* ==========================================================================
   Balão de Doação & Tela de Pagamento PIX Direta (InvictusPay v1)
   Identidade Visual: Azul Escuro (#00192b, #002437) e Rosa (#f26c9d, #ff3385)
   ========================================================================== */

/* Overlay backdrop */
.resgaute-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 14, 26, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  box-sizing: border-box;
}

.resgaute-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container (Balão) */
.resgaute-balloon {
  background: linear-gradient(145deg, #001f35 0%, #002437 55%, #001524 100%);
  border: 2px solid #005c8c;
  border-radius: 24px;
  width: 100%;
  max-width: 540px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(242, 108, 157, 0.25);
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #ffffff;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

.resgaute-modal-overlay.active .resgaute-balloon {
  transform: scale(1) translateY(0);
}

/* Close button */
.resgaute-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.resgaute-close-btn:hover {
  background: #f26c9d;
  border-color: #f26c9d;
  transform: rotate(90deg);
}

/* Balloon Header */
.resgaute-balloon-header {
  padding: 28px 24px 14px;
  text-align: center;
  position: relative;
}

.resgaute-badge-monthly {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f26c9d, #e0246a);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 15px rgba(242, 108, 157, 0.4);
}

.resgaute-campaign-tag {
  display: inline-block;
  background: rgba(0, 92, 140, 0.4);
  border: 1px solid #005c8c;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  margin-bottom: 8px;
}

.resgaute-balloon-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 8px;
}

.resgaute-balloon-title span {
  color: #f26c9d;
}

.resgaute-balloon-subtitle {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto;
}

/* Options Container */
.resgaute-options-container {
  padding: 4px 22px 22px;
}

/* Grid of values */
.resgaute-grid-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .resgaute-grid-values {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.resgaute-value-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 64px;
}

.resgaute-value-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #28b5ff;
  transform: translateY(-2px);
}

.resgaute-value-card.selected {
  background: linear-gradient(145deg, rgba(242, 108, 157, 0.25), rgba(0, 92, 140, 0.35));
  border-color: #f26c9d;
  box-shadow: 0 0 18px rgba(242, 108, 157, 0.4);
  transform: scale(1.02);
}

.resgaute-value-card.popular::before {
  content: 'MAIS ESCOLHIDO ⭐';
  position: absolute;
  top: -8px;
  background: #f26c9d;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.resgaute-card-amount {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.resgaute-card-period {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 2px;
}

.resgaute-value-card.selected .resgaute-card-amount {
  color: #f26c9d;
}

.resgaute-value-card.selected .resgaute-card-period {
  color: #e2e8f0;
}

/* Custom value input */
.resgaute-custom-box {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  transition: all 0.2s;
}

.resgaute-custom-box:focus-within, .resgaute-custom-box.selected {
  border-color: #f26c9d;
  background: rgba(242, 108, 157, 0.08);
}

.resgaute-custom-label {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.resgaute-custom-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.resgaute-custom-prefix {
  color: #f26c9d;
  font-weight: 800;
  font-size: 16px;
  margin-right: 4px;
}

.resgaute-custom-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  width: 100%;
  outline: none;
}

/* Frequency Toggle */
.resgaute-freq-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.resgaute-freq-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 8px 12px;
  border-radius: 26px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.resgaute-freq-btn.active {
  background: #005c8c;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Submit Action Button */
.resgaute-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #f26c9d 0%, #e0246a 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(242, 108, 157, 0.45);
}

.resgaute-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(242, 108, 157, 0.65);
  filter: brightness(1.08);
}

.resgaute-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.resgaute-security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 11px;
  color: #94a3b8;
  flex-wrap: wrap;
}

/* ==========================================================================
   TELA DE PAGAMENTO PIX DIRETA (NOVO FLUXO)
   ========================================================================== */
.resgaute-step {
  display: none;
}

.resgaute-step.active {
  display: block;
}

.resgaute-payment-screen {
  text-align: center;
}

.resgaute-payment-summary-box {
  background: rgba(0, 92, 140, 0.25);
  border: 1px solid #005c8c;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resgaute-payment-summary-info {
  text-align: left;
}

.resgaute-payment-campaign-name {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.resgaute-payment-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.resgaute-payment-val-highlight {
  font-size: 26px;
  font-weight: 800;
  color: #f26c9d;
  text-shadow: 0 0 14px rgba(242, 108, 157, 0.4);
}

.resgaute-qr-wrapper {
  background: #ffffff;
  padding: 14px;
  border-radius: 18px;
  display: inline-block;
  margin: 6px auto 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.resgaute-qr-img {
  width: 210px;
  height: 210px;
  display: block;
}

.resgaute-scan-instruction {
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 12px;
  line-height: 1.4;
}

.resgaute-pix-code-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.resgaute-pix-code-text {
  font-family: monospace;
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

.resgaute-btn-copy-pix {
  background: linear-gradient(135deg, #f26c9d 0%, #e0246a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(242, 108, 157, 0.35);
}

.resgaute-btn-copy-pix:hover {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* Status indicator badge */
.resgaute-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 10px;
}

.resgaute-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #fbbf24;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.resgaute-btn-back-val {
  background: none;
  border: none;
  color: #28b5ff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.resgaute-btn-back-val:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* Loading Overlay inside balloon */
.resgaute-loading-state {
  text-align: center;
  padding: 60px 20px;
}

.resgaute-loading-spinner-big {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(242, 108, 157, 0.2);
  border-top-color: #f26c9d;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

/* Success Screen */
.resgaute-success-box {
  text-align: center;
  padding: 24px 10px;
}

.resgaute-success-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
  animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Floating Trigger Button */
.resgaute-floating-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #f26c9d 0%, #e0246a 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(242, 108, 157, 0.55);
  cursor: pointer;
  z-index: 99999;
  transition: all 0.3s;
  animation: floatBounce 3s ease-in-out infinite;
  text-decoration: none;
}

.resgaute-floating-trigger:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 30px rgba(242, 108, 157, 0.7);
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ==========================================================================
   ETAPA INTERMEDIÁRIA: SELEÇÃO DE MODALIDADE (DOAÇÃO MENSAL OU ÚNICA)
   ========================================================================== */

/* Barra de valor preservado */
.resgaute-selected-value-bar {
  background: rgba(0, 92, 140, 0.25);
  border: 1px solid #005c8c;
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.resgaute-modality-val-text {
  font-size: 24px;
  font-weight: 800;
  color: #f26c9d;
  text-shadow: 0 0 12px rgba(242, 108, 157, 0.35);
}

.resgaute-btn-change-value {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.resgaute-btn-change-value:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: #28b5ff;
}

/* Gaveta de valores alternativos */
.resgaute-value-drawer {
  display: none;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  animation: fadeInDown 0.3s ease;
}

.resgaute-value-drawer.open {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Container dos cards de modalidade */
.resgaute-modality-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* Card de modalidade grande e moderno */
.resgaute-modality-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  box-sizing: border-box;
  text-align: left;
}

.resgaute-modality-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #28b5ff;
  transform: translateY(-2px);
}

.resgaute-modality-card.selected {
  background: linear-gradient(135deg, rgba(242, 108, 157, 0.2) 0%, rgba(0, 92, 140, 0.35) 100%);
  border-color: #f26c9d;
  box-shadow: 0 0 24px rgba(242, 108, 157, 0.35);
  transform: scale(1.01);
}

.resgaute-modality-radio-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.resgaute-modality-card.selected .resgaute-modality-radio-check {
  border-color: #f26c9d;
  background: #f26c9d;
  box-shadow: 0 0 10px rgba(242, 108, 157, 0.7);
}

.resgaute-modality-card.selected .resgaute-modality-radio-check::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.resgaute-modality-card-content {
  flex: 1;
}

.resgaute-modality-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.resgaute-modality-icon {
  font-size: 20px;
  line-height: 1;
}

.resgaute-modality-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.6px;
}

.resgaute-modality-card.selected .resgaute-modality-title {
  color: #f26c9d;
}

.resgaute-modality-popular-tag {
  background: linear-gradient(135deg, #f26c9d, #e0246a);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.resgaute-modality-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

/* Aviso de transparência da recorrência */
.resgaute-modality-notice {
  font-size: 12px;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  line-height: 1.45;
}

/* ==========================================================================
   SISTEMA DE NOTIFICAÇÕES FLUTUANTES DE DOAÇÃO (FEEDBACKS SOCIAIS)
   Posicionamento: Canto superior esquerdo da tela (fixado no topo)
   ========================================================================== */

.resgaute-notif-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 99990;
  pointer-events: none;
  display: block;
}

.resgaute-notif-balloon {
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(0, 31, 53, 0.96) 0%, rgba(0, 36, 55, 0.96) 100%);
  border: 1px solid rgba(242, 108, 157, 0.35);
  border-left: 4px solid #f26c9d;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 16px rgba(242, 108, 157, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.96);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s;
  box-sizing: border-box;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: #ffffff;
}

/* Estado Ativo (Visível na tela) */
.resgaute-notif-balloon.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Ícone de Coração com fundo rosa suave */
.resgaute-notif-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(242, 108, 157, 0.18);
  border: 1px solid rgba(242, 108, 157, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resgaute-notif-heart {
  font-size: 18px;
  animation: notifPulse 1.8s infinite ease-in-out;
  display: inline-block;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* Conteúdo da notificação */
.resgaute-notif-content {
  flex: 1;
  min-width: 0;
}

.resgaute-notif-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.resgaute-notif-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.resgaute-notif-time {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.resgaute-notif-message {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.35;
  word-break: break-word;
}

.resgaute-notif-val {
  color: #f26c9d;
  font-weight: 800;
}

/* Botão discreto de fechar */
.resgaute-notif-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
  margin-left: 2px;
  align-self: flex-start;
}

.resgaute-notif-close:hover {
  color: #ffffff;
}

/* Ocultar automaticamente quando o modal de doação estiver aberto */
body.resgaute-modal-open .resgaute-notif-container {
  display: none !important;
}

/* Responsividade para Celulares */
@media (max-width: 600px) {
  .resgaute-notif-container {
    top: 14px;
    left: 14px;
    right: 14px;
    bottom: auto;
    max-width: calc(100vw - 28px);
  }

  .resgaute-notif-balloon {
    padding: 10px 12px;
    max-width: 100%;
  }

  .resgaute-notif-icon-box {
    width: 32px;
    height: 32px;
  }

  .resgaute-notif-heart {
    font-size: 15px;
  }

  .resgaute-notif-name {
    font-size: 12px;
  }

  .resgaute-notif-message {
    font-size: 11px;
  }
}


