/* Fidim Wizard & Card Styles */
/* ========================== */

/* Basic Wizard Step Layout */
.fidim-section.wizard-step {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  margin-bottom: 0 !important;
  gap: 20px !important;
}

/* Wizard Step Labels */
.fidim-section.wizard-step > label {
  writing-mode: horizontal-tb !important; /* Horizontale tekst */
  text-orientation: initial !important; 
  transform: none !important; /* Geen rotatie */
  width: 300px !important; /* Nog bredere vaste breedte voor alle labels */
  height: 254px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important; /* Rechts uitlijnen */
  font-weight: bold !important;
  color: #333 !important;
  padding: 10px 15px !important;
  flex-shrink: 0 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 24px !important; /* Uniforme font-grootte voor alle labels */
  margin-bottom: 0 !important;
  word-wrap: break-word !important; /* Tekst afbreken indien nodig */
  line-height: 1.2 !important; /* Betere regelafstand voor langere titels */
}

/* Specific Mounting Prep Label Override */
html body .fidim-section.wizard-step[data-step="mounting-prep"] > label,
div.fidim-section.wizard-step[data-step="mounting-prep"] > label,
.fidim-section.wizard-step[data-step="mounting-prep"] > label {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  font-size: 24px !important;
  width: 300px !important;
  text-align: right !important;
  padding-right: 15px !important;
}

/* Upload Step Styles */
/* Dimensions container matching card container (net als upload) */
.wizard-step[data-step="upload"] .dimensions-card-container {
  border-radius: 12px;
  display: flex;
  gap: 5px;
  padding: .4em;
  font-family: 'Outfit', sans-serif;
}

/* Afmetingen sectie stijlen - in de rechterhelft van de gespleten card */
.wizard-step[data-step="upload"] .dimensions-half .dimensions-inputs {
  width: 100%;
  height: 100%;
  padding: 24px;
  background: transparent;
  border: none; /* border komt van parent dimensions-half */
  border-radius: 0 12px 12px 0; /* matching parent border-radius */
  box-shadow: none; /* shadow komt van parent */
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  box-sizing: border-box;
  gap: 22px;
}

.wizard-step[data-step="upload"] .dimensions-half .dimensions-inputs::before {
  display: none; /* geen overlay nodig in split-card */
}

.wizard-step[data-step="upload"] .dimensions-inputs > * {
  position: relative;
  z-index: 1;
}

/* Upload sectie stijlen - exact matching card styling */
.wizard-step[data-step="upload"] {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Upload sectie stijlen - in de linkerhelft van de gespleten card */
.wizard-step[data-step="upload"] .upload-half .fidim-dropzone {
  width: 100%;
  height: 100%;
  border: 2px dashed #e0e0e0;
  border-radius: 12px 0 0 12px; /* matching parent border-radius */
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: #666; /* Grijs in plaats van zwart */
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  text-align: center;
  z-index: 1;
}

/* Vertically split left half: top = reference, bottom = dropzone */
.wizard-step[data-step="upload"] .upload-half {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.wizard-step[data-step="upload"] .upload-half .fidim-reference-wrapper {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px 20px;
  box-sizing: border-box;
}
/* Move the reference input a bit lower within the top half */
.wizard-step[data-step="upload"] .upload-half .fidim-reference-wrapper .formField {
  margin-top: 18px;
}
.wizard-step[data-step="upload"] .upload-half .fidim-dropzone {
  flex: 1 1 50%;
  height: auto; /* allow flex to control height */
  border-radius: 0 0 0 12px; /* only bottom-left corners rounded */
}
.wizard-step[data-step="upload"] .upload-half .fidim-dropzone::before {
  border-radius: 0 0 0 12px;
}

.wizard-step[data-step="upload"] .upload-half .fidim-dropzone::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.65);
  z-index: 0;
  transition: background-color 0.5s;
  pointer-events: none;
  border-radius: 12px 0 0 12px;
}

.wizard-step[data-step="upload"] .upload-half .fidim-dropzone:hover {
  border-color: #007CBA;
  border-style: dashed;
}

.wizard-step[data-step="upload"] .upload-half .fidim-dropzone:hover::before {
  background-color: rgba(255, 255, 255, 0);
}

.wizard-step[data-step="upload"] .upload-half .fidim-dropzone.dragover {
  background-color: #f0f0f0;
  border-color: #007CBA;
  border-style: dashed;
}

