/* ==========================================================================
   Components: Stepper, Timeline, Forms, Terms, Review & Completion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Stepper / Timeline (Posicionamento Dinâmico: Topo ou Inferior)
   -------------------------------------------------------------------------- */
.stepper-container {
  padding: 20px 32px 18px;
  background: var(--input-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

[data-theme="clean-light"] .stepper-container {
  background: #f1f5f9;
}

/* Quando posicionado no topo (acima do formulário) */
.wizard-card.stepper-pos-top .stepper-container {
  border-top: none;
  border-bottom: 1px solid var(--card-border);
}

.wizard-card.stepper-pos-top .wizard-footer {
  border-top: 1px solid var(--card-border);
}

/* Quando posicionado na parte inferior (acima dos botões) */
.wizard-card.stepper-pos-bottom .stepper-container {
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.wizard-card.stepper-pos-bottom .wizard-footer {
  border-top: none;
}

/* Layout Horizontal e Alinhamentos do Rodapé */
.wizard-footer {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.footer-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: auto !important;
}

.footer-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  margin-left: auto !important; /* Força o botão Avançar para a extremidade direita */
  width: auto !important;
}

.stepper-track-wrapper {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 10px;
}

/* Background connector line */
.stepper-line {
  position: absolute;
  top: 18px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: var(--timeline-line-bg);
  z-index: 1;
}

.stepper-line-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  width: 0%;
  transition: width var(--transition-slow);
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: default;
  padding: 0;
  min-width: 60px;
  outline: none;
  font-family: inherit;
  transition: transform var(--transition-fast);
}

.step-node.clickable {
  cursor: pointer;
}

.step-node.clickable:hover .node-circle {
  transform: scale(1.1);
  border-color: var(--accent-color);
}

.node-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--timeline-node-bg);
  border: 2px solid var(--card-border);
  color: var(--timeline-node-text);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.step-node.active .node-circle {
  background: var(--primary-color);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: var(--timeline-active-glow);
  transform: scale(1.12);
}

.step-node.completed .node-circle {
  background: var(--success-color);
  border-color: #6ee7b7;
  color: #ffffff;
}

.node-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 85px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition-fast);
}

.step-node.active .node-label {
  color: #ffffff;
  font-weight: 700;
}

[data-theme="clean-light"] .step-node.active .node-label {
  color: var(--primary-color);
}

.step-node.completed .node-label {
  color: var(--text-secondary);
}

/* Stepper Progress Info Header */
.stepper-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.stepper-step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stepper-step-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   2. Form Grid & Form Controls
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-group.col-full { grid-column: span 12; }
.form-group.col-half { grid-column: span 6; }
.form-group.col-two-thirds { grid-column: span 8; }
.form-group.col-one-third { grid-column: span 4; }

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.label-required {
  color: var(--error-color);
}

.form-control-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--input-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--card-bg);
  color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-input::placeholder {
  color: var(--input-placeholder);
}

