/*
 * UNÆG Delivery frontend presentation.
 * Presentation only: colours, typography and controls inherit from the active theme.
 */
.ud-checker{
  --ud-gap:12px;
  --ud-radius:var(--theme-border-radius,var(--wd-brd-radius,10px));
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin:clamp(16px,2.2vw,24px) 0;
  color:inherit;
  background:transparent;
  font:inherit;
  line-height:inherit;
}
.ud-checker *,
.ud-checker *::before,
.ud-checker *::after{box-sizing:border-box}
.ud-checker__inner{
  width:100%;
  padding:clamp(15px,2vw,20px);
  border:1px solid rgba(127,127,127,.24);
  border-radius:var(--ud-radius);
  background:transparent;
  color:inherit;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
@supports (color:color-mix(in srgb,currentColor 20%,transparent)){
  .ud-checker__inner{border-color:color-mix(in srgb,currentColor 16%,transparent)}
  .ud-checker__inner:focus-within{border-color:color-mix(in srgb,currentColor 36%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,currentColor 5%,transparent)}
}
.ud-checker__header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.ud-checker__title{display:flex;align-items:center;gap:9px;min-width:0}
.ud-checker__mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:28px;height:28px;border:1px solid rgba(127,127,127,.24);border-radius:999px;color:inherit}
@supports (color:color-mix(in srgb,currentColor 20%,transparent)){
  .ud-checker__mark{border-color:color-mix(in srgb,currentColor 16%,transparent);background:color-mix(in srgb,currentColor 3%,transparent)}
}
.ud-checker__mark svg{display:block;width:16px;height:16px}
.ud-checker h3{margin:0;padding:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:600;line-height:1.25}
.ud-preview{display:inline-flex;align-items:center;flex:0 0 auto;margin:0;padding:5px 8px;border:1px solid rgba(127,127,127,.28);border-radius:999px;color:inherit;font-size:.72em;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap;opacity:.8}
.ud-preview-note{margin:-3px 0 14px;color:inherit;font-size:.8125em;line-height:1.45;opacity:.7}
.ud-description{max-width:58ch;margin:0 0 14px;color:inherit;font-size:.92em;line-height:1.5;opacity:.78}
.ud-controls{display:grid;gap:var(--ud-gap);align-items:end;width:100%}
.ud-controls--product{grid-template-columns:minmax(0,1fr) auto}
.ud-controls--cart{grid-template-columns:minmax(0,1fr) minmax(0,.8fr) auto}
.ud-controls--checkout{grid-template-columns:minmax(0,1fr)}
.ud-field{display:block;min-width:0;margin:0;color:inherit;font:inherit}
.ud-field__label{display:block;margin:0 0 6px;color:inherit;font:inherit;font-size:.82em;font-weight:600;line-height:1.25;opacity:.82}
.ud-checker .ud-pin,
.ud-checker .ud-state{
  display:block;
  width:100%;
  max-width:100%;
  min-height:44px;
  margin:0;
  font:inherit;
  color:inherit;
}
.ud-action{display:flex;align-items:flex-end}
.ud-checker .ud-submit{
  min-height:44px;
  margin:0;
  white-space:nowrap;
  font:inherit;
  cursor:pointer;
}
.ud-controls--checkout .ud-submit{width:max-content;max-width:100%}
.ud-checker .ud-submit:disabled{opacity:.58;cursor:wait}
.ud-checker.is-loading .ud-submit{pointer-events:none}
.ud-result{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:3px;
  min-height:1.5em;
  margin:14px 0 0;
  padding-top:0;
  color:inherit;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.ud-result:empty{min-height:0;margin-top:0}
.ud-result__eyebrow{display:block;color:inherit;font-size:.72em;font-weight:600;line-height:1.3;letter-spacing:.035em;text-transform:uppercase;opacity:.62}
.ud-result__edd{display:block;color:inherit;font:inherit;font-size:1.05em;font-weight:650;line-height:1.3}
.ud-result__message{display:block;color:inherit;font-size:.88em;line-height:1.5;opacity:.78}
.ud-result[data-status="free"] .ud-result__message,
.ud-result[data-status="paid"] .ud-result__message{opacity:.72}
.ud-result[data-status="blocked"] .ud-result__message,
.ud-result[data-status="unserviceable"] .ud-result__message,
.ud-result[data-status="unsupported_destination"] .ud-result__message,
.ud-result[data-status="cod_unavailable"] .ud-result__message{font-weight:600;opacity:.92}
.ud-note{margin:10px 0 0;color:inherit;font-size:.79em;line-height:1.45;opacity:.62}
.ud-checker :where(.ud-pin,.ud-state,.ud-submit):focus-visible{outline:2px solid currentColor;outline-offset:2px}

/* Keep WooCommerce's established hook positions and only normalize surrounding layout. */
.single-product .summary .ud-checker--product{clear:both}
.woocommerce-cart .cart_totals>.ud-checker--cart{margin-top:0}
.woocommerce-checkout #order_review_heading+.ud-checker--checkout{margin-top:0}

/* Avoid legacy theme floats leaking into the widget. */
.ud-checker,.ud-checker__inner,.ud-checker__header,.ud-checker__title,.ud-controls,.ud-field,.ud-action,.ud-result{float:none}

@media (max-width:767px){
  .ud-checker{margin:16px 0}
  .ud-checker__inner{padding:14px}
  .ud-checker__header{align-items:flex-start}
  .ud-controls--product,
  .ud-controls--cart{grid-template-columns:minmax(0,1fr)}
  .ud-action,.ud-checker .ud-submit,.ud-controls--checkout .ud-submit{width:100%}
  .ud-checker .ud-submit{display:flex;align-items:center;justify-content:center}
}
@media (max-width:420px){
  .ud-checker__header{gap:8px}
  .ud-checker__mark{width:26px;height:26px}
  .ud-preview{font-size:.68em;padding:5px 7px}
}
@media (max-width:360px){
  .ud-checker__inner{padding:12px}
  .ud-checker__header{flex-wrap:wrap}
  .ud-preview{margin-left:35px}
}
@media (prefers-reduced-motion:reduce){
  .ud-checker__inner{transition:none}
}

/* WooCommerce Cart/Checkout Blocks: same visual system, no dependency on private block internals. */
.ud-checker[data-ud-block="yes"]{width:100%;max-width:none;margin:0}
.ud-checker[data-ud-block="yes"] .ud-checker__inner{width:100%}
.ud-checker[data-ud-block="yes"] .ud-submit.wc-block-components-button{box-sizing:border-box}
@media (max-width:767px){
  .ud-checker[data-ud-block="yes"]{margin:0}
}

/* Compact widget: fit the available column, including tablet product layouts. */
.ud-checker{container-type:inline-size}
.ud-checker__inner{padding:14px;min-width:0}
.ud-checker__header{margin-bottom:10px;flex-wrap:wrap}
.ud-preview-note{margin:0 0 10px;font-size:.75em}
.ud-description{margin-bottom:10px;font-size:.82em}
.ud-note{margin-top:8px}
.ud-checker .ud-pin,.ud-checker .ud-state{font-size:16px;min-width:0}
.ud-checker .ud-submit{min-height:44px}
@container (max-width:420px){
 .ud-controls--product,.ud-controls--cart{grid-template-columns:minmax(0,1fr)}
 .ud-action,.ud-checker .ud-submit{width:100%}
}

/* Pincode-only cart destination checker. */
.ud-controls--cart{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:767px){.ud-controls--cart{grid-template-columns:minmax(0,1fr)}}
@container(max-width:420px){.ud-controls--cart{grid-template-columns:minmax(0,1fr)}}

/*
 * UNAEG Delivery v0.1.14 presentation layer. Only touches .ud-v2 widgets.
 * To roll back the look, delete everything from this comment to the end of the file.
 */
.ud-checker.ud-v2 {
  --ud-ok: #14693f;
  --ud-ok-bg: #e6f4ec;
  --ud-ok-fill: #1f8a52;
  --ud-warn: #9a4a00;
  --ud-bad: #b3261e;
}

/* Compact heading: this is a status panel, not a page section */
.ud-checker.ud-v2 .ud-checker__header { margin: 0 0 12px; flex-wrap: wrap; }
.ud-checker.ud-v2 .ud-checker__title h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
}
.ud-checker.ud-v2 .ud-checker__mark { width: 26px; height: 26px; }
.ud-checker.ud-v2 .ud-checker__mark svg { width: 15px; height: 15px; }

