/* ============================================================
   BASE / GLOBAL
   ============================================================ */

:root{
  --vio: #000000;
  --vio-dark: #000000;
  --bg: #ffffff;
  --muted: #666;
  --border: #e7e7e7;
  --success: #0a7d40;
  --danger: #b80f0f;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

*{
  box-sizing: border-box;
}

html, body{
  margin:0;
  padding:0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color:#222;
  background:var(--bg);
}

/* ============================================================
   HEADER
   ============================================================ */

.top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 28px;
  border-bottom:1px solid var(--border);
  background:#fff;
}

.top-left, .top-right{
  display:flex;
  align-items:center;
}

.top-right{
  gap:10px;
}

.flag-link{
  display:inline-flex;
  align-items:center;
}

.logo{
  height:46px;
}

.flag{
  width:36px;
  height:24px;
  object-fit:cover;
  border-radius:6px;
  border:2px solid transparent;
  margin-left:10px;
  transition:.2s;
}

/* ✅ WICHTIG: Diese Regel darf KEINE Effekte mehr aufs Bild legen
   weil sonst wieder Artefakte/Striche entstehen */
.flag-link.active .flag{
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

/* ============================================================
   CARD / MAIN CONTAINER
   ============================================================ */

.return-section{
  max-width: 980px;
  margin: 48px auto;
  background:#fff;
  border-radius:18px;
  box-shadow: var(--shadow);
  padding: 42px 48px;
  text-align: center;
}

.lead{
  margin:4px 0 12px;
  color:#222;
  font-size:1.15rem;
}

.explain{
  margin:0 0 12px;
  color:var(--muted);
}

.greeting{
  margin:10px 0 2px;
  font-size:1.05rem;
}

.meta{
  margin:0 0 26px;
  color:var(--muted);
}

/* ============================================================
   STEPS / PROGRESS
   ============================================================ */

.steps{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:22px 0 18px;
}

.step{
  min-width:86px;
}

.circle{
  width:38px;
  height:38px;
  border-radius:50%;
  border:2px solid var(--vio);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  margin:0 auto 6px;
}

.step.active .circle{
  background:var(--vio);
  color:#fff;
}

.line{
  width:64px;
  height:2px;
  background:#dcdcdc;
}

/* ============================================================
   FORMULAR
   ============================================================ */

.return-form{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  margin-top: 6px;
}

.label{
  align-self:flex-start;
  margin:14px 0 6px 10%;
  color:#333;
  font-weight:600;
}

.return-form input[type="text"]{
  width:80%;
  padding:14px 12px;
  border:1px solid #d7d7d7;
  border-radius:10px;
  transition: box-shadow .2s, border-color .2s;
}

.return-form input[type="text"]:focus{
  outline:none;
  border-color:var(--vio);
  box-shadow:0 0 0 4px rgba(80,35,121,.12);
}

.return-form textarea{
  width:80%;
  padding:14px 12px;
  border:1px solid #d7e7d7;
  border-radius:10px;
  transition: box-shadow .2s, border-color .2s;
  min-height: 110px;
  resize: vertical;
}

.return-form textarea:focus{
  outline:none;
  border-color:var(--vio);
  box-shadow:0 0 0 4px rgba(80,35,121,.12);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary{
  background:var(--vio);
  color:#fff;
  border:none;
  padding:12px 26px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
  transition: transform .08s, background .2s;
  margin-top:6px;
}

.btn-primary:hover{
  background:var(--vio-dark);
  transform: translateY(-1px);
}

.btn-submit{
  margin-top: 18px;
  background: linear-gradient(135deg,#5b2a93,#7b49c4);
  color:#fff;
  border:none;
  padding:15px 30px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  font-size:1.08rem;
  letter-spacing:.2px;
  box-shadow: 0 8px 20px rgba(59, 56, 56, 0.22);
  transition: transform .08s, filter .2s, opacity .2s;
}

.btn-submit:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-submit:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}

.btn-submit.active{
  transform: translateY(-1px) scale(1.012);
}

/* ============================================================
   TOOLTIP
   ============================================================ */

.tooltip-container{
  position:relative;
  margin-top:14px;
  display:inline-block;
}

.help-link{
  color:var(--vio);
  text-decoration:underline;
  cursor:pointer;
  font-weight:600;
}

.tooltip-box{
  display:none;
  position:absolute;
  top:28px;
  left:50%;
  transform:translateX(-50%);
  background:#fff;
  color:#333;
  width:360px;
  padding:14px 16px;
  border-radius:12px;
  box-shadow: var(--shadow);
  border:1px solid var(--border);
  text-align:left;
  line-height:1.45;
}

.tooltip-container:hover .tooltip-box{
  display:block;
}

/* ============================================================
   GRUNDE / REASON LIST
   ============================================================ */

.reason-list{
  width:80%;
  margin: 8px auto 4px;
  text-align:left;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
}

.reason-option{
  display:grid;
  grid-template-columns: 28px 1fr;
  align-items:center;
  gap:10px;
}

.reason-option input[type="radio"]{
  accent-color:var(--vio);
  transform:scale(1.25);
}

.reason-option span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ============================================================
   TABELLE
   ============================================================ */

.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

.order-table{
  width:100%;
  border-collapse:collapse;
  margin-top: 6px;
}

.order-table th{
  background:#faf7ff;
  color:#322d3b;
  text-align:left;
  padding:12px 10px;
  border-bottom:2px solid #e6e1f3;
}

.order-table td{
  padding:11px 10px;
  border-bottom:1px solid #efefef;
  vertical-align:middle;
}

.order-table tr:hover td{
  background:#fbf9ff;
}

.disabled td{
  color:#aaa;
  background:#fafafa;
}

.nonreturnable{
  color:var(--danger);
  font-weight:600;
  font-size:.95rem;
}

.small-hint{
  margin:18px 0 6px;
  color:#777;
}

/* ============================================================
   ERROR TEXT
   ============================================================ */

.error-text{
  margin-top:10px;
  color:var(--danger);
  font-weight:600;
}

/* ============================================================
   RESPONSIVE PART 1
   ============================================================ */

@media (max-width: 860px){
  .return-section{
    margin:28px 14px;
    padding:28px 20px;
  }

  .label{
    margin-left:0;
    align-self:stretch;
  }

  .return-form input[type="text"],
  .return-form textarea{
    width:100%;
  }

  .reason-list{
    width:100%;
  }

  .tooltip-box{
    width:86vw;
  }

  .line{
    width:40px;
  }

  .order-table th, .order-table td{
    padding:10px 8px;
    font-size:.95rem;
  }

  .btn-submit{
    width:100%;
  }
}

/* ============================================================
   STEP 3 – UPLOAD-BEREICH (Dropzone + Dateiliste)
   ============================================================ */

/* --- Wrapper --- */
.upload-wrapper {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: 14px;
  background: #faf7ff;
  border: 1px dashed #c9b3ff;
}

/* --- Titel & Beschreibung --- */
.upload-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.upload-text {
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
  margin-bottom: 1rem;
  color: #444;
}

/* --- DROPZONE --- */
.upload-dropzone {
  position: relative;
  margin: 0 auto 1rem auto;
  max-width: 480px;
  height: 130px;
  border-radius: 12px;
  border: 2px dashed #a77cff;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform .08s;
}

.upload-dropzone:hover {
  border-color: #000000;
  box-shadow: 0 0 0 3px rgba(123,63,253,0.15);
  background: #f8f3ff;
  transform: translateY(-1px);
}

.upload-dropzone.dragover {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(123, 63, 253, 0.22);
  background: #f2e9ff;
}

/* Dropzone-Inhalt */
.upload-dropzone-inner {
  text-align: center;
  pointer-events: none;
}

.upload-icon {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--vio);
}

.upload-main-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.upload-sub-label {
  font-size: 0.8rem;
  color: #666;
}

/* Unsichtbares File-Input */
#fileInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ============================================================
   DATEI-LISTE
   ============================================================ */

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5ddff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(80,35,121,.06);
}

