/* Pakkepost booking facelift v2.4 - safe visual layer
   Built on top of existing booking.css and existing booking logic. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.productdetails-view,
.productdetails-view *:not(i):not([class*="icon"]):not([class*="fa"]) {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  box-sizing: border-box;
}

.productdetails-view {
  color: #101828;
  max-width: 1220px;
  margin: 0 auto;
  padding: 8px 20px 56px;
}

.productdetails-view .back-to-category { margin: 0 0 8px; }
.productdetails-view .back-to-category a {
  color: #e52329 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.productdetails-view > h1 {
  color: #101828 !important;
  font-size: 34px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  margin: 8px 0 10px !important;
}

.productdetails-view .product-short-description {
  color: #667085 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  max-width: 760px;
  margin: 0 0 14px !important;
}
.productdetails-view .product-short-description b,
.productdetails-view .product-short-description strong { color: #344054 !important; font-weight: 700 !important; }
.productdetails-view .product-short-description a { color: #e52329 !important; font-weight: 600 !important; }

/* Safe stepper injected by template, outside short description */
.pp-booking-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 18px 0 28px;
  padding: 0;
}
.pp-booking-step {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}
.pp-booking-step .pp-step-no {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e52329;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 4px #fdecec;
}
.pp-booking-step small {
  display: block;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 500;
  margin-top: 1px;
}

/* Main booking layout */
.productdetails-view .vm-product-container {
  display: grid !important;
  grid-template-columns: 285px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 28px !important;
  width: 100% !important;
  margin: 0 !important;
}
.productdetails-view .vm-product-media-container,
.productdetails-view .vm-product-details-container {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
}
.productdetails-view .vm-product-media-container {
  position: sticky;
  top: 18px;
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04);
}
.productdetails-view .vm-product-media-container .main-image,
.productdetails-view .vm-product-media-container img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px;
}
.productdetails-view .vm-product-details-container .spacer-buy-area { padding: 0 !important; }

/* Form cards */
#productform.pp-booking form > div:first-child,
#productform.pp-booking fieldset.pakkeform,
#productform.pp-booking .pp-checkout {
  background: #fff !important;
  border: 1px solid #eaecf0 !important;
  border-radius: 16px !important;
  padding: 22px !important;
  margin: 0 0 16px !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04) !important;
  width: 100% !important;
  max-width: none !important;
}
#productform.pp-booking fieldset.pakkeform { min-width: 0 !important; }

/* Reverse order */
#productform.pp-booking .reverse_order_wrap {
  position: static !important;
  float: none !important;
  clear: both !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
  margin: 0 0 12px !important;
}
#productform.pp-booking .reverse_order_wrap label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f9fafb !important;
  border: 1px solid #eaecf0 !important;
  border-radius: 999px !important;
  padding: 8px 14px !important;
  color: #344054 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
#productform.pp-booking .reverse_order_wrap span { padding-left: 0 !important; }

/* Section headings */
#productform.pp-booking legend.sender_receiver_title {
  display: block !important;
  width: 100% !important;
  color: #101828 !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  border: 0 !important;
  padding: 0 0 14px !important;
  margin: 0 0 14px !important;
  border-bottom: 1px solid #f2f4f7 !important;
}

/* Sender summary and registration */
#productform.pp-booking form > div:first-child > b,
#productform.pp-booking form > div:first-child > br + b { color: #344054 !important; }
#productform.pp-booking #registration {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
#productform.pp-booking #s5_regresponse:empty { display: none !important; }

/* Inputs */
#productform.pp-booking label,
#productform.pp-booking .s5_reglabel {
  color: #344054 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
}
#productform.pp-booking input[type="text"],
#productform.pp-booking input[type="email"],
#productform.pp-booking input[type="tel"],
#productform.pp-booking input[type="number"],
#productform.pp-booking select,
#productform.pp-booking textarea {
  border: 1px solid #d0d5dd !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #101828 !important;
  box-shadow: none !important;
  min-height: 42px !important;
  padding: 9px 12px !important;
  font-size: 14px !important;
}
#productform.pp-booking input:focus,
#productform.pp-booking select:focus,
#productform.pp-booking textarea:focus {
  outline: 0 !important;
  border-color: #e52329 !important;
  box-shadow: 0 0 0 3px rgba(229,35,41,.12) !important;
}
#productform.pp-booking input[type="checkbox"],
#productform.pp-booking input[type="radio"] { accent-color: #e52329; }
#productform.pp-booking .xdsoft_autocomplete input { background: #f9fafb !important; }