.form-group.has-error .form-input,
.form-group.has-error .form-select {
  border-color: var(--error-color);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-error {
  font-size: 0.78rem;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.form-helper {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cep-loading {
  position: absolute;
  right: 12px;
  font-size: 0.78rem;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   3. Info & Instructions Step (Tutorial)
   -------------------------------------------------------------------------- */
.info-card-box {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.info-headline {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-paragraph {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.info-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.info-highlight-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   4. Terms & Agreements Step
   -------------------------------------------------------------------------- */
.terms-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.terms-summary-box {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 20px;
}

.terms-summary-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.terms-section-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 8px;
}

.terms-section-list::-webkit-scrollbar {
  width: 6px;
}

.terms-section-list::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 4px;
}

.terms-section-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--primary-color);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

.terms-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.terms-section-content {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.terms-actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Checkbox Agreements */
.agreements-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.custom-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-checkbox-card:hover {
  border-color: var(--primary-color);
}

.custom-checkbox-card.checked {
  border-color: var(--primary-color);
  background: var(--card-bg);
}

.custom-checkbox-card.has-error {
  border-color: var(--error-color);
  background: rgba(239, 68, 68, 0.08);
}

.checkbox-input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-label-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
  user-select: none;
}

.checkbox-label-text strong {
  color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   5. Review Step (Summary Table)
   -------------------------------------------------------------------------- */
.review-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-card {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
}

.review-card-header {
  padding: 12px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-step {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.review-list {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 20px;
}

.review-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-item-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
}

.review-item-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   6. WhatsApp Confirmation & Payment Link Request Step
   -------------------------------------------------------------------------- */
.whatsapp-step-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}

.whatsapp-hero-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.whatsapp-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  border: 2px solid #25d366;
  color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.3);
  animation: pulseWhatsapp 2.2s infinite;
}

@keyframes pulseWhatsapp {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(37, 211, 102, 0.25); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(37, 211, 102, 0.45); }
  100% { transform: scale(1); box-shadow: 0 0 15px rgba(37, 211, 102, 0.25); }
}

.whatsapp-headline {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.whatsapp-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.5;
}

.whatsapp-preview-container {
  width: 100%;
  max-width: 600px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: left;
}

.whatsapp-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.whatsapp-preview-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.whatsapp-target-badge {
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
}

.whatsapp-chat-bubble {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid #25d366;
  border-radius: 4px 12px 12px 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.whatsapp-message-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 8px;
}

.whatsapp-message-time {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

.whatsapp-action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-whatsapp-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

.whatsapp-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.whatsapp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.whatsapp-status-badge.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
  transition: all var(--transition-fast);
}

.status-dot-pulse.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.btn-shake {
  animation: shakeAction 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@keyframes shakeAction {
  10%, 90% { transform: translate3d(-3px, 0, 0) scale(1.02); }
  20%, 80% { transform: translate3d(4px, 0, 0) scale(1.02); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0) scale(1.03); }
  40%, 60% { transform: translate3d(6px, 0, 0) scale(1.03); }
}

.btn.disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   7. Completion Step & Local Storage Management
   -------------------------------------------------------------------------- */
.completion-wrapper {
  text-align: center;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.completion-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--success-color);
  color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
  animation: pulseSuccess 2s infinite;
}

@keyframes pulseSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.completion-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
}

.completion-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width: 520px;
}

/* Storage Management Options Box */
.storage-option-card {
  width: 100%;
  max-width: 600px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
}

.storage-option-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.storage-option-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.storage-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.storage-radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.storage-radio-item:hover {
  border-color: var(--primary-color);
}

.storage-radio-item input[type="radio"] {
  accent-color: var(--primary-color);
}

/* Payload Preview Box */
.payload-preview-box {
  width: 100%;
  max-width: 600px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}

.payload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.payload-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--primary-color);
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   7. Full Terms Modal
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-close-modal:hover {
  color: var(--text-primary);
  background: var(--input-bg);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.modal-body h3, .modal-body h4 {
  color: var(--text-primary);
  margin: 12px 0 6px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   8. Mobile Adaptations for Stepper & Grid
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .stepper-container {
    padding: 16px 14px 12px;
  }

  .stepper-track-wrapper {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
    gap: 24px;
  }

  .stepper-line {
    display: none; /* Hide connector on scrollable mobile timeline for clarity */
  }

  .step-node {
    min-width: 54px;
  }

  .node-circle {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .form-group.col-half,
  .form-group.col-two-thirds,
  .form-group.col-one-third {
    grid-column: span 12;
  }

  .review-list {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   9. Interactive Theme Selector Bar
   -------------------------------------------------------------------------- */
.theme-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  margin: 0 auto 14px;
  width: fit-content;
  max-width: 100%;
  z-index: 100;
  transition: all var(--transition-normal);
}

.theme-switcher-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-left: 4px;
}

.theme-options-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-btn-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  user-select: none;
}

.theme-btn-option:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.theme-btn-option.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 12px var(--primary-glow);
  font-weight: 700;
}

.theme-btn-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-btn-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0.9;
}

@media (max-width: 640px) {
  .theme-switcher-bar {
    border-radius: 16px;
    padding: 10px 12px;
    width: 100%;
  }
  .theme-options-group {
    width: 100%;
    justify-content: center;
  }
  .theme-btn-option {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    font-size: 0.78rem;
    padding: 6px 8px;
  }
  .footer-right {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }
  #step-status-container {
    width: 100%;
    justify-content: center;
  }
  .step-status-bar {
    justify-content: center;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

#step-status-container {
  display: inline-flex;
  align-items: center;
}

.step-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  max-width: 100%;
  white-space: nowrap;
}

.step-status-bar.pending {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.06);
}

.step-status-bar.unlocked {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.status-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.step-status-bar.pending .status-bar-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulseStatusYellow 1.6s infinite ease-in-out;
}

