/* VSO Couriers — checkout. Sites recolour with --vsoc-accent / --vsoc-accent-ink (keep ≥4.5:1 between them). */
:root { --vsoc-accent: #111827; --vsoc-accent-ink: #ffffff; --vsoc-line: #e2e8f0; --vsoc-text: #0f172a; --vsoc-muted: #475569; }

.vsoc-locker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0 4px; }
.vsoc-locker-now { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.vsoc-locker-now strong { color: var(--vsoc-text); }
.vsoc-locker-now span { color: var(--vsoc-muted); font-size: .92em; }
.vsoc-free { color: inherit; }

/* rates as cards in one full-width cell (templates/cart/cart-shipping.php); the whole card is the label */
tr.vsoc-ship > td { padding-left: 0 !important; padding-right: 0 !important; text-align: left !important; }
tr.vsoc-ship > td::before { display: none !important; } /* themes' mobile "data-title" caption: we print our own */
.vsoc-ship-h { font-weight: 600; color: var(--vsoc-text); margin: 0 0 10px; }
ul.vsoc-rates { list-style: none !important; margin: 0 0 6px !important; padding: 0 !important; display: grid; gap: 8px; }
ul.vsoc-rates > li {
  position: relative; margin: 0 !important; padding: 12px 14px 12px 44px !important; list-style: none !important; text-indent: 0 !important;
  border: 1.5px solid var(--vsoc-line); border-radius: 12px; background: #fff; text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}
ul.vsoc-rates > li:has(input.shipping_method:checked),
ul.vsoc-rates > li:has(input[type="hidden"].shipping_method) {
  border-color: var(--vsoc-text); background: color-mix(in srgb, var(--vsoc-accent) 7%, #fff);
}
ul.vsoc-rates > li > input.shipping_method[type="radio"] {
  position: absolute; left: 16px; top: 15px; margin: 0 !important; width: 18px; height: 18px; accent-color: var(--vsoc-text);
}
ul.vsoc-rates > li > input[type="hidden"] + label { margin-left: -30px !important; }
ul.vsoc-rates > li > label {
  display: flex !important; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 !important; cursor: pointer; color: var(--vsoc-text); line-height: 1.35; font-weight: 400;
}
ul.vsoc-rates > li > label::after { content: ""; position: absolute; inset: 0; border-radius: 12px; } /* whole card clicks */
ul.vsoc-rates > li > .vsoc-locker { position: relative; z-index: 1; margin: 10px 0 2px; } /* above the click layer */
.vsoc-rl { display: flex; flex-direction: column; min-width: 0; }
.vsoc-rc { font-weight: 700; }
.vsoc-rk { color: var(--vsoc-muted); font-size: .92em; }
.vsoc-rp { flex: none; font-weight: 700; white-space: nowrap; }
.vsoc-rp .vsoc-free, .vsoc-rp strong { font-weight: 700; }
@media (hover: hover) { ul.vsoc-rates > li:hover { border-color: #94a3b8; } }
ul.vsoc-rates > li:has(input.shipping_method:focus-visible) { outline: 3px solid #2563eb; outline-offset: 2px; }
tr.vsoc-ship .woocommerce-shipping-destination { margin: 8px 0 4px; color: var(--vsoc-muted); }

/* buttons: the theme's own :hover/:focus colours must not repaint them (white-on-white on Astra) */
.vsoc-btn, .vsoc-btn:hover, .vsoc-btn:focus, .vsoc-btn:active, .vsoc-btn:visited {
  background: var(--vsoc-accent) !important; color: var(--vsoc-accent-ink) !important; border: 0 !important;
  border-radius: 999px !important; padding: 9px 18px !important; font-weight: 600; font-size: 15px; line-height: 1.2;
  cursor: pointer; box-shadow: none !important; text-decoration: none !important; white-space: nowrap;
}
.vsoc-btn-ghost, .vsoc-btn-ghost:hover, .vsoc-btn-ghost:focus, .vsoc-btn-ghost:active {
  background: #fff !important; color: var(--vsoc-text) !important; border: 1.5px solid #cbd5e1 !important;
  border-radius: 999px !important; padding: 8px 16px !important; font-weight: 600; font-size: 15px; line-height: 1.2;
  cursor: pointer; box-shadow: none !important; white-space: nowrap;
}
@media (hover: hover) {
  .vsoc-btn:hover { filter: brightness(1.12); }
  .vsoc-btn-ghost:hover { border-color: #64748b !important; }
}
.vsoc-btn:focus:not(:focus-visible), .vsoc-btn-ghost:focus:not(:focus-visible) { outline: none; }
.vsoc-btn:focus-visible, .vsoc-btn-ghost:focus-visible, .vsoc-dlg input:focus-visible, .vsoc-x:focus-visible {
  outline: 3px solid #2563eb !important; outline-offset: 2px;
}

/* dialog */
.vsoc-dlg { padding: 0; border: 0; border-radius: 16px; width: min(1040px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); overflow: hidden; color: var(--vsoc-text); background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .35); }
.vsoc-dlg::backdrop { background: rgba(15, 23, 42, .55); }
.vsoc-dlg-in { display: flex; flex-direction: column; height: min(680px, calc(100dvh - 32px)); }
.vsoc-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; }
.vsoc-dlg-head h2 { margin: 0; font-size: 22px; line-height: 1.2; color: var(--vsoc-text); }
.vsoc-x, .vsoc-x:hover, .vsoc-x:focus { width: 40px; height: 40px; flex: none; border-radius: 50% !important; border: 0 !important;
  background: #f1f5f9 !important; color: #0f172a !important; font-size: 24px; line-height: 1; padding: 0 !important; cursor: pointer; }
.vsoc-tools { display: flex; gap: 8px; padding: 4px 20px 0; }
.vsoc-q { flex: 1; margin: 0; }
.vsoc-q input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 16px; border: 1.5px solid #cbd5e1;
  border-radius: 999px; font-size: 16px; color: var(--vsoc-text); background: #fff; }
.vsoc-count { margin: 8px 20px; font-size: 14px; color: #334155; min-height: 1.4em; }
.vsoc-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); border-top: 1px solid var(--vsoc-line); }
.vsoc-body.no-map { grid-template-columns: 1fr; }
.vsoc-body.no-map .vsoc-map { display: none; }
.vsoc-list { margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.vsoc-list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--vsoc-line); margin: 0; }
.vsoc-list li.is-on { background: #f1f5f9; }
.vsoc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.vsoc-n { font-weight: 600; color: var(--vsoc-text); }
.vsoc-a { color: var(--vsoc-muted); font-size: 14px; }
.vsoc-d { color: #334155; font-size: 13px; font-weight: 600; }
.vsoc-list .vsoc-btn { padding: 7px 14px !important; font-size: 14px; }
.vsoc-map { min-height: 300px; border-left: 1px solid var(--vsoc-line); }

/* phones: whole screen, map on top, the list scrolls (smi: a fixed-height modal hid its own button) */
@media (max-width: 720px) {
  .vsoc-dlg { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .vsoc-dlg-in { height: 100dvh; }
  .vsoc-dlg-head { padding: 12px 16px 6px; }
  .vsoc-tools { padding: 4px 16px 0; }
  .vsoc-count { margin: 6px 16px; }
  .vsoc-body { grid-template-columns: 1fr; grid-template-rows: 34dvh minmax(0, 1fr); }
  .vsoc-body.no-map { grid-template-rows: minmax(0, 1fr); }
  .vsoc-map { order: -1; min-height: 0; border-left: 0; border-bottom: 1px solid var(--vsoc-line); }
  .vsoc-list li { padding: 12px 16px; }
}
