/**
 * Envelope Experience - IN ARMONIA CON IL RESTO DELLA HOME
 */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Satisfy&display=swap');

:root {
  --envelope-red: #c41e3a;
  --paper-white: #fdfbf7;
  --ink-blue: #1a3a52;
  --wax-gold: #d4af37;
}

/* Sezione principale - STILE COERENTE CON FAQ E FEATURES */
.envelope-experience {
  padding: 5rem 1.5rem;
  background: linear-gradient(180deg, #fef6f8 0%, #fff 100%);
}

/* Header sezione */
.wizard-section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Progress indicator - STILE COERENTE */
.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #9ca3af;
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: #be123c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(190, 18, 60, 0.3);
}

.progress-dot.completed {
  background: #10b981;
  color: #fff;
}

.progress-line {
  width: 60px;
  height: 2px;
  background: #e5e7eb;
  transition: background 0.3s ease;
}

.progress-line.active {
  background: #be123c;
}

/* Card busta - STESSO STILE DELLA WIZARD CARD */
.wizard-card {
  max-width: 700px;
  margin: 0 auto;
  background: #faf8f3;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.wizard-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 2px solid #d4af37;
  border-style: double;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

.wizard-card-body {
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

/* Steps */
.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* Step header */
.step-header {
  text-align: center;
  margin-bottom: 2rem;
}

.step-title {
  font-family: 'Satisfy', cursive;
  font-size: 2rem;
  font-weight: 600;
  color: #be123c;
  margin-bottom: 0.5rem;
}

.step-description {
  font-family: 'Caveat', cursive;
  font-size: 1.125rem;
  color: #6b7280;
}

/* Search box */
.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: 'Caveat', cursive;
  font-size: 1.125rem;
  transition: all 0.2s ease;
  background: #fff;
}

.search-box input:focus {
  outline: none;
  border-color: #be123c;
  box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.1);
}

/* Search results */
.user-results,
.search-results-romantic {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.user-results::-webkit-scrollbar,
.search-results-romantic::-webkit-scrollbar {
  width: 4px;
}

.user-results::-webkit-scrollbar-thumb,
.search-results-romantic::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

.user-result-item,
.search-result-romantic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: #f9fafb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.user-result-item:hover,
.search-result-romantic:hover {
  background: #fff;
  border-color: #fda4af;
  transform: translateX(4px);
}

.user-result-item .name,
.search-result-romantic span {
  font-family: 'Caveat', cursive;
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
}

.user-result-item svg,
.search-result-romantic svg {
  color: #be123c;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.user-result-item:hover svg,
.search-result-romantic:hover svg {
  opacity: 1;
}

.no-results,
.no-results-romantic {
  text-align: center;
  padding: 2rem;
  font-family: 'Caveat', cursive;
  color: #9ca3af;
}

/* Message textarea */
.message-textarea,
.message-textarea-romantic {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  line-height: 1.8;
  resize: vertical;
  transition: all 0.2s ease;
  background: #fff;
  color: var(--ink-blue);
}

.message-textarea:focus,
.message-textarea-romantic:focus {
  outline: none;
  border-color: #be123c;
  box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.1);
}

.char-count {
  text-align: right;
  font-family: 'Caveat', cursive;
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

/* Review card */
.review-card {
  background: rgba(212, 175, 55, 0.1);
  border: 2px solid var(--wax-gold);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.review-item {
  margin-bottom: 1rem;
}

.review-item:last-child {
  margin-bottom: 0;
}

.review-label {
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  font-weight: 600;
  color: #8b7355;
  margin-bottom: 0.25rem;
}

.review-value {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: #1f2937;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Wizard navigation */
.wizard-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.wizard-nav .btn {
  flex: 1;
  padding: 1rem;
  border-radius: 10px;
  font-family: 'Caveat', cursive;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-back {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-back:hover {
  background: #e5e7eb;
}

.btn-next {
  background: #be123c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-next:hover:not(:disabled) {
  background: #9f1239;
  transform: translateY(-2px);
}

.btn-next:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-send {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 100%);
  color: #fff;
  padding: 1.25rem 2rem;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(190, 18, 60, 0.3);
}

.btn-send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(190, 18, 60, 0.4);
}

/* Buttons generici */
.btn-romantic {
  transition: all 0.2s ease;
  font-family: 'Caveat', cursive;
}

.btn-romantic:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

/* Responsive */
@media (max-width: 768px) {
  .envelope-experience {
    padding: 3rem 1.5rem;
  }

  .wizard-card-body {
    padding: 1.5rem;
  }

  .step-title {
    font-size: 1.75rem;
  }

  .step-description {
    font-size: 1rem;
  }

  .wizard-nav {
    flex-direction: column;
  }

  .wizard-nav .btn {
    width: 100%;
  }

  .progress-line {
    width: 30px;
  }
}

@media (max-width: 480px) {
  .progress-dot {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .progress-line {
    width: 20px;
  }
}
