/**
 * Vender Milhas - Calculadora Horizontal
 * Opção 2: Card Branco Flutuante Minimalista (Estilo Google Flights / Stripe / Fintech)
 *
 * @package Vender_Milhas_Blog
 */

.vmc-horizontal-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Calculadora quando posicionada dentro da Hero Blue Band */
.vm-hero-calc-wrap {
  margin-top: 24px;
  position: relative;
  z-index: 3;
}

.vm-hero-calc-wrap .vmc-horizontal-wrapper {
  max-width: 100%;
  padding: 0;
}

.vm-hero-calc-wrap .vmc-h-card {
  box-shadow: 0 18px 48px -6px rgba(6, 46, 86, 0.35), 0 6px 18px -2px rgba(0, 0, 0, 0.1);
}

.vmc-section {
  padding: 40px 0 48px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.vmc-section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 24px;
}

.vmc-section-tag {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vm-blue, #285fa2);
  display: block;
  margin-bottom: 4px;
}

.vmc-section-title {
  font-family: var(--vm-fhead, 'Barlow', system-ui, sans-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  color: var(--vm-navy, #062e56);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 6px;
}

.vmc-section-desc {
  font-size: 15px;
  color: #64748B;
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   1. Card Branco Flutuante (Minimalista & Premium)
   ========================================================================== */
.vmc-h-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 22px 26px 20px;
  box-shadow: 0 12px 36px -4px rgba(6, 46, 86, 0.08), 0 4px 16px -2px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vmc-h-card:hover {
  box-shadow: 0 16px 44px -4px rgba(6, 46, 86, 0.11), 0 6px 20px -2px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   2. Topbar com Abas Segmentadas (Estilo iOS / Google Flights)
   ========================================================================== */
.vmc-h-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 2px;
}

/* Segmented Control Track */
.vmc-tabs-nav {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  padding: 3.5px;
  border-radius: 10px;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.vmc-tabs-nav::-webkit-scrollbar {
  display: none;
}

.vmc-tab {
  background: transparent;
  color: #475569;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.2;
  min-height: 38px;
}

.vmc-tab:hover:not(.is-active) {
  color: var(--vm-navy, #062e56);
  background: rgba(255, 255, 255, 0.6);
}

.vmc-tab.is-active {
  background: #FFFFFF;
  color: var(--vm-navy, #062e56);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(6, 46, 86, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vmc-tab-logo {
  height: 20px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  display: block;
}

.vmc-tab-badge {
  background: #E0F2FE;
  color: #0369A1;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.2;
}

/* Topbar Direita: Modo PIX + Consentimento */
.vmc-h-top-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.vmc-h-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  user-select: none;
}

.vmc-h-mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  display: inline-block;
}

.vmc-h-consent {
  display: flex;
  align-items: center;
}

.vmc-h-consent-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #64748B;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.vmc-h-consent-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vmc-h-checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex: none;
}

.vmc-h-consent-label:hover .vmc-h-checkbox-custom {
  border-color: #94A3B8;
}

.vmc-h-consent-label input:checked + .vmc-h-checkbox-custom {
  background: var(--vm-blue, #285fa2);
  border-color: var(--vm-blue, #285fa2);
}

.vmc-h-consent-label input:checked + .vmc-h-checkbox-custom::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
  display: block;
}

.vmc-h-consent-label a {
  color: var(--vm-blue, #285fa2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
}

.vmc-h-consent-label a:hover {
  color: var(--vm-blue-dk, #044e8f);
}

/* ==========================================================================
   3. Grade Horizontal de Campos (Superfície Suave & Moderna)
   ========================================================================== */
.vmc-h-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1.4fr 1.25fr 150px;
  gap: 10px;
  align-items: stretch;
}

.vmc-h-field {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 58px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vmc-h-field:hover {
  border-color: #CBD5E1;
  background: #FFFFFF;
}

.vmc-h-field:focus-within {
  border-color: var(--vm-blue, #285fa2);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

.vmc-h-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748B;
  margin-bottom: 2px;
  display: block;
  user-select: none;
  line-height: 1;
}

/* 3.1 Campo Programa */
.vmc-h-prog-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vmc-h-prog-logo-wrap {
  width: auto;
  max-width: 90px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: none;
}

.vmc-h-prog-logo {
  height: 22px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  display: block;
}

.vmc-h-prog-name {
  display: none;
}

/* 3.2 Campo Quantidade (Select estilizado) */
.vmc-h-select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  width: 100%;
  padding: 0 18px 0 0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2300187A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* 3.3 Campo E-mail */
.vmc-h-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  width: 100%;
  padding: 0;
  font-family: inherit;
  line-height: 1.2;
}

.vmc-h-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

/* 3.4 Campo Valor à Vista (Destaque Fintech Premium) */
.vmc-h-field-price {
  background: linear-gradient(135deg, #F0F9FF 0%, #F0FDF4 100%);
  border-color: #BAE6FD;
}

.vmc-h-field-price .vmc-h-label {
  color: #0369A1;
}

.vmc-h-price-display {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.vmc-price-val {
  font-family: var(--vm-fhead, 'Barlow', system-ui, sans-serif);
  font-size: 21px;
  font-weight: 900;
  color: var(--vm-navy, #062e56);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.vmc-price-pix {
  background: #DCFCE7;
  color: #15803D;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}

.vmc-locked-hint {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* 3.5 Botão de Ação Oficial */
.vmc-h-field-btn {
  display: flex;
}

.vmc-h-btn {
  background: var(--vm-money, #0FA45E);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  padding: 0 18px;
  width: 100%;
  height: 58px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(15, 164, 94, 0.35);
}

.vmc-h-btn:hover:not(:disabled) {
  background: var(--vm-money-dk, #0A6E3D);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 164, 94, 0.45);
}

.vmc-h-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.vmc-h-btn-continue {
  background: var(--vm-money, #0FA45E);
  box-shadow: 0 4px 14px rgba(15, 164, 94, 0.35);
}

.vmc-h-btn-continue:hover:not(:disabled) {
  background: var(--vm-money-dk, #0A6E3D);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 164, 94, 0.45);
}

/* ==========================================================================
   4. Rodapé Interno e Notificações (Feedback Suave)
   ========================================================================== */
.vmc-h-bottom {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vmc-toast {
  font-size: 12.5px;
  border-radius: 999px;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.vmc-toast-ok {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-weight: 600;
}

.vmc-toast-ok strong {
  color: #047857;
}

.vmc-toast-err {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  font-weight: 600;
}

.vmc-toast-send {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
  font-size: 12px;
}

.vmc-h-summary {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #334155;
  box-sizing: border-box;
}

.vmc-h-safe {
  font-size: 11.5px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ==========================================================================
   5. Responsividade (Tablets e Celulares)
   ========================================================================== */
@media (max-width: 1024px) {
  .vmc-h-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vmc-h-field-price {
    grid-column: span 1;
  }

  .vmc-h-field-btn {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .vmc-h-card {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .vmc-h-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .vmc-tabs-nav {
    width: 100%;
    max-width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 4px;
    box-sizing: border-box;
  }

  .vmc-tab {
    flex: 0 0 auto;
    padding: 7px 12px;
    font-size: 13px;
  }

  .vmc-h-top-right {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .vmc-section {
    padding: 26px 0 34px;
  }

  .vmc-h-card {
    padding: 16px 14px 14px;
    border-radius: 12px;
  }

  .vmc-h-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vmc-h-field-btn {
    grid-column: span 1;
  }

  .vmc-h-top-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
