/**
 * summary.css – Összefoglaló + beküldés (5. lépés) + sikeres képernyő
 *
 * Felelős:
 *   - .summary-section (csoportosított összefoglaló blokk)
 *   - .summary-row (egy sor: cimke + érték)
 *   - .summary-price-box (becsült ár kiemelt doboz)
 *   - .summary-edit-btn (lépésre visszaugró gomb)
 *   - .consent-row (hozzájárulás checkbox)
 *   - .success-screen (sikeres beküldés animált képernyő)
 *   - .toast (értesítő buborék)
 */

/* ==========================================================================
   ÖSSZEFOGLALÓ SZEKCIÓK
   ========================================================================== */

.summary-section {
  margin-bottom: 16px;
}

.summary-section:last-child {
  margin-bottom: 0;
}

.summary-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-section-title i {
  font-size: 11px;
  color: var(--red);
}

/* Lépésre visszaugró gomb */
.summary-edit-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.summary-edit-btn:hover {
  color: var(--text-secondary);
}

.summary-edit-btn i {
  font-size: 10px;
}

/* ==========================================================================
   ÖSSZEFOGLALÓ SOROK
   ========================================================================== */

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.summary-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.summary-row-label {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 1px;
}

.summary-row-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
}

.summary-row-value.muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.summary-row-value.highlight {
  color: var(--gold);
}

.summary-row-value.sos {
  color: var(--orange);
}

/* Képek sor (bélyegkép lista) */
.summary-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.summary-img-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--card-border);
}

/* ==========================================================================
   BECSÜLT ÁR DOBOZ
   ========================================================================== */

.summary-price-box {
  background: var(--red-light);
  border: 1.5px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.summary-price-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-price-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--text-red);
  letter-spacing: 0.5px;
}

.summary-price-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: right;
}

/* Szállítási díj sor a dobozban */
.summary-delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(200, 16, 46, 0.2);
  font-size: 12px;
  color: var(--text-secondary);
}

.summary-delivery-row span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   HOZZÁJÁRULÁS CHECKBOX
   ========================================================================== */

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.consent-row:hover {
  background: var(--card-bg-hover);
}

/* Egyedi checkbox */
.consent-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
}

.consent-checkbox.checked {
  background: var(--red);
  border-color: var(--red);
}

.consent-checkbox.checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 11px;
  color: white;
}

/* Native checkbox elrejtése (helyettesítő van) */
.consent-row input[type="checkbox"] {
  display: none;
}

.consent-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.consent-text a {
  color: var(--text-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   SIKERES KÉPERNYŐ
   ========================================================================== */

#step-success {
  display: none;
  text-align: center;
  padding: 30px 16px 40px;
  animation: fadeInStep 0.4s ease;
}

#step-success.active {
  display: block;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  background: var(--green-light);
  border: 2px solid rgba(46, 204, 113, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: var(--green);
  animation: success-pop 0.5s ease 0.2s both;
}

@keyframes success-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  font-family: var(--font-title);
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 340px;
  margin: 0 auto 24px;
}

/* Megrendelési kód kártya */
.success-code-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin: 0 auto 24px;
  max-width: 320px;
  display: inline-block;
}

.success-code-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.success-code-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--text-primary);
  letter-spacing: 2px;
}

/* Összefoglaló adatok a sikerképernyőn */
.success-details {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 auto 24px;
  max-width: 380px;
  text-align: left;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.success-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.success-detail-label {
  color: var(--text-muted);
}

.success-detail-value {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}

/* "Vissza a főoldalra" gomb */
.btn-home {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-primary);
}

/* ==========================================================================
   TOAST ÉRTESÍTŐK
   ========================================================================== */

.toast {
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  max-width: 320px;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.hiding {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

.toast-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--text-red); }
.toast.warning .toast-icon { color: var(--orange); }
.toast.info    .toast-icon { color: var(--blue); }

.toast-body {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   BECSÜLT ÁR KÁRTYA (5. lépés tetején)
   ========================================================================== */

.summary-price-card {
  background: var(--red-light);
  border: 1.5px solid var(--red-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 14px;
}

.summary-price-card .summary-price-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.summary-price-card .summary-price-value {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--text-red);
  letter-spacing: 0.5px;
}

.summary-price-card .summary-price-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ==========================================================================
   ÖSSZEFOGLALÓ SOROK KONTÉNER (.form-card.summary-rows)
   ========================================================================== */

.summary-rows .summary-section {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-rows .summary-section:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.summary-rows-inner {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Képek sor az összefoglalóban */
.summary-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.summary-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--card-border);
}

/* ==========================================================================
   ÁSZF / FELTÉTELEK KÁRTYA
   ========================================================================== */

.terms-card {
  /* .form-card-tól örökli az alapstílust */
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

/* Natív checkbox elrejtése – egyedi van helyette */
.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Egyedi checkbox négyzet */
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
}

.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--red);
  border-color: var(--red);
}

.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 11px;
  color: white;
}

.checkbox-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.terms-link {
  color: var(--text-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ==========================================================================
   BEKÜLDÉS GOMB
   ========================================================================== */

.submit-section {
  margin-top: 8px;
}

.btn-submit {
  width: 100%;
  padding: 16px 24px;
  background: var(--red);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-title);
  letter-spacing: 0.8px;
  transition: all var(--transition);
  box-shadow: var(--shadow-red);
}

.btn-submit:hover:not(:disabled) {
  background: var(--red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200, 16, 46, 0.45);
}

.btn-submit:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-submit-loading {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   SIKERES KÉPERNYŐ
   ========================================================================== */

.success-screen {
  padding: 20px 0 40px;
  text-align: center;
  animation: fadeInStep 0.4s ease;
}

.success-icon {
  font-size: 60px;
  color: var(--green);
  margin-bottom: 16px;
  display: block;
  animation: success-pop 0.5s ease 0.2s both;
}

@keyframes success-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

.success-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.success-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.success-code {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 16px;
  display: inline-block;
  min-width: 240px;
}

.success-code-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.success-code-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--text-primary);
  letter-spacing: 2px;
}

.success-details {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.success-detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.success-detail-label {
  color: var(--text-muted);
}

.success-detail-value {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-home,
.btn-call {
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-home {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.btn-home:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-primary);
}

.btn-call {
  background: var(--green-light);
  border: 1.5px solid rgba(46, 204, 113, 0.35);
  color: var(--green);
}

.btn-call:hover {
  background: rgba(46, 204, 113, 0.2);
}