/* Dropzone text styling */
.wizard-step[data-step="upload"] .upload-half .fidim-dropzone .dropzone-main-text {
  font-size: 16px;
  color: #666;
  font-weight: 700;
  margin-bottom: 0; /* Geen marge, want subtekst wordt absoluut gepositioneerd */
  position: relative;
  z-index: 2;
  margin-top: -12px; /* Iets hoger geplaatst */
}

.wizard-step[data-step="upload"] .upload-half .fidim-dropzone .dropzone-sub-text {
  font-size: 12px;
  color: #999;
  font-weight: 400;
  position: absolute;
  bottom: 10px; /* Iets verder naar beneden voor meer ruimte met hoofdtekst */
  left: 50%;
  transform: translateX(-50%); /* Horizontaal centreren */
  z-index: 2;
  white-space: nowrap; /* Voorkom tekstwrapping */
}

/* Tekst binnen dropzone moet boven de overlay staan */
.wizard-step[data-step="upload"] .upload-half .fidim-dropzone > * {
  position: relative;
  z-index: 2;
}

/* General Wizard Step Labels */
.wizard-step label {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

/* Wizard Step Visibility Controls */
.wizard-step { 
  display: none;
  width: 100%;
  margin-bottom: 40px; /* Ruimte tussen stappen */
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.wizard-step.active { 
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Prevent hidden wizard steps from reserving space */
.wizard-step:not(.active) {
  display: none !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

/* Quantity Step Styles */
/* Quantity section styling */
.wizard-step[data-step="quantity"] {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.quantity-step-content {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.wizard-step[data-step="quantity"] label {
  font-family: 'Outfit', sans-serif;
  font-size: 24px; /* Aangepast naar uniforme grootte */
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

/* Reset de oude containerstijl nu het in een kaart zit */
.wizard-step[data-step="quantity"] .fidim-input-with-unit {
  margin-top: 0; /* Verwijder marge voor betere centrering in de kaart */
  width: auto;
  max-width: none;
  justify-content: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Nieuwe container voor aantal-invoer, gestyled als een kaart */
.wizard-step[data-step="quantity"] .quantity-card-container {
  border-radius: 12px;
  display: flex;
  justify-content: flex-start; /* Links uitlijnen in plaats van centreren */
  align-items: center;
  padding: .4em;
  font-family: 'Outfit', sans-serif;
  box-sizing: border-box;
  position: relative;
  align-self: flex-start; /* Expliciete links-uitlijning */
  margin-left: 0; /* Geen marge links voor consistente uitlijning */
}

/* Force quantity card container to exact 710px width - highest priority */
.fidim-section.wizard-step[data-step="quantity"] .quantity-step-content .quantity-card-container {
  width: 710px !important;
  min-width: 710px !important;
  max-width: 710px !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  flex-basis: 710px !important;
}

.wizard-step[data-step="quantity"] .quantity-inputs {
  width: 100%;
  height: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.wizard-step[data-step="quantity"] .quantity-inputs::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.65);
  z-index: 0;
  transition: background-color 0.5s;
  pointer-events: none;
  border-radius: 12px;
}

.wizard-step[data-step="quantity"] .quantity-inputs > * {
  position: relative;
  z-index: 1;
}

.wizard-step[data-step="quantity"] input {
  text-align: center;
  width: 80px;
  padding: 8px;
  font-size: 18px;
}

/* Maak het aantal stuks veld extra breed in de quantity stap */
.wizard-step[data-step="quantity"] .formField,
.wizard-step[data-step="quantity"] .formField input {
  max-width: 240px;
}

/* OVERRIDE: Maak formField in quantity-stap compact met vaste breedte */
.wizard-step[data-step="quantity"] .formField {
  width: 150px;
  max-width: 100%;
  margin: 0 0 18px 0;
}
.wizard-step[data-step="quantity"] .formField input {
  width: 100%;
  max-width: 100%;
}

/* --- GENERIC CARD STYLES FOR ALL WIZARD STEPS --- */
.card.fidim-product-cards,
.card.fidim-material-cards,
.card.fidim-finish-cards,
.card.fidim-thickness-cards,
.card.fidim-mounting-cards,
.card.fidim-mounting-prep-cards,
.card.fidim-delivery-cards {
  width: 710px;
  height: 254px;
  border-radius: 12px;
  display: flex;
  gap: 5px;
  padding: .4em;
  font-family: 'Outfit', sans-serif;
}

.card.fidim-product-cards p,
.card.fidim-material-cards p,
.card.fidim-finish-cards p,
.card.fidim-thickness-cards p,
.card.fidim-mounting-cards p,
.card.fidim-mounting-prep-cards p,
.card.fidim-delivery-cards p {
  height: 100%;
  flex: 1;
  overflow: hidden;
  cursor: pointer;
  transition: all .5s;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%);
}

.card.fidim-product-cards p::before,
.card.fidim-material-cards p::before,
.card.fidim-finish-cards p::before,
.card.fidim-thickness-cards p::before,
.card.fidim-mounting-cards p::before,
.card.fidim-mounting-prep-cards p::before,
.card.fidim-delivery-cards p::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.75);
  z-index: 0;
  transition: background-color 0.5s;
  pointer-events: none;
}

.card.fidim-product-cards p:hover,
.card.fidim-material-cards p:hover,
.card.fidim-finish-cards p:hover,
.card.fidim-thickness-cards p:hover,
.card.fidim-mounting-cards p:hover,
.card.fidim-mounting-prep-cards p:hover,
.card.fidim-delivery-cards p:hover {
  flex: 4;
  filter: grayscale(0%);
  border-color: #007CBA;
}

.card.fidim-product-cards p:hover::before,
.card.fidim-material-cards p:hover::before,
.card.fidim-finish-cards p:hover::before,
.card.fidim-thickness-cards p:hover::before,
.card.fidim-mounting-cards p:hover::before,
.card.fidim-mounting-prep-cards p:hover::before,
.card.fidim-delivery-cards p:hover::before {
  /* Bijna geen wit bij hover zodat de afbeelding maximaal uitkomt */
  background-color: rgba(255, 255, 255, 0.24);
}

.card.fidim-product-cards p:first-child,
.card.fidim-material-cards p:first-child,
.card.fidim-finish-cards p:first-child,
.card.fidim-thickness-cards p:first-child,
.card.fidim-mounting-cards p:first-child,
.card.fidim-mounting-prep-cards p:first-child,
.card.fidim-delivery-cards p:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

/* === GLOBALE DISABLED CARD STYLING === */
.card.fidim-product-cards p.disabled,
.card.fidim-material-cards p.disabled,
.card.fidim-finish-cards p.disabled,
.card.fidim-thickness-cards p.disabled,
.card.fidim-mounting-cards p.disabled,
.card.fidim-mounting-prep-cards p.disabled,
.card.fidim-delivery-cards p.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(80%);
  border-color: #ccc;
  position: relative;
}

/* Diagonale lijnen op alle disabled cards */
.card.fidim-product-cards p.disabled::after,
.card.fidim-material-cards p.disabled::after,
.card.fidim-finish-cards p.disabled::after,
.card.fidim-thickness-cards p.disabled::after,
.card.fidim-mounting-cards p.disabled::after,
.card.fidim-mounting-prep-cards p.disabled::after,
.card.fidim-delivery-cards p.disabled::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, #d2d2d2 0 2px, transparent 2px 24px);
  background-size: 32px 32px;
  opacity: 0.35;
}

/* Zorg dat parent card overflow visible heeft voor tooltip */
.card.fidim-product-cards,
.card.fidim-finish-cards,
.card.fidim-thickness-cards,
.card.fidim-mounting-prep-cards {
  overflow: visible !important;
}



/* Single card: altijd afgeronde hoeken en volledige breedte */
.card.fidim-product-cards > p:only-child,
.card.fidim-material-cards > p:only-child,
.card.fidim-finish-cards > p:only-child,
.card.fidim-thickness-cards > p:only-child,
.card.fidim-mounting-cards > p:only-child,
.card.fidim-mounting-prep-cards > p:only-child,
.card.fidim-delivery-cards > p:only-child {
  border-radius: 12px !important;
  flex: 1;
}

/* Zorg dat een enkele card de volledige breedte gebruikt */
.card.fidim-product-cards > p:only-child,
.card.fidim-material-cards > p:only-child,
.card.fidim-finish-cards > p:only-child,
.card.fidim-thickness-cards > p:only-child,
.card.fidim-mounting-cards > p:only-child,
.card.fidim-mounting-prep-cards > p:only-child,
.card.fidim-delivery-cards > p:only-child {
  width: 100%;
  box-sizing: border-box;
}

/* Fix: parent .card moet justify-content:center hebben als er maar 1 child is */
.card.fidim-product-cards:has(> p:only-child),
.card.fidim-material-cards:has(> p:only-child),
.card.fidim-finish-cards:has(> p:only-child),
.card.fidim-thickness-cards:has(> p:only-child),
.card.fidim-mounting-cards:has(> p:only-child),
.card.fidim-mounting-prep-cards:has(> p:only-child),
.card.fidim-delivery-cards:has(> p:only-child) {
  justify-content: center;
}

.card.single-visible > p {
  border-radius: 12px !important;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

/* Label voor afmetingen sectie - buiten de card (net als upload label) */
.wizard-step[data-step="upload"] .dimensions-label {
  display: block;
  margin-top: 32px;
  margin-bottom: 16px;
  color: #333;
  font-family: 'Outfit', sans-serif;
  font-size: 28px; /* Consistent met andere wizard-step labels */
  font-weight: 600;
}

/* Card span styles and hover effects */
.card.fidim-product-cards p span,
.card.fidim-material-cards p span,
.card.fidim-finish-cards p span,
.card.fidim-thickness-cards p span,
.card.fidim-mounting-cards p span,
.card.fidim-mounting-prep-cards p span,
.card.fidim-delivery-cards p span {
  min-width: 14em;
  padding: 0.5em 1em;
  text-align: center;
  transform: rotate(-90deg);
  transition: all .5s;
  text-transform: uppercase;
  color: #000;
  font-weight: 700;
  letter-spacing: .1em;
  z-index: 2;
  position: relative;
  background-color: transparent;
  border-radius: 6px;
}

/* Subtekst blokje voor delivery opties - apart element onder de span */
.card.fidim-delivery-cards p[data-value="standard"]::after {
  content: "5 - 7 werkdagen";
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: calc(18em - 24px);
  text-align: center;
}

.card.fidim-delivery-cards p[data-value="quick"]::after {
  content: "3 - 5 werkdagen";
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: calc(18em - 24px);
  text-align: center;
}

.card.fidim-delivery-cards p[data-value="rush"]::after {
  content: "1 - 2 werkdagen";
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: calc(18em - 24px);
  text-align: center;
}

/* Subtekst blokje voor montage voorbereiding opties - breder dan delivery variant */
.card.fidim-mounting-prep-cards p[data-value="loose"]::after,
.card.fidim-mounting-prep-cards p[data-value="los"]::after {
  content: "Afstandhouders, lijm en papieren mal los geleverd.";
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  white-space: normal;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: calc(20em - 32px);
  text-align: center;
  line-height: 1.4;
  max-width: 280px;
}

.card.fidim-mounting-prep-cards p[data-value="prepped"]::after,
.card.fidim-mounting-prep-cards p[data-value="pre-mounted"]::after,
.card.fidim-mounting-prep-cards p[data-value="premounted"]::after,
.card.fidim-mounting-prep-cards p[data-value="mounted"]::after,
.card.fidim-mounting-prep-cards p[data-value="voorgemonteerd"]::after {
  content: "Afstandhouders gemonteerd, mal voorzien van boormarkeringen.";
  position: absolute;
  top: calc(50% + 30px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #444;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  white-space: normal;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: calc(20em - 32px);
  text-align: center;
  line-height: 1.4;
  max-width: 280px;
}

.card.fidim-product-cards p:hover span,
.card.fidim-material-cards p:hover span,
.card.fidim-finish-cards p:hover span,
.card.fidim-thickness-cards p:hover span,
.card.fidim-mounting-cards p:hover span,
.card.fidim-mounting-prep-cards p:hover span,
.card.fidim-delivery-cards p:hover span {
  transform: rotate(0);
  color: #007CBA;
  background-color: rgba(255, 255, 255, 0.9);
}

/* Maak subtekst blokje zichtbaar bij hover en selected voor delivery en mounting prep cards */
.card.fidim-delivery-cards p:hover::after,
.card.fidim-delivery-cards p.selected::after,
.card.fidim-mounting-prep-cards p:hover::after,
.card.fidim-mounting-prep-cards p.selected::after {
  opacity: 1;
}

/* Card selected states */
.card.fidim-product-cards p.selected,
.card.fidim-material-cards p.selected,
.card.fidim-finish-cards p.selected,
.card.fidim-thickness-cards p.selected,
.card.fidim-mounting-cards p.selected,
.card.fidim-mounting-prep-cards p.selected,
.card.fidim-delivery-cards p.selected,
.card.fidim-product-cards p.selected:hover,
.card.fidim-material-cards p.selected:hover,
.card.fidim-finish-cards p.selected:hover,
.card.fidim-thickness-cards p.selected:hover,
.card.fidim-mounting-cards p.selected:hover,
.card.fidim-mounting-prep-cards p.selected:hover,
.card.fidim-delivery-cards p.selected:hover {
  flex: 4;
  filter: grayscale(0%);
  border-color: #007CBA;
  /* Subtiele blauwe tint als overlay, vloeiend animerend via box-shadow */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 0 0 9999px rgba(0, 124, 186, 0.10);
}

.card.fidim-product-cards p.selected::before,
.card.fidim-material-cards p.selected::before,
.card.fidim-finish-cards p.selected::before,
.card.fidim-thickness-cards p.selected::before,
.card.fidim-mounting-cards p.selected::before,
.card.fidim-mounting-prep-cards p.selected::before,
.card.fidim-delivery-cards p.selected::before {
  /* Iets meer wit bij selected; gebruik background-color i.p.v. gradient zodat dit vloeiend kan faden */
  background-color: rgba(255, 255, 255, 0.45);
}

.card.fidim-product-cards p.selected span,
.card.fidim-material-cards p.selected span,
.card.fidim-finish-cards p.selected span,
.card.fidim-thickness-cards p.selected span,
.card.fidim-mounting-cards p.selected span,
.card.fidim-mounting-prep-cards p.selected span,
.card.fidim-delivery-cards p.selected span {
  transform: rotate(0);
  color: #007CBA;
  background-color: rgba(255,255,255,0.95);
}

/* Card last-child border radius */
.card.fidim-product-cards p:last-child,
.card.fidim-material-cards p:last-child,
.card.fidim-finish-cards p:last-child,
.card.fidim-thickness-cards p:last-child,
.card.fidim-mounting-cards p:last-child,
.card.fidim-mounting-prep-cards p:last-child,
.card.fidim-delivery-cards p:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Upload Step Styles */ 
/* Upload header container for label and help link */
.upload-header-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  width: 300px !important;
  height: 254px !important;
  flex-shrink: 0 !important;
  padding: 10px 15px !important;
}

/* Upload step label - ensure it matches other wizard step labels */
.upload-header-container label {
  writing-mode: horizontal-tb !important;
  text-orientation: initial !important; 
  transform: none !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  font-weight: bold !important;
  color: #333 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 24px !important;
  margin-bottom: 4px !important;
  word-wrap: break-word !important;
  line-height: 1.2 !important;
  text-align: right !important;
}

/* Upload help link styling */
.upload-help-link {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  margin-top: 0 !important;
  margin-bottom: 0;
  color: #006278;
  font-size: 14px;
  text-decoration: underline;
  font-family: 'Outfit', sans-serif;
  transition: color 0.2s ease;
  writing-mode: initial !important;
  text-orientation: initial !important;
  transform: none !important;
  flex-shrink: initial !important;
  justify-content: initial !important;
  align-items: initial !important;
  padding: 0 !important;
  word-wrap: normal !important;
  line-height: normal !important;
  white-space: nowrap;
  align-self: flex-end !important;
}

.upload-help-link:hover {
  color: #008EAB;
  text-decoration: underline;
}

/* === Loader overlay for configurator === */
#fidim-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: all;
}

#fidim-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Grey out configurator while loading */
body.fidim-loading .wizard-step {
  filter: grayscale(100%) opacity(0.5);
  pointer-events: none;
}

/* Loader animation (provided) */
.loader {
  width: 48px;
  height: 48px;
  margin: auto;
  position: relative;
}

.loader:before {
  content: '';
  width: 48px;
  height: 5px;
  background: #00627850;
  position: absolute;
  top: 60px;
  left: 0;
  border-radius: 50%;
  animation: shadow324 0.5s linear infinite;
}

.loader:after {
  content: '';
  width: 100%;
  height: 100%;
  background: #006278;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
  animation: jump7456 0.5s linear infinite;
}

@keyframes jump7456 {
  15% { border-bottom-right-radius: 3px; }
  25% { transform: translateY(9px) rotate(22.5deg); }
  50% { transform: translateY(18px) scale(1, .9) rotate(45deg); border-bottom-right-radius: 40px; }
  75% { transform: translateY(9px) rotate(67.5deg); }
  100% { transform: translateY(0) rotate(90deg); }
}

@keyframes shadow324 {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.2, 1); }
}

