/* ==========================================================================
   DOWNLOAD FLOW & RESULT STYLES — IMÓVEL IDEAL
   Tela de Carregamento & Tela de Baixar Aplicativo
   ========================================================================== */

.download-flow-section {
  width: 100%;
  padding: 40px 20px 70px;
  background: var(--bg-main);
  scroll-margin-top: 80px;
}

.flow-container {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
}

.flow-panel {
  width: 100%;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flow-panel[hidden] {
  display: none !important;
}

.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 44px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.flow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent), var(--brand-gold));
}

.flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(22, 123, 111, 0.1);
  color: var(--brand-accent);
  margin-bottom: 14px;
}

.flow-badge.gold {
  background: rgba(195, 164, 107, 0.15);
  color: #8c6e32;
  border: 1px solid rgba(195, 164, 107, 0.3);
}

.flow-title {
  font-family: var(--font-family);
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
  margin: 0 0 10px;
}

.flow-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 28px;
}

.accent-city {
  color: var(--brand-accent);
  text-decoration: underline;
  text-decoration-color: var(--brand-gold);
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   PROGRESS BAR & STATUS
   -------------------------------------------------------------------------- */
.progress-container {
  width: 100%;
  margin-bottom: 28px;
}

.progress-bar-track {
  width: 100%;
  height: 14px;
  background: #E8ECE8;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-accent), var(--brand-gold));
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13.5px;
}

.progress-status-text {
  color: var(--text-main);
  font-weight: 600;
}

.progress-percent {
  font-weight: 800;
  color: var(--brand-primary);
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   CHECKLIST STEPS
   -------------------------------------------------------------------------- */
.flow-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.check-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.check-step .step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E8ECE8;
  color: #A0ABA6;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.check-step.done {
  color: var(--brand-primary);
  font-weight: 600;
}

.check-step.done .step-icon {
  background: var(--brand-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(22, 123, 111, 0.3);
}

/* --------------------------------------------------------------------------
   TELA DE BAIXAR (DOWNLOAD SCREEN)
   -------------------------------------------------------------------------- */
.download-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.download-step-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.download-heading {
  font-family: var(--font-family);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.15;
  margin: 8px 0 12px;
}

.download-subheading {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 24px;
}

.demo-offers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

@media (min-width: 640px) {
  .demo-offers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.demo-offer-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.demo-offer-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-accent);
}

.offer-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin-bottom: 6px;
}

.offer-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.offer-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Caixa de Download */
.download-cta-box {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface-alt) 100%);
  border: 2px solid var(--brand-accent);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  text-align: center;
  box-shadow: 0 12px 36px rgba(22, 123, 111, 0.12);
}

.download-instructions {
  font-size: 13.5px;
  color: var(--brand-primary);
  line-height: 1.5;
  margin: 0 auto 20px;
  max-width: 580px;
}

.download-instructions strong {
  color: var(--brand-primary);
  font-weight: 800;
}

.download-actions-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

@media (min-width: 600px) {
  .download-actions-row {
    flex-direction: row;
  }
}

.btn-download-apk {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  color: #FFFFFF;
  text-decoration: none;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(23, 61, 58, 0.3);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-download-apk:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(22, 123, 111, 0.4);
  background: linear-gradient(135deg, var(--brand-accent) 0%, #1a9284 100%);
}

.btn-download-apk svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.btn-subtext {
  font-size: 11px;
  font-weight: 600;
  color: #D2EBE7;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.btn-change-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-change-search:hover {
  background: #FFFFFF;
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-change-search svg {
  width: 16px;
  height: 16px;
}

.download-security-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sec-badge svg {
  width: 14px;
  height: 14px;
  color: var(--brand-accent);
}

.download-legal-disclaimer {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 20px 0 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   DIALOG DE DOWNLOAD INICIADO
   -------------------------------------------------------------------------- */
.download-dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  background: transparent;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  margin: auto;
}

.download-dialog::backdrop {
  background: rgba(23, 61, 58, 0.65);
  backdrop-filter: blur(6px);
}

.dialog-content {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
}

.dialog-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E8F5F2;
  color: var(--brand-accent);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.dialog-icon-circle svg {
  width: 32px;
  height: 32px;
}

.dialog-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.dialog-content h2 {
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-primary);
  margin: 0 0 12px;
}

.dialog-content p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 24px;
}

.dialog-content p strong {
  color: var(--brand-primary);
}

.dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 440px) {
  .dialog-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.dialog-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-primary);
  color: #FFFFFF;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dialog-btn-primary:hover {
  background: var(--brand-accent);
}

.dialog-btn-primary svg {
  width: 16px;
  height: 16px;
}

.dialog-btn-secondary {
  background: var(--surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dialog-btn-secondary:hover {
  background: #E8ECE8;
}

.dialog-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px !important;
  margin-bottom: 0 !important;
}
