/* ==========================================================================
   RAPSÓDIA DESIGN SYSTEM — NOVA COTAÇÃO & WIZARD (MODERN UX)
   ========================================================================== */

/* Main Layout: 2 Columns on Desktop */
.cotacao-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-6);
  align-items: start;
}

@media (max-width: 1024px) {
  .cotacao-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Stepper Progress Navigation --- */
.wizard-stepper {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  gap: 4px;
  scrollbar-width: none;
}
.wizard-stepper::-webkit-scrollbar {
  display: none;
}

.step-nav-btn {
  flex: 1;
  min-width: 130px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.step-nav-btn:hover {
  background: var(--bg-subtle);
}

/* Default active/completed states */
.step-nav-btn.active {
  border: 1px solid transparent;
}

.step-nav-btn.completed .step-num {
  color: var(--text-on-dark);
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.step-nav-btn.active .step-num {
  color: var(--text-on-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* --- Per-Step Color Themes (Light & Transparent) --- */

/* Step 1: Casamento & Local — Rose / Wine soft */
.step-color-0                { border-left: 3px solid transparent; }
.step-color-0:hover          { background: rgba(155, 32, 78, 0.06); }
.step-color-0.active         { background: rgba(155, 32, 78, 0.08); border-color: rgba(155, 32, 78, 0.25); }
.step-color-0 .step-num      { background: rgba(155, 32, 78, 0.08); color: #9B204E; }
.step-color-0.active .step-num { background: #9B204E; color: #fff; }
.step-color-0.completed .step-num { background: #9B204E; }

/* Step 2: Pacote Musical — Amber / Gold warm */
.step-color-1                { border-left: 3px solid transparent; }
.step-color-1:hover          { background: rgba(179, 136, 34, 0.06); }
.step-color-1.active         { background: rgba(179, 136, 34, 0.08); border-color: rgba(179, 136, 34, 0.25); }
.step-color-1 .step-num      { background: rgba(179, 136, 34, 0.08); color: #8C6A18; }
.step-color-1.active .step-num { background: #B38822; color: #fff; }
.step-color-1.completed .step-num { background: #B38822; }

/* Step 3: Repertório — Indigo / Deep Blue */
.step-color-2                { border-left: 3px solid transparent; }
.step-color-2:hover          { background: rgba(79, 70, 229, 0.06); }
.step-color-2.active         { background: rgba(79, 70, 229, 0.08); border-color: rgba(79, 70, 229, 0.2); }
.step-color-2 .step-num      { background: rgba(79, 70, 229, 0.08); color: #4F46E5; }
.step-color-2.active .step-num { background: #4F46E5; color: #fff; }
.step-color-2.completed .step-num { background: #4F46E5; }

/* Step 4: Músicos & Cachês — Emerald / Green */
.step-color-3                { border-left: 3px solid transparent; }
.step-color-3:hover          { background: rgba(16, 185, 129, 0.06); }
.step-color-3.active         { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.2); }
.step-color-3 .step-num      { background: rgba(16, 185, 129, 0.08); color: #059669; }
.step-color-3.active .step-num { background: #059669; color: #fff; }
.step-color-3.completed .step-num { background: #059669; }

/* Step 5: Deslocamento — Sky Blue / Teal */
.step-color-4                { border-left: 3px solid transparent; }
.step-color-4:hover          { background: rgba(6, 182, 212, 0.06); }
.step-color-4.active         { background: rgba(6, 182, 212, 0.08); border-color: rgba(6, 182, 212, 0.2); }
.step-color-4 .step-num      { background: rgba(6, 182, 212, 0.08); color: #0891B2; }
.step-color-4.active .step-num { background: #0891B2; color: #fff; }
.step-color-4.completed .step-num { background: #0891B2; }

/* Step 6: Revisão & PDF — Purple / Violet */
.step-color-5                { border-left: 3px solid transparent; }
.step-color-5:hover          { background: rgba(147, 51, 234, 0.06); }
.step-color-5.active         { background: rgba(147, 51, 234, 0.08); border-color: rgba(147, 51, 234, 0.2); }
.step-color-5 .step-num      { background: rgba(147, 51, 234, 0.08); color: #7C3AED; }
.step-color-5.active .step-num { background: #7C3AED; color: #fff; }
.step-color-5.completed .step-num { background: #7C3AED; }

.step-label-group {
  display: flex;
  flex-direction: column;
}

.step-label-group .step-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.step-label-group .step-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Wizard Sections --- */
.wizard-step-pane {
  display: none;
  animation: stepFadeIn 0.25s var(--ease-spring);
}

.wizard-step-pane.active {
  display: block;
}

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

.section-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.section-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.section-card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-card-header h3 i,
.section-card-header h3 svg {
  color: var(--wine-700);
}

/* --- Interactive Package Cards Grid --- */
.pacotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.pacote-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pacote-card:hover {
  border-color: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pacote-card.selected {
  border-color: var(--wine-700);
  background: var(--wine-50);
  box-shadow: 0 0 0 1px var(--wine-700), var(--shadow-md);
}

.pacote-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: var(--wine-700);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pacote-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.pacote-instruments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--space-2) 0;
}

.instrument-tag {
  background: var(--bg-subtle);
  color: var(--text-body);
  font-size: 0.725rem;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-weight: 500;
}

.pacote-card.selected .instrument-tag {
  background: rgba(101, 18, 48, 0.1);
  color: var(--wine-800);
}

/* --- Modern Timeline Steps --- */
.timeline-modern {
  position: relative;
  padding-left: 36px;
}

.timeline-modern::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-500) 0%, var(--wine-300) 100%);
  border-radius: var(--radius-full);
}

.timeline-step-item {
  position: relative;
  margin-bottom: var(--space-4);
}

.timeline-step-marker {
  position: absolute;
  left: -36px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid var(--gold-500);
  color: var(--wine-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

.timeline-step-item.has-music .timeline-step-marker {
  background: var(--wine-700);
  border-color: var(--gold-400);
  color: var(--text-on-dark);
}

.timeline-card-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  transition: all var(--transition-fast);
}

.timeline-card-content:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.timeline-step-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.selected-music-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.music-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wine-50);
  color: var(--wine-800);
  border: 1px solid rgba(101, 18, 48, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
}

/* --- Musician Selection Table --- */
.musician-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all var(--transition-fast);
}

.musician-select-row:hover {
  border-color: var(--border-subtle);
  background: var(--bg-subtle);
}

.musician-select-row.active-musician {
  background: var(--wine-50);
  border-color: rgba(101, 18, 48, 0.2);
}

.musician-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.musician-fee-input {
  display: flex;
  align-items: center;
  gap: 6px;
}
.musician-fee-input input {
  width: 110px;
  text-align: right;
  font-weight: 600;
}

/* --- Sticky Live Summary Card (Painel Lateral) --- */
.sticky-summary-card {
  position: sticky;
  top: 80px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  z-index: 100;
}

.summary-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.summary-total-banner {
  background: linear-gradient(135deg, var(--wine-900) 0%, var(--wine-800) 100%);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--text-on-dark);
  text-align: center;
  box-shadow: 0 4px 14px rgba(36, 5, 14, 0.25);
  border: 1px solid rgba(201, 169, 110, 0.3);
}

.summary-total-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-400);
}

.summary-total-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 2px;
}

.summary-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.summary-detail-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-body);
}
.summary-detail-row.bold {
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
}

.summary-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-2);
}

/* Church Autocomplete Dropdown List */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.autocomplete-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.autocomplete-item:hover {
  background: var(--wine-50);
}

.autocomplete-item:last-child {
  border-bottom: none;
}