.file-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 80%;
}

.delete-btn {
  border: none;
  background: #f4e6ff;
  color: #020003;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0;
  line-height: 1;
}

.delete-btn:hover {
  background: #e5cffc;
  color: #25202b;
}

/* ============================================================
   HINWEISTEXT
   ============================================================ */

.upload-hint {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-top: 0.25rem;
}

/* ============================================================
   MOBILE OPTIMIERUNG
   ============================================================ */
@media (max-width: 600px) {

  .upload-wrapper {
    padding: 1.25rem 1rem;
  }

  .upload-dropzone {
    height: 110px;
    max-width: 100%;
  }

  .upload-title {
    font-size: 1rem;
  }

  .file-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 0.65rem;
  }

  .file-row span {
    max-width: 100%;
  }
}

/* ============================================================
   🔧 OVERRIDES – FLAGGEN (HARTER KILL-SWITCH GEGEN STRICHE)
   ============================================================ */

.top-right{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}

/* Falls irgendwo Linien per Pseudo-Element kommen */
.flag-link::before,
.flag-link::after{
  content:none !important;
  display:none !important;
}

/* Link komplett "clean" */
.flag-link{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  text-decoration:none !important;
  border-bottom:0 !important;

  padding:4px !important;
  border-radius:10px !important;
  border:2px solid transparent !important;

  background:transparent !important;

  box-shadow:none !important;
  outline:none !important;
  filter:none !important;

  /* wichtig gegen alle Inline/Baseline-Effekte */
  line-height:0 !important;
  font-size:0 !important;

  overflow:visible !important;
}