/* Package selector */
#productform.pp-booking .pp-select-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 150px !important;
  gap: 12px !important;
  align-items: end !important;
  background: #f9fafb !important;
  border: 1px solid #eaecf0 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin: 12px 0 !important;
}
#productform.pp-booking .pp-select-row > div { width: auto !important; float: none !important; }
#productform.pp-booking .pp-select-row select {
  width: 100% !important;
  margin: 0 !important;
}

/* Additional services */
#productform.pp-booking .additionalProducts-0 {
  width: 100% !important;
  float: none !important;
  clear: both !important;
  margin-top: 14px !important;
}
#productform.pp-booking .additionalProducts-0 .wrap {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}
#productform.pp-booking .additionalProducts-0 .left_half,
#productform.pp-booking .additionalProducts-0 .right_half {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 14px !important;
  background: #f9fafb !important;
  border: 1px solid #eaecf0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
#productform.pp-booking .additionalProducts-0 details {
  background: #fff !important;
  border: 1px solid #eaecf0 !important;
  border-radius: 10px !important;
  color: #475467 !important;
}

/* Price */
#productform.pp-booking .totalt {
  display: flex;
  justify-content: flex-end;
  clear: both;
  margin: 14px 0 0 !important;
}
#productform.pp-booking .totalt h2 {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  color: #667085 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}
#productform.pp-booking .totalt h2 p,
#productform.pp-booking .fraktpris-0 {
  color: #101828 !important;
  font-size: 23px !important;
  font-weight: 800 !important;
  margin: 0 !important;
}
#productform.pp-booking .branch_selector .error {
  color: #b42318 !important;
  background: #fef3f2 !important;
  border: 1px solid #fecdca !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
}

/* Add/remove shipment */
#productform.pp-booking .pp-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 0 0 16px !important;
}
#productform.pp-booking .pp-actions input[type="button"],
#productform.pp-booking .pp-actions .pp-btn {
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  background: #fff !important;
  color: #344054 !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
  text-transform: none !important;
  text-decoration: none !important;
}
#productform.pp-booking .pp-actions input[type="button"]:hover,
#productform.pp-booking .pp-actions .pp-btn:hover { background: #f9fafb !important; }

/* Checkout */
#productform.pp-booking .pp-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 18px !important;
  align-items: end !important;
}
#productform.pp-booking .pp-checkout > div:first-child {
  background: transparent !important;
  color: #101828 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
#productform.pp-booking #totalTotal,
#productform.pp-booking #totalTotal * { color: #101828 !important; }
#productform.pp-booking .totaltxt { font-size: 15px !important; font-weight: 700 !important; }
#productform.pp-booking #totalTotalNum { font-size: 24px !important; font-weight: 800 !important; }
#productform.pp-booking #enviar {
  width: 100% !important;
  min-height: 50px !important;
  background: #e52329 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  box-shadow: none !important;
  text-transform: none !important;
}
#productform.pp-booking #enviar:hover { background: #c81d22 !important; }
#productform.pp-booking .pp-terms { align-self: center !important; }
#productform.pp-booking .pp-terms,
#productform.pp-booking .pp-terms a {
  color: #344054 !important;
  font-size: 13px !important;
}
#productform.pp-booking .pp-terms a { color: #e52329 !important; font-weight: 650 !important; }

/* Description below booking */
.productdetails-view .product-description {
  margin-top: 34px !important;
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  padding: 22px;
}
.productdetails-view .product-description .title,
.productdetails-view .product-description h2,
.productdetails-view .product-description h3 {
  color: #101828 !important;
  font-weight: 750 !important;
}

/* Hide legacy visual noise only */
#productform.pp-booking .totalt .fa-times { display: none !important; }