.step-status-bar.unlocked .status-bar-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

@keyframes pulseStatusYellow {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.status-bar-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-bar-text {
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-word;
}

.step-status-bar.pending .status-bar-text {
  color: var(--text-primary);
}

.step-status-bar.unlocked .status-bar-text {
  color: #10b981;
}

.status-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spinStatus 0.8s linear infinite;
  flex-shrink: 0;
}

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

.btn-blocked {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  filter: grayscale(20%);
}

/* --------------------------------------------------------------------------
   10. Animações e Transição de Avanço Automático
   -------------------------------------------------------------------------- */
.step-status-bar.auto-advance {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 182, 212, 0.18) 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  animation: pulseAutoAdvanceGlow 1.2s infinite ease-in-out;
}

.step-status-bar.auto-advance .status-bar-dot {
  background: #10b981;
  box-shadow: 0 0 14px #10b981;
}

.step-status-bar.auto-advance .status-bar-text {
  color: #10b981;
  font-weight: 800;
}

@keyframes pulseAutoAdvanceGlow {
  0% { transform: scale(1); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
  50% { transform: scale(1.015); box-shadow: 0 0 24px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: 0 0 12px rgba(16, 185, 129, 0.25); }
}

/* Animações de Transição Visual de Conteúdo de Etapa */
.step-container {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.step-container.step-transition-out {
  opacity: 0;
  transform: translateX(-24px) scale(0.98);
}

.step-container.step-transition-in {
  animation: stepSlideIn 0.4s ease-out forwards;
}

@keyframes stepSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* --------------------------------------------------------------------------
   11. Etapa de Categoria DIV (Promoções, Itens com Preço Promocional e Conteúdo Externo)
   -------------------------------------------------------------------------- */
.div-step-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.promo-card-main {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--card-border, #e2e8f0);
  border-radius: var(--card-border-radius, 16px);
  padding: 26px 28px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.promo-card-main:hover {
  border-color: var(--primary-color);
  box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.09);
}

.promo-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35);
  animation: pulsePromoBadge 2.4s infinite ease-in-out;
}

@keyframes pulsePromoBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.promo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-item-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.promo-tag-pill {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.promo-item-subtitle {
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-top: 6px;
  margin-bottom: 20px;
  line-height: 1.45;
}

/* Card de Preço Promocional em Destaque */
.promo-pricing-card {
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid var(--card-border, rgba(79, 70, 229, 0.15));
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.promo-pricing-left {
  display: flex;
  flex-direction: column;
}

.promo-price-old {
  text-decoration: line-through;
  color: var(--text-muted, #94a3b8);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.promo-price-highlight {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.promo-price-prefix {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.promo-price-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  line-height: 1;
}

.promo-price-period {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.promo-installments {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

.promo-saving-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.promo-description-text {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Lista de Vantagens do Item */
.promo-features-box {
  background: var(--input-bg, #f8fafc);
  border: 1px solid var(--card-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.promo-features-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 10px;
}

.promo-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.promo-feature-icon {
  color: var(--success-color, #10b981);
  flex-shrink: 0;
}

/* Barra de Parâmetro de URL e Ação Externa */
.promo-url-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--input-bg, #f8fafc);
  border: 1px dashed var(--card-border, #cbd5e1);
  border-radius: 12px;
}

.promo-url-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-url-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.promo-external-btn {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.promo-toggle-embed-btn {
  font-size: 0.80rem;
  padding: 7px 12px;
}

/* Container de Prévia Incorporada (iFrame) */
.promo-embed-container {
  margin-bottom: 20px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
}

.promo-embed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--input-bg);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.promo-embed-header a {
  color: var(--primary-color);
  text-decoration: none;
}

.promo-iframe {
  width: 100%;
  height: 380px;
  border: none;
  background: #ffffff;
}

/* Aceite / Seleção do Item Promocional */
.promo-optin-box {
  margin-top: 8px;
}

.promo-optin-card {
  padding: 14px 18px !important;
  border-radius: 12px !important;
  cursor: pointer;
}

.promo-optin-card.checked {
  border-color: var(--primary-color) !important;
  background: rgba(79, 70, 229, 0.08) !important;
}

.promo-optin-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Container de Div customizado genérico */
.custom-div-container {
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.div-url-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--input-bg);
  border-radius: 10px;
  border: 1px dashed var(--card-border);
}
