/* lot4b-ui-forms.css: consolidated from lot4b-ui20a-offer-form.css, lot4b-ui20b-advice.css (same order). Duplicate and overridden declarations removed. */

/* ---- from lot4b-ui20a-offer-form.css ---- */
/* UI20A - OFFER FORM VISUAL POLISH */
/* Only the new/edit offer form. Buying-need form excluded. */
/* Page canvas and main layout */
html body #main section.trade-entry.entry-offer {
  background: #F8FAFC !important;
  color: #0A1F44 !important;
}
html body #main
section.trade-entry.entry-offer .entry-body {
  width: calc(100% - 36px) !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 18px 0 28px !important;
  gap: 18px !important;
  grid-template-columns: minmax(0,1fr) 280px !important;
  align-items: start !important;
  box-sizing: border-box !important;
}
/* Compact hero */
html body #main
section.trade-entry.entry-offer .trade-form-hero {
  min-height: 90px !important;
  padding: 17px max(22px,4vw) !important;
  background:
        linear-gradient(
            90deg,
            rgba(248,250,252,.96),
            rgba(248,250,252,.84)
        ),
        url('/assets/lot4b-trade-warehouse.webp')
        center / cover !important;
  border-bottom: 1px solid rgba(10,31,68,.08) !important;
  box-shadow: none !important;
}
html body #main
section.trade-entry.entry-offer .trade-form-hero h1 {
  color: #0A1F44 !important;
  font-size: clamp(25px,2.7vw,34px) !important;
  line-height: 1.4 !important;
  font-weight: 800 !important;
}
html body #main
section.trade-entry.entry-offer .entry-hero-icon {
  display: grid !important;
  place-items: center !important;
  width: 53px !important;
  height: 53px !important;
  border-radius: 12px !important;
  background: #EFF6FF !important;
  border: 1px solid rgba(37,99,235,.18) !important;
  color: #2563EB !important;
  box-shadow: none !important;
}
html body #main
section.trade-entry.entry-offer .entry-hero-icon .icon {
  width: 27px !important;
  height: 27px !important;
}
/* Form container */
html body #main
section.trade-entry.entry-offer .trade-form-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(10,31,68,.12) !important;
  border-radius: 15px !important;
  box-shadow: 0 3px 14px rgba(10,31,68,.035) !important;
  min-width: 0 !important;
}
/* Four-section navigation */
html body #main
section.trade-entry.entry-offer .entry-steps {
  padding: 18px 16px 15px !important;
  gap: 8px !important;
  background: #F8FAFC !important;
  border-bottom: 1px solid rgba(10,31,68,.09) !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps button {
  min-width: 0 !important;
  min-height: 55px !important;
  gap: 8px !important;
  color: #475569 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps span {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #E2E8F0 !important;
  color: #0A1F44 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps
button.is-active {
  color: #2563EB !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps
button.is-active span {
  background: #2563EB !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,.11) !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps button:after {
  background: #E2E8F0 !important;
}
html body #main
section.trade-entry.entry-offer .entry-steps button:focus-visible {
  outline: 2px solid #2563EB !important;
  outline-offset: 3px !important;
  border-radius: 8px !important;
}
/* Form sections */
html body #main
section.trade-entry.entry-offer .entry-section {
  margin: 0 16px !important;
  padding: 18px 4px !important;
  border-bottom: 1px solid rgba(10,31,68,.08) !important;
  min-width: 0 !important;
}
html body #main
section.trade-entry.entry-offer .entry-section header h2 {
  margin: 0 0 13px !important;
  font-size: 16px !important;
  color: #0A1F44 !important;
  font-weight: 800 !important;
}
html body #main
section.trade-entry.entry-offer .entry-fields {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 15px 13px !important;
  align-items: start !important;
}
/* Field labels */
html body #main
section.trade-entry.entry-offer
.entry-fields > label,
html body #main
section.trade-entry.entry-offer .entry-stack > label {
  min-width: 0 !important;
  gap: 6px !important;
  color: #0A1F44 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
}
/* Inputs and selects */
html body #main
section.trade-entry.entry-offer
.entry-fields :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea
) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  padding: 10px 12px !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  color: #0A1F44 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  box-sizing: border-box !important;
}
html body #main
section.trade-entry.entry-offer
.entry-fields :is(input,select,textarea):focus {
  border-color: #93C5FD !important;
  outline: 2px solid rgba(37,99,235,.20) !important;
  outline-offset: 1px !important;
  box-shadow: none !important;
}
/* Product and raw-material type selector */
html body #main
section.trade-entry.entry-offer .trade-type-section {
  gap: 10px !important;
  padding-bottom: 12px !important;
}
html body #main
section.trade-entry.entry-offer .material-type-button {
  min-height: 40px !important;
  padding: 8px 15px !important;
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 999px !important;
  color: #0A1F44 !important;
  font-size: 12px !important;
  box-shadow: none !important;
}
html body #main
section.trade-entry.entry-offer
.material-type-button.is-active {
  color: #1D4ED8 !important;
  background: #EFF6FF !important;
  border-color: #93C5FD !important;
}
/* Quantity, price, partial sale */
html body #main
section.trade-entry.entry-offer
[data-entry-field="allowPartialSale"] {
  min-height: 45px !important;
}
html body #main
section.trade-entry.entry-offer .entry-partial-options {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px 20px !important;
  align-items: center !important;
  min-height: 44px !important;
}
html body #main
section.trade-entry.entry-offer
.entry-partial-options input[type="radio"] {
  accent-color: #2563EB !important;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
}
/* Third section: customs and description */
@media (min-width: 1001px) {
  html body #main
    section.trade-entry.entry-offer
    [data-entry-section="2"] .entry-fields
    > [data-entry-field="customsStatus"] {
    grid-column: span 1 !important;
    grid-row: auto !important;
  }
  html body #main
    section.trade-entry.entry-offer
    [data-entry-section="2"] .entry-fields
    > [data-entry-field="description"] {
    grid-column: span 2 !important;
    grid-row: auto !important;
  }
}
html body #main
section.trade-entry.entry-offer
[data-entry-field="description"] textarea {
  resize: vertical !important;
}
/* Photo area: avoid empty columns when only one slot is visible */
html body #main
section.trade-entry.entry-offer .entry-photos {
  min-width: 0 !important;
  margin-top: 15px !important;
}
html body #main
section.trade-entry.entry-offer .entry-photos h3 {
  color: #0A1F44 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  margin: 0 0 9px !important;
}
html body #main
section.trade-entry.entry-offer .entry-photo-slots {
  display: grid !important;
  grid-template-columns:
        repeat(auto-fit,minmax(min(200px,100%),1fr)) !important;
  gap: 11px !important;
  width: 100% !important;
  min-width: 0 !important;
}
/* Never expose slots intentionally hidden by existing JS */
html body #main
section.trade-entry.entry-offer
.entry-photo-slots > .entry-photo-slot[hidden] {
  display: none !important;
}
html body #main
section.trade-entry.entry-offer
.entry-photo-slot:not([hidden]) {
  min-width: 0 !important;
  min-height: 137px !important;
  padding: 35px 12px 15px !important;
  background: #F8FAFC !important;
  border: 1px dashed #BFDBFE !important;
  border-radius: 12px !important;
  color: #0A1F44 !important;
  box-shadow: none !important;
  transition:
        border-color 180ms ease,
        background-color 180ms ease !important;
}
html body #main
section.trade-entry.entry-offer
.entry-photo-slot:not([hidden]):hover,
html body #main
section.trade-entry.entry-offer
.entry-photo-slot.is-dragging {
  background: #EFF6FF !important;
  border-color: #2563EB !important;
}
html body #main
section.trade-entry.entry-offer
.entry-photo-slot:focus-within {
  outline: 2px solid rgba(37,99,235,.55) !important;
  outline-offset: 2px !important;
}
html body #main
section.trade-entry.entry-offer .entry-photo-slot .icon {
  width: 29px !important;
  height: 29px !important;
  color: #2563EB !important;
}
html body #main
section.trade-entry.entry-offer .entry-photo-slot b {
  font-size: 12px !important;
  color: #0A1F44 !important;
}
html body #main
section.trade-entry.entry-offer .entry-photo-slot img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
/* Additional options */
html body #main
section.trade-entry.entry-offer .entry-extras {
  margin-top: 15px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(10,31,68,.08) !important;
  font-size: 12px !important;
  color: #475569 !important;
}
html body #main
section.trade-entry.entry-offer .entry-extras summary {
  padding: 6px 0 !important;
  cursor: pointer !important;
  color: #0A1F44 !important;
  font-weight: 600 !important;
}
/* Advice sidebar without fixed blank height */
html body #main
section.trade-entry.entry-offer .entry-advice {
  min-height: 0 !important;
  height: auto !important;
  padding: 17px !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(10,31,68,.12) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 14px rgba(10,31,68,.035) !important;
}
html body #main
section.trade-entry.entry-offer .entry-advice header {
  padding: 0 0 12px !important;
}
html body #main
section.trade-entry.entry-offer .entry-advice h2 {
  font-size: 17px !important;
  color: #0A1F44 !important;
}
html body #main
section.trade-entry.entry-offer .entry-advice article {
  margin: 0 !important;
  padding: 13px 0 !important;
  gap: 9px !important;
}
html body #main
section.trade-entry.entry-offer .entry-advice h3 {
  margin: 0 0 3px !important;
  font-size: 12.5px !important;
  color: #0A1F44 !important;
}
html body #main
section.trade-entry.entry-offer .entry-advice p {
  font-size: 11.5px !important;
  line-height: 1.7 !important;
  color: #475569 !important;
}
/* Publish and draft buttons */
html body #main
section.trade-entry.entry-offer .entry-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
html body #main
section.trade-entry.entry-offer
.entry-actions .btn {
  min-height: 46px !important;
  padding: 10px 21px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
html body #main
section.trade-entry.entry-offer
.entry-actions button[type="submit"] {
  color: #FFFFFF !important;
  background: #0A1F44 !important;
  border: 1px solid #0A1F44 !important;
}
html body #main
section.trade-entry.entry-offer
.entry-actions .entry-draft {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #0A1F44 !important;
}
/* Tablet */
@media (max-width: 1000px) {
  html body #main
    section.trade-entry.entry-offer .entry-body {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 14px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-fields {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  html body #main
    section.trade-entry.entry-offer
    [data-entry-field="description"] {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-advice {
    min-height: 0 !important;
    height: auto !important;
  }
}
/* Mobile */
@media (max-width: 760px) {
  html body #main
    section.trade-entry.entry-offer .entry-body {
    display: flex !important;
    flex-direction: column !important;
    width: calc(100% - 24px) !important;
    padding: 12px 0 24px !important;
  }
  html body #main
    section.trade-entry.entry-offer .trade-form-hero {
    min-height: 74px !important;
    padding: 13px !important;
  }
  html body #main
    section.trade-entry.entry-offer .trade-form-hero h1 {
    font-size: 22px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-steps {
    padding: 12px 5px !important;
    gap: 3px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-steps button {
    font-size: 10px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-steps span {
    width: 29px !important;
    height: 29px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-section {
    margin: 0 10px !important;
    padding: 14px 3px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-fields
    :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        select,textarea) {
    font-size: 16px !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-advice {
    order: 2 !important;
  }
}
@media (max-width: 430px) {
  html body #main
    section.trade-entry.entry-offer .entry-fields {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html body #main
    section.trade-entry.entry-offer
    [data-entry-field="description"] {
    grid-column: 1 / -1 !important;
  }
  html body #main
    section.trade-entry.entry-offer .entry-photo-slots {
    grid-template-columns:
            repeat(auto-fit,minmax(min(145px,100%),1fr)) !important;
  }
  html body #main
    section.trade-entry.entry-offer
    .entry-actions > .btn {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}
/* Keep all form controls usable with the keyboard */
html body #main
section.trade-entry.entry-offer
:is(button,input,select,textarea,summary):focus-visible {
  outline: 2px solid #2563EB !important;
  outline-offset: 2px !important;
}
@media (prefers-reduced-motion: reduce) {
  html body #main
    section.trade-entry.entry-offer
    :is(.entry-photo-slot,.entry-actions .btn) {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}
/* Final consolidated offer publish button colours (UI20D). */
/* UI20D - TARGETED OFFER PUBLISH BUTTON */
/* Loaded last in the document to override generic .entry-actions .btn styles. */
html body #main section.trade-entry.entry-offer .entry-actions > button.btn[type="submit"],
html body #main section.trade-entry.entry-offer .entry-actions button[type="submit"],
html body #main .trade-form-page section.trade-entry.entry-offer .entry-actions button[type="submit"] {
  background: #0A1F44 !important;
  background-color: #0A1F44 !important;
  background-image: none !important;
  border-color: #0A1F44 !important;
  color: #FFFFFF !important;
}
html body #main section.trade-entry.entry-offer .entry-actions button[type="submit"]:hover {
  background: #0A1F44 !important;
  background-color: #0A1F44 !important;
  border-color: #0A1F44 !important;
  color: #FFFFFF !important;
}
html body #main section.trade-entry.entry-offer .entry-actions button[type="submit"]:focus-visible {
  outline: 2px solid #2563EB !important;
  outline-offset: 3px !important;
}

/* ---- from lot4b-ui20b-advice.css ---- */
/* UI20B - OFFER ADVICE SIDEBAR FIX */
/* Scoped to offer-entry advice only; no buying-need or business logic changes. */
html body #main#main section.trade-entry.entry-offer .entry-advice {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 16px !important;
  overflow: visible !important;
  align-self: start !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 0 0 14px !important;
  margin: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice header > .icon {
  width: 36px !important;
  height: 36px !important;
  box-sizing: border-box !important;
  flex: 0 0 36px !important;
  padding: 8px !important;
  margin: 0 !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice h2 {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  font-size: 17px !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice article {
  display: grid !important;
  grid-template-columns: 32px minmax(0,1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 12px 0 0 !important;
  padding: 13px 11px !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  background: #F8FAFC !important;
  box-shadow: none !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice article > .icon {
  display: block !important;
  box-sizing: border-box !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 7px !important;
  margin: 0 !important;
  border: 1px solid #BFDBFE !important;
  border-radius: 50% !important;
  background: #EFF6FF !important;
  color: #2563EB !important;
  float: none !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice article > div {
  min-width: 0 !important;
  width: auto !important;
  overflow-wrap: break-word !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice article h3 {
  margin: 0 0 5px !important;
  color: #0A1F44 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
  white-space: normal !important;
}
html body #main#main section.trade-entry.entry-offer .entry-advice article p {
  margin: 0 !important;
  color: #475569 !important;
  font-size: 12px !important;
  line-height: 1.8 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: start !important;
}
@media (max-width: 1000px) {
  html body #main#main section.trade-entry.entry-offer .entry-advice {
    width: 100% !important;
    max-width: 100% !important;
  }
  html body #main#main section.trade-entry.entry-offer .entry-advice article {
    grid-template-columns: 36px minmax(0,1fr) !important;
    gap: 12px !important;
  }
}
@media (max-width: 760px) {
  html body #main#main section.trade-entry.entry-offer .entry-advice {
    margin-bottom: 86px !important;
    /* space to scroll last tip above floating chat */
  }
  html body #main#main section.trade-entry.entry-offer .entry-advice header {
    flex-wrap: nowrap !important;
  }
  html body #main#main section.trade-entry.entry-offer .entry-advice h2 {
    font-size: 16px !important;
  }
  html body #main#main section.trade-entry.entry-offer .entry-advice .entry-advice-toggle {
    flex: 0 0 auto !important;
    margin-inline-start: auto !important;
  }
  /* Preserve existing mobile collapse/expand behavior. */
  html body #main#main section.trade-entry.entry-offer .entry-advice:not(.is-open) > article {
    display: none !important;
  }
}
@media (max-width: 390px) {
  html body #main#main section.trade-entry.entry-offer .entry-advice {
    padding: 12px !important;
  }
  html body #main#main section.trade-entry.entry-offer .entry-advice article {
    padding: 11px 9px !important;
    gap: 9px !important;
  }
}