/* Free delivery highlight */
.ud-checker.ud-v2 .ud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px;
  background: var(--ud-ok-bg);
  color: var(--ud-ok);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.ud-checker.ud-v2 .ud-pill svg { flex: 0 0 auto; }
.ud-checker.ud-v2[data-free="1"] .ud-checker__inner {
  border-color: color-mix(in srgb, var(--ud-ok) 38%, transparent);
}

/* Progress toward free delivery */
.ud-checker.ud-v2 .ud-progress { margin: 0 0 12px; }
.ud-checker.ud-v2 .ud-progress__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(127, 127, 127, .22);
  overflow: hidden;
}
.ud-checker.ud-v2 .ud-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ud-ok-fill);
  transition: width .3s ease;
}
.ud-checker.ud-v2 .ud-progress__text {
  margin: 8px 0 0;
  font-size: .9em;
  line-height: 1.45;
}
.ud-checker.ud-v2 .ud-progress__text--free { margin: 0 0 12px; color: var(--ud-ok); font-weight: 600; }

/* Check button is a secondary action here, it must not compete with Place order */
.ud-checker.ud-v2 .ud-submit.button {
  min-height: 44px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  box-shadow: none;
}
.ud-checker.ud-v2 .ud-submit.button:hover:not(:disabled),
.ud-checker.ud-v2 .ud-submit.button:focus-visible:not(:disabled) {
  background: rgba(127, 127, 127, .12);
  color: inherit;
}
.ud-checker.ud-v2 .ud-submit.button:disabled { opacity: .55; cursor: default; }