/* Bild: alles aus, damit NIE wieder Striche durch shadow/transform entstehen */
.flag{
  display:block !important;
  width:36px !important;
  height:24px !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  box-shadow:none !important;
  outline:none !important;
  transform:none !important;
  filter:none !important;
}

/* Diese Regel ist bei dir weiter oben drin und hat früher Stress gemacht:
   Wir neutralisieren sie HARD (auch wenn sie eigentlich nicht mehr greift) */
.flag-link.active .flag{
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Active-State NUR am Link (sauberer Chip) */
.flag-link.active{
  border-color: var(--vio) !important;
  background: rgba(80,35,121,.15) !important;
  box-shadow:none !important;
}

/* Fokus/Klick: ebenfalls nichts zeichnen */
.flag-link:focus,
.flag-link:focus-visible,
.flag-link:active{
  outline:none !important;
  box-shadow:none !important;
}
/* ============================================================
   FINAL FIX: ORDER-SEITE – TABELLE PERFEKT IM RAHMEN
   ============================================================ */

.return-section.order-wide{
  max-width: 1850px !important;          /* etwas mehr Luft */
  width: calc(100% - 40px) !important;   /* näher an Rand */
  margin: 32px auto !important;
  padding: 32px 32px !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

/* Tabelle darf komplette Breite nutzen */
.return-section.order-wide .order-table{
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

/* Kein Zeilenumbruch */
.return-section.order-wide .order-table th,
.return-section.order-wide .order-table td{
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* WICHTIG: nichts mehr abschneiden */
.return-section.order-wide .table-wrap{
  overflow-x: auto !important;   /* scrollt falls minimal nötig */
}

/* Checkbox-Spalte sauber sichtbar */
.return-section.order-wide .order-table td:last-child,
.return-section.order-wide .order-table th:last-child{
  text-align: center !important;
  min-width: 90px !important;
}

/* Sicherheit: main nicht limitieren */
main{
  max-width: none !important;
}

/* ORDER-SEITE: Labels (z.B. "Positionen durchsuchen") linksbündig */
.return-section.order-wide .label{
  margin-left: 0 !important;
  align-self: flex-start !important;
}

/* ORDER-SEITE: visueller "Zoom" (Skalierung) */
.return-section.order-wide{
  transform: scale(0.85);
  transform-origin: top center;
}

/* Damit der Abstand nach unten passt */
.return-section.order-wide{
  margin-bottom: 80px !important;
}

/* ============================================================
   COLOR OVERRIDE – LILA ENTFERNEN
   ============================================================ */

/* Hauptfarbe ersetzen */
:root{
  --vio: #111111 !important;
  --vio-dark: #000000 !important;
}

/* Buttons schwarz */
.btn-primary,
.btn-submit{
  background: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-submit:hover{
  background: #000000 !important;
  filter: none !important;
}

/* Progress-Kreis schwarz */
.circle{
  border-color: #111111 !important;
}

.step.active .circle{
  background: #111111 !important;
  color: #ffffff !important;
}

/* Radio-Buttons schwarz */
.reason-option input[type="radio"]{
  accent-color: #111111 !important;
}

/* Checkboxen schwarz */
.check-item{
  accent-color: #111111 !important;
}

/* Upload-Bereich neutral */
.upload-wrapper{
  background: #f7f7f7 !important;
  border-color: #dcdcdc !important;
}

.upload-dropzone{
  border-color: #cfcfcf !important;
}

.upload-dropzone:hover{
  border-color: #111111 !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08) !important;
  background: #ffffff !important;
}

/* Upload Icon schwarz */
.upload-icon{
  color: #111111 !important;
}

/* Aktive Flag neutral */
.flag-link.active{
  background: #f3f3f3 !important;
  border-color: #cccccc !important;
}

/* Tabelle Header neutral */
.order-table th{
  background: #f5f5f5 !important;
  color: #111111 !important;
}

/* Fokus-Felder schwarz */
input:focus,
textarea:focus,
select:focus{
  border-color: #111111 !important;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.06) !important;
}

/* Plus-Button schwarz */
.qty-plus{
  background: #111111 !important;
  color: #ffffff !important;
}
