/* i-Light Cart Availability + Delivery ETA SAFE v1.0.0
 * Presentation only. Availability and ETA truth are rendered server-side.
 */

.ilight-cart-availability {
  display: flex;
  clear: both;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 8px 0 0;
  padding: 7px 9px;
  gap: 3px 8px;
  flex-wrap: wrap;
  align-items: baseline;
  border: 1px solid #dbe5df;
  border-radius: 7px;
  background: #f5fbf7;
  color: #28583b;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ilight-cart-availability__label {
  color: inherit;
  font-weight: 800;
}

.ilight-cart-availability__detail {
  min-width: 0;
  color: inherit;
  font-weight: 500;
}

.ilight-cart-availability--delayed,
.ilight-cart-availability--partial {
  border-color: #f1d3a6;
  background: #fff8ed;
  color: #7a4a08;
}

/* Display-only courier estimate. It is deliberately a sibling of the radio
 * label so checkout v2.1.28 keeps comparing the original shipping title. */
.checkout-shipping-methods .ilight-shipping-eta {
  display: block;
  box-sizing: border-box;
  margin: 5px 0 5px 25px;
  padding: 7px 9px;
  max-width: 620px;
  border-left: 3px solid #e49a35;
  border-radius: 4px;
  background: #fff8ed;
  color: #6f460d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Keep the ordinary cart table readable even with a long supplier status. */
body.checkout-cart #checkout-cart .ilight-cart-availability {
  max-width: 360px;
}

@media (max-width: 768px) {
  body.checkout-checkout .so-onepagecheckout.layout2
    .checkout-cart .checkout-product
    tr.ilight-mobile-cart-product > td.name
    > .ilight-cart-availability {
    display: flex !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 9px 0 0 !important;
    padding: 8px 9px !important;
    gap: 3px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.checkout-cart #checkout-cart .ilight-cart-availability {
    width: 100%;
    max-width: none;
  }

  body.checkout-checkout .so-onepagecheckout.layout2
    .checkout-shipping-methods .ilight-shipping-eta {
    width: auto;
    max-width: none;
    margin: 6px 0 6px 24px;
    padding: 8px 9px;
  }
}