/* Result line */
.ud-checker.ud-v2 .ud-result { margin: 12px 0 0; line-height: 1.45; transition: opacity .15s ease; }
.ud-checker.ud-v2 .ud-result:empty { display: none; }
.ud-checker.ud-v2.is-loading .ud-result { opacity: .55; }
.ud-checker.ud-v2 .ud-result[data-status="free"] .ud-result__message { color: var(--ud-ok); font-weight: 600; }
.ud-checker.ud-v2 .ud-result[data-status="checking"],
.ud-checker.ud-v2 .ud-result[data-status="idle"] { opacity: .75; }
.ud-checker.ud-v2 .ud-result[data-status="invalid_pincode"] .ud-result__message,
.ud-checker.ud-v2 .ud-result[data-status="blocked"] .ud-result__message,
.ud-checker.ud-v2 .ud-result[data-status="unserviceable"] .ud-result__message,
.ud-checker.ud-v2 .ud-result[data-status="unsupported_destination"] .ud-result__message { color: var(--ud-bad); }
.ud-checker.ud-v2 .ud-result[data-status="unavailable"] .ud-result__message,
.ud-checker.ud-v2 .ud-result[data-status="temporarily_unavailable"] .ud-result__message { color: var(--ud-warn); }

@media (max-width: 575.98px) {
  .ud-checker.ud-v2 .ud-submit.button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ud-checker.ud-v2 .ud-progress__fill,
  .ud-checker.ud-v2 .ud-result { transition: none; }
}
