﻿/* ==========================================================================
   Wizard de la ficha de envío
   ========================================================================== */
.wizard {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.wizard-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  background: var(--bg-muted);
  border-bottom: 1px solid #e5e0d5;
  overflow-x: auto;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.3rem;
  border: none;
  background: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: #777;
  cursor: default;
  min-width: 0;
  flex: 1 1 0;
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
  white-space: normal;
}

.wizard-step span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ccc;
  color: #fff;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.wizard-step.active {
  color: var(--text);
}

.wizard-step.active span {
  background: var(--rojo);
}

.wizard-panel {
  display: none;
  padding: 2.5rem;
  border: none;
}

.wizard-panel.active {
  display: block;
}

.wizard-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.wizard-lead {
  color: #666;
  margin: 0 0 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field label .req {
  color: var(--rojo, #c0392b);
  margin-left: 0.15rem;
}

.field input,
.field select,
.field textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #d9d4c9;
  border-radius: 8px;
  background: var(--bg);
  font-size: 1rem;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--arena-dark);
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.2);
}

.field input.error,
.field select.error,
.field textarea.error {
  border-color: var(--rojo);
}

.field small {
  color: #888;
  font-size: 0.8rem;
}

.field--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
}

.field--checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 2px solid #e5e0d5;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.choice-card:hover {
  border-color: var(--arena);
}

.choice-card input {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.choice-card__body {
  display: flex;
  flex-direction: column;
}

.choice-card__body strong {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.choice-card__body span {
  font-size: 0.85rem;
  color: #666;
}

.choice-card:has(input:checked) {
  border-color: var(--rojo);
  background: rgba(185, 56, 42, 0.04);
}

.paquete-fields,
.dinero-fields {
  padding: 1.5rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.wizard-actions .btn {
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.wizard-actions .btn svg {
  flex-shrink: 0;
}

.notice--warning {
  background: #fff8e6;
  border-left: 4px solid #d4a017;
  color: #5c4606;
  margin-bottom: 1.25rem;
}

.summary {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.summary-block {
  background: var(--bg-muted);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.summary-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tierra);
}

.summary-block p {
  margin: 0;
  color: #444;
  line-height: 1.6;
}

.info-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 760px;
  width: 92%;
  max-height: 85vh;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.info-modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.info-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-muted);
  border-bottom: 1px solid #e5e0d5;
}

.info-modal__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.info-modal__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

.info-modal__body {
  padding: 1.5rem;
  max-height: 55vh;
  overflow-y: auto;
}

.info-modal__body h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--tierra);
}

.info-modal__body h3:first-child {
  margin-top: 0;
}

.info-modal__body p {
  margin: 0 0 0.75rem;
  color: #444;
  line-height: 1.6;
}

.info-modal__footer {
  padding: 1rem 1.5rem;
  text-align: right;
  border-top: 1px solid #eee;
}

@media (max-width: 900px) {
  .wizard-step {
    font-size: 0.62rem;
    padding: 0.65rem 0.18rem;
  }

  .wizard-step span {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .form-grid--2,
  .form-grid--3 {
    grid-template-columns: 1fr;
  }

  .choice-group {
    grid-template-columns: 1fr;
  }

  .wizard-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 560px) {
  .wizard-step {
    font-size: 0.52rem;
    padding: 0.55rem 0.12rem;
    gap: 0.25rem;
  }
  .wizard-step span {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

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

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