/* workflow-light.css — DS.13.23: spojene light zakrpe ds06e, ds06f, ds06g, ds06h (isti redosled) */
/* ===== DS.13.23: iz wms-workflow-ds06e.css ===== */
/*
 CORRECTO_WMS_DS06E
 Workflow Light Contrast Fix
 Scoped to Workflow in Light mode.
 No changes to Dark mode or business logic.
*/

html[data-theme="light"] body:has(#detail) {
  --ds06e-text: var(--wms-ui-heading, #101828);
  --ds06e-muted: var(--wms-ui-muted, #52637a);
  --ds06e-surface: var(--wms-ui-surface, #fff);
  --ds06e-surface-2: var(--wms-ui-surface-2, #f7f9fd);
  --ds06e-border: var(--wms-ui-border, #cbd7e5);
}

/* Existing dark buttons on light information cards */

html[data-theme="light"] body:has(#detail)
.info-cell button:not(:disabled),
html[data-theme="light"] body:has(#detail)
.delivery-address-edit-btn,
html[data-theme="light"] body:has(#detail)
button[data-action*="edit"]:not(.action) {
  background: #edf4ff !important;
  color: #174a94 !important;
  -webkit-text-fill-color: #174a94 !important;
  border: 1px solid #b9cce8 !important;
}

html[data-theme="light"] body:has(#detail)
.info-cell button:not(:disabled):hover,
html[data-theme="light"] body:has(#detail)
.delivery-address-edit-btn:hover {
  background: #dcecff !important;
  border-color: #6699dc !important;
}

/* Picking / packing / AKS timeline */

html[data-theme="light"] body:has(#detail)
.simple-step,
html[data-theme="light"] body:has(#detail)
.command-step {
  color: #52637a;
}

html[data-theme="light"] body:has(#detail)
.simple-step span,
html[data-theme="light"] body:has(#detail)
.command-step span {
  background: var(--ds06e-surface);
  color: #52637a;
  -webkit-text-fill-color: #52637a;
}

html[data-theme="light"] body:has(#detail)
.simple-step i,
html[data-theme="light"] body:has(#detail)
.command-step i {
  background: #e9eff8;
  color: #334155;
  -webkit-text-fill-color: #334155;
  border-color: #c4d1e4;
}

html[data-theme="light"] body:has(#detail)
.simple-step.active span,
html[data-theme="light"] body:has(#detail)
.command-step.active span {
  color: #174ea6;
  -webkit-text-fill-color: #174ea6;
}

html[data-theme="light"] body:has(#detail)
.simple-step.done span,
html[data-theme="light"] body:has(#detail)
.command-step.done span {
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

html[data-theme="light"] body:has(#detail)
.simple-step.active i,
html[data-theme="light"] body:has(#detail)
.command-step.active i {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

html[data-theme="light"] body:has(#detail)
.simple-step.done i,
html[data-theme="light"] body:has(#detail)
.command-step.done i {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
}

html[data-theme="light"] body:has(#detail)
.simple-step:not(:last-child)::after,
html[data-theme="light"] body:has(#detail)
.command-step:not(:last-child)::after {
  background: #b8c8df;
}

/* Product row - switch dark base to light surface */

html[data-theme="light"] body:has(#detail)
.product-row-simple {
  background: var(--ds06e-surface);
  border-color: var(--ds06e-border);
  color: var(--ds06e-text);
}

html[data-theme="light"] body:has(#detail)
.product-row-simple .product-title-line b,
html[data-theme="light"] body:has(#detail)
.product-row-simple .product-name,
html[data-theme="light"] body:has(#detail)
.product-row-simple .product-facts strong {
  color: var(--ds06e-text);
  -webkit-text-fill-color: var(--ds06e-text);
}

html[data-theme="light"] body:has(#detail)
.product-row-simple .product-facts,
html[data-theme="light"] body:has(#detail)
.product-row-simple .product-meta {
  color: var(--ds06e-muted);
}

html[data-theme="light"] body:has(#detail)
.product-row-simple .product-sku {
  color: #245db8;
  -webkit-text-fill-color: #245db8;
}

/* Quantity target stays blue, text becomes readable */

html[data-theme="light"] body:has(#detail)
.product-pick-target {background:#edf4ff;border-color:#b7cbea;color:#173f78}

html[data-theme="light"] body:has(#detail)
.product-pick-target b,
html[data-theme="light"] body:has(#detail)
.product-pick-target strong {color:#173f78 !important;-webkit-text-fill-color:#173f78}

html[data-theme="light"] body:has(#detail)
.product-pick-target small,
html[data-theme="light"] body:has(#detail)
.product-pick-target span {color:#315d95 !important;-webkit-text-fill-color:#315d95}

/* Smart picking route */

html[data-theme="light"] body:has(#detail)
.smart-route-card {
  background: var(--ds06e-surface);
  border-color: var(--ds06e-border);
  color: var(--ds06e-text);
}

html[data-theme="light"] body:has(#detail)
.smart-route-card h3,
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-score b {
  color: var(--ds06e-text);
  -webkit-text-fill-color: var(--ds06e-text);
}

html[data-theme="light"] body:has(#detail)
.smart-route-card p,
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-score span {
  color: var(--ds06e-muted);
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-score {
  background: #edf4ff;
  border-color: #b9cce8;
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .eyebrow {
  color: #1d4ed8;
}

/* Keep dark route chips but force readable foreground */

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-stop {
  background: #eaf2ff !important;
  border-color: #a8c7f0 !important;
  color: #174a94 !important;
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-stop b,
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-stop strong,
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-stop span {
  color: #174a94 !important;
  -webkit-text-fill-color: #174a94 !important;
}

/* Visible keyboard focus */

html[data-theme="light"] body:has(#detail)
button:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

/* ===== DS.13.23: iz wms-workflow-ds06f.css ===== */
/*
 CORRECTO_WMS_DS06F
 Workflow light-only modal and route corrections.
 No dark theme rules. No JavaScript changes.
*/

/* MODAL SURFACE */
html[data-theme="light"] .delivery-address-dialog {
    color-scheme: light !important;
    background: #ffffff !important;
    color: #101828 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 24px 70px rgba(15,23,42,.22) !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-address-form {
    background: #ffffff !important;
    color: #101828 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head {
    background: transparent !important;
    color: #101828 !important;
    border-color: #dbe3ee !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head h2 {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head p {
    color: #52637a !important;
    -webkit-text-fill-color: #52637a !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-close {
    background: #f1f5f9 !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

/* FIELD LABELS AND INPUTS */
html[data-theme="light"] .delivery-address-dialog
.delivery-address-fields label,
html[data-theme="light"] .delivery-address-dialog
.delivery-address-form label {
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

html[data-theme="light"] .delivery-address-dialog
input:not([type="checkbox"]),
html[data-theme="light"] .delivery-address-dialog
textarea,
html[data-theme="light"] .delivery-address-dialog
select {
    background: #ffffff !important;
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
    border: 1px solid #bdcce0 !important;
    color-scheme: light !important;
}

html[data-theme="light"] .delivery-address-dialog
input::placeholder,
html[data-theme="light"] .delivery-address-dialog
textarea::placeholder {
    color: #718096 !important;
    -webkit-text-fill-color: #718096 !important;
}

html[data-theme="light"] .delivery-address-dialog
input:focus,
html[data-theme="light"] .delivery-address-dialog
textarea:focus,
html[data-theme="light"] .delivery-address-dialog
select:focus {
    border-color: #2563eb !important;
    outline: 2px solid rgba(37,99,235,.17) !important;
    outline-offset: 0;
}

/* ORIGINAL BIZNISOFT VALUE */
html[data-theme="light"] .delivery-address-dialog
:is(.delivery-address-original,
    .delivery-original-card,
    .delivery-original,
    .delivery-source-card,
    .delivery-phone-original,
    .delivery-cod-original) {
    background: #f5f8fc !important;
    color: #101828 !important;
    border-color: #d1dceb !important;
}

html[data-theme="light"] .delivery-address-dialog
:is(.delivery-address-original,
    .delivery-original-card,
    .delivery-original,
    .delivery-source-card,
    .delivery-phone-original,
    .delivery-cod-original) b,
html[data-theme="light"] .delivery-address-dialog
:is(.delivery-address-original,
    .delivery-original-card,
    .delivery-original,
    .delivery-source-card,
    .delivery-phone-original,
    .delivery-cod-original) strong {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-address-source {
    color: #52637a !important;
}

/* FOOTER / ACTION BUTTONS */
html[data-theme="light"] .delivery-address-dialog
.delivery-address-footer {
    background: #ffffff !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-save-btn {
    background: #2563eb !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid #2563eb !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-save-btn:hover:not(:disabled) {
    background: #1d4ed8 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-cancel-btn {
    background: #e8eef6 !important;
    color: #24364d !important;
    -webkit-text-fill-color: #24364d !important;
    border: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-cancel-btn:hover {
    background: #d9e5f4 !important;
}

/* KEEP DISABLED STATE CLEAR */
html[data-theme="light"] .delivery-address-dialog
button:disabled {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

/* ACTUAL SMART ROUTE LOCATION CHIPS */
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-chip.route-chip {
    background: #eaf2ff;
    background-image: none;
    color: #173f7b;
    -webkit-text-fill-color: #173f7b;
    border: 1px solid #b3c9e8;
    box-shadow: none;
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-chip b,
html[data-theme="light"] body:has(#detail)
.smart-route-card .route-chip small {
    color: #173f7b !important;
    -webkit-text-fill-color: #173f7b;
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-chip > span {
    background: #2563eb;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

html[data-theme="light"] body:has(#detail)
.smart-route-card .route-arrow {
    color: #54749b !important;
}

/* ===== DS.13.23: iz wms-workflow-ds06g.css ===== */
/* ========================================================================
   DS.06G - WORKFLOW LIGHT MODALS
   Goal:
   - remove 'stuck to edges' feeling in modal header/body
   - unify light modal surface so it does not look like 2 random colors
   - light theme only
   - no dark-theme changes
   ======================================================================== */

html[data-theme="light"]{
  --ds06g-modal-bg: #ffffff;
  --ds06g-modal-soft: #f4f7fc;
  --ds06g-modal-border: #c9d7e8;
  --ds06g-modal-text: #0f172a;
  --ds06g-modal-muted: #5f7087;
  --ds06g-modal-primary: #2f67eb;
}

/* Main dialog surface */
html[data-theme="light"] body:has(#detail) .delivery-address-dialog{
  background: var(--ds06g-modal-bg) !important;
  color: var(--ds06g-modal-text) !important;
  border: 1px solid var(--ds06g-modal-border) !important;
  box-shadow: 0 28px 80px rgba(15,23,42,.18) !important;
}

/* Inner form area */
html[data-theme="light"] body:has(#detail) .delivery-address-form{
  padding: 24px !important;
  background: var(--ds06g-modal-bg) !important;
}

/* Header spacing / visual cleanup */
html[data-theme="light"] body:has(#detail) .delivery-dialog-head{
  margin: 0 0 20px !important;
  padding: 4px 2px 0 !important;
  background: var(--ds06g-modal-bg) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

html[data-theme="light"] body:has(#detail) .delivery-dialog-head > div{
  display: grid !important;
  gap: 10px !important;
}

html[data-theme="light"] body:has(#detail) .delivery-dialog-head small{
  display: block !important;
  margin: 0 !important;
  color: #1d4ed8 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
}

html[data-theme="light"] body:has(#detail) .delivery-dialog-head h2{
  margin: 0 !important;
  color: var(--ds06g-modal-text) !important;
  line-height: 1.12 !important;
}

html[data-theme="light"] body:has(#detail) .delivery-dialog-head p{
  margin: 0 !important;
  max-width: 640px !important;
  color: var(--ds06g-modal-muted) !important;
  line-height: 1.55 !important;
}

/* Close button */
html[data-theme="light"] body:has(#detail) .delivery-dialog-close{
  background: var(--ds06g-modal-soft) !important;
  border: 1px solid var(--ds06g-modal-border) !important;
  color: #334a69 !important;
}

html[data-theme="light"] body:has(#detail) .delivery-dialog-close:hover{
  background: #ebf2fd !important;
  border-color: #9eb8dd !important;
}

/* Better vertical rhythm between sections */
html[data-theme="light"] body:has(#detail) .delivery-address-form > * + *{
  margin-top: 16px !important;
}

/* Labels / inputs */
html[data-theme="light"] body:has(#detail) .delivery-address-form label,
html[data-theme="light"] body:has(#detail) .delivery-address-fields label{
  color: #40536d !important;
}

html[data-theme="light"] body:has(#detail) .delivery-address-form input,
html[data-theme="light"] body:has(#detail) .delivery-address-fields input{
  background: #ffffff !important;
  color: var(--ds06g-modal-text) !important;
  border: 1px solid #b8c9df !important;
}

html[data-theme="light"] body:has(#detail) .delivery-address-form input:focus,
html[data-theme="light"] body:has(#detail) .delivery-address-fields input:focus{
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
}

/* Footer buttons */
html[data-theme="light"] body:has(#detail) .delivery-address-footer{
  margin-top: 20px !important;
  padding-top: 2px !important;
}

html[data-theme="light"] body:has(#detail) .delivery-cancel-btn{
  background: #e9eff7 !important;
  color: #243b5a !important;
}

html[data-theme="light"] body:has(#detail) .delivery-save-btn{
  background: var(--ds06g-modal-primary) !important;
  color: #ffffff !important;
}

/* Responsive */
@media (max-width: 680px){
  html[data-theme="light"] body:has(#detail) .delivery-address-form{
    padding: 18px !important;
  }

  html[data-theme="light"] body:has(#detail) .delivery-dialog-head{
    gap: 12px !important;
  }
}

/* ===== DS.13.23: iz wms-workflow-ds06h.css ===== */
/*
 CORRECTO_WMS_DS06H
 Light theme ONLY.
 Correct modal header geometry.
 No workflow logic changes.
*/

/* Modal: one continuous white surface */
html[data-theme="light"] .delivery-address-dialog {
    background: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
    border: 1px solid #d5dfeb !important;
    border-radius: 20px !important;
    overflow: visible;
}

/* Consistent inner spacing */
html[data-theme="light"] .delivery-address-dialog
.delivery-address-form {
    box-sizing: border-box !important;
    padding: 26px 28px 28px !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Restore header layout, reversing DS06G grid */
html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 0 22px !important;
    padding: 0 58px 0 0 !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* Remove the extra inner rectangular header surface */
html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head > div {
    display: block !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
}

/* Header typography */
html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head small {
    display: block !important;
    margin: 0 0 9px !important;
    color: #1d4ed8 !important;
    -webkit-text-fill-color: #1d4ed8 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.3 !important;
    letter-spacing: .1em !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head h2 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-head p {
    margin: 0 !important;
    padding: 0 !important;
    color: #52647d !important;
    -webkit-text-fill-color: #52647d !important;
    line-height: 1.5 !important;
}

/* X stays at top right in ALL three dialogs */
html[data-theme="light"] .delivery-address-dialog
.delivery-dialog-close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    transform: none !important;
    background: #f1f5fb !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    border: 1px solid #ccdaeb !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    z-index: 2 !important;
}

/* Original values share the same visual system */
html[data-theme="light"] .delivery-address-dialog
.delivery-address-fields {
    margin-top: 0 !important;
}

html[data-theme="light"] .delivery-address-dialog
.delivery-address-footer {
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 0 !important;
    margin-top: 22px !important;
}

/* Phone/tablet */
@media (max-width: 680px) {
    html[data-theme="light"] .delivery-address-dialog
    .delivery-address-form {
        padding: 20px !important;
    }

    html[data-theme="light"] .delivery-address-dialog
    .delivery-dialog-head {
        padding-right: 52px !important;
    }

    html[data-theme="light"] .delivery-address-dialog
    .delivery-dialog-head h2 {
        font-size: 21px !important;
    }
}