@media (max-width: 980px) {
  .productdetails-view .vm-product-container { grid-template-columns: 220px minmax(0,1fr) !important; gap: 20px !important; }
  #productform.pp-booking .pp-checkout { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  .productdetails-view { padding-left: 12px; padding-right: 12px; }
  .productdetails-view > h1 { font-size: 28px !important; }
  .productdetails-view .vm-product-container { grid-template-columns: 1fr !important; }
  .productdetails-view .vm-product-media-container { position: static; }
  .pp-booking-steps { gap: 12px; }
  #productform.pp-booking .pp-select-row,
  #productform.pp-booking .additionalProducts-0 .wrap { grid-template-columns: 1fr !important; }
}

/* ===== v2.5 layout bugfixes ===== */

/* Make sender/receiver headings deterministic and remove legacy pseudo/icon collisions */
#productform.pp-booking legend.sender_receiver_title {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 32px !important;
  overflow: visible !important;
}
#productform.pp-booking legend.sender_receiver_title::before {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #e52329 !important;
  color: #fff !important;
  font: 800 13px/28px Inter, "Segoe UI", Arial, sans-serif !important;
  box-shadow: none !important;
  transform: none !important;
}
#productform.pp-booking legend.sender_receiver_title.is_sender::before { content: "1" !important; }
#productform.pp-booking legend.sender_receiver_title.is_receiver::before { content: "2" !important; }
#productform.pp-booking legend.sender_receiver_title::after { display: none !important; content: none !important; }

/* Normalise all regular booking fields so legacy line-height/position rules cannot clip text */
#productform.pp-booking input[type="text"],
#productform.pp-booking input[type="email"],
#productform.pp-booking input[type="tel"],
#productform.pp-booking input[type="number"],
#productform.pp-booking select {
  height: 44px !important;
  min-height: 44px !important;
  line-height: normal !important;
  vertical-align: middle !important;
}

/* Package size + number of parcels: remove old inline margins and keep both controls aligned */
#productform.pp-booking .pp-select-row {
  grid-template-columns: minmax(0, 1fr) 170px !important;
  align-items: center !important;
  padding: 12px !important;
}
#productform.pp-booking .pp-select-row > div {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#productform.pp-booking .pp-select-row select,
#productform.pp-booking .pp-select-row #product_selector-0,
#productform.pp-booking .pp-select-row #kolli-0 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
}

/* Pickup-point selector / price block */
#productform.pp-booking .branch_selector {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 10px !important;
  box-sizing: border-box !important;
}
#productform.pp-booking .branch_selector input,
#productform.pp-booking .branch_selector select {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
#productform.pp-booking .totalt {
  min-height: 34px !important;
  align-items: center !important;
}

/* Checkout/pickup area: stop legacy floats and prevent date/time fields from being clipped */
#productform.pp-booking .pp-checkout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  align-items: start !important;
}
#productform.pp-booking .pp-terms,
#productform.pp-booking .pp-terms .cwrap,
#productform.pp-booking .pp-terms .courier_wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box !important;
}
#productform.pp-booking .pp-terms .cwrap {
  margin: 0 0 12px !important;
}
#productform.pp-booking .pp-terms .courier_wrap {
  margin: 0 !important;
}
#productform.pp-booking .courier_wrap input,
#productform.pp-booking .courier_wrap select,
#productform.pp-booking .courier_wrap textarea {
  max-width: 100% !important;
  box-sizing: border-box !important;
  line-height: normal !important;
}
#productform.pp-booking .courier_wrap input[type="text"],
#productform.pp-booking .courier_wrap input[type="date"],
#productform.pp-booking .courier_wrap input[type="time"],
#productform.pp-booking .courier_wrap select {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 12px !important;
}

/* Sender/receiver fields: avoid old fixed widths causing misalignment */
#productform.pp-booking #registration input,
#productform.pp-booking #registration select,
#productform.pp-booking fieldset.pakkeform input,
#productform.pp-booking fieldset.pakkeform select {
  box-sizing: border-box !important;
}

@media (max-width: 980px) {
  #productform.pp-booking .pp-checkout { grid-template-columns: 1fr !important; }
}
