/* ═══════════════════════════════════════════════════════════════
   TE Shipping Pro – Checkout & Frontend Styles v3.5 UX Redesign
═══════════════════════════════════════════════════════════════ */

/* ── Shipping option rows ────────────────────────────────────── */
.woocommerce-shipping-methods li {
  border: 1.5px solid #e4e9ef;
  border-radius: 12px;
  margin-bottom: 8px !important;
  padding: 12px 14px !important;
  transition: border-color .18s, background .18s, box-shadow .18s;
  cursor: pointer;
  background: #fff;
  position: relative;
}
.woocommerce-shipping-methods li:hover {
  border-color: #93c5fd;
  background: #f8faff;
  box-shadow: 0 2px 8px rgba(37,99,235,.06);
}
.woocommerce-shipping-methods li:has(input:checked),
.woocommerce-shipping-methods li.grsp-selected {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12), 0 2px 8px rgba(37,99,235,.08);
}
.woocommerce-shipping-methods input[type=radio] {
  margin-top: 0 !important;
  accent-color: #3b82f6;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Carrier rate card ───────────────────────────────────────── */
.grsp-rate-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 1px 0;
}
.grsp-rate-card__icon { flex-shrink: 0; width: 40px; height: 40px; }
.grsp-rate-card__icon svg { width: 40px; height: 40px; display: block; border-radius: 8px; }

.grsp-rate-card__body { flex: 1; min-width: 0; }
.grsp-rate-card__name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  line-height: 1.3;
}
.grsp-rate-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.grsp-eta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: #64748b;
}

.grsp-rate-card__price {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  text-align: right;
  min-width: 60px;
  letter-spacing: -.02em;
}
.grsp-free {
  color: #059669;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ── Badges ──────────────────────────────────────────────────── */
.grsp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  line-height: 1.5;
}
.grsp-badge--sat    { background: #dbeafe; color: #1e40af; }
.grsp-badge--lock   { background: #dcfce7; color: #166534; }
.grsp-badge--cod    { background: #fef3c7; color: #92400e; }
.grsp-badge--island { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }

/* ── Zone notice ─────────────────────────────────────────────── */
.grsp-zone-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #92400e;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: grspSlideIn .2s ease;
}
.grsp-zone-notice::before { content: '🏝️'; font-size: 14px; flex-shrink: 0; }

@keyframes grspSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BoxNow Locker Picker ────────────────────────────────────── */
.grsp-locker-picker {
  margin: 8px 0 4px 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.grsp-locker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.grsp-locker-btn:hover { background: #dcfce7; border-color: #86efac; box-shadow: 0 2px 6px rgba(21,128,61,.12); }
.grsp-locker-selected { font-size: 12px; color: #15803d; font-weight: 500; }

.grsp-locker-inline {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  animation: grspSlideIn .18s ease;
}
.grsp-locker-input {
  flex: 1;
  min-width: 180px;
  padding: 7px 11px;
  font-size: 13px;
  border: 1.5px solid #bbf7d0;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.grsp-locker-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}
.grsp-locker-confirm {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.grsp-locker-confirm:hover { background: #15803d; box-shadow: 0 3px 8px rgba(22,163,74,.25); }

/* ── Rate inline description ─────────────────────────────────── */
.grsp-rate-inline-desc {
  margin: 5px 0 0 52px;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
}

/* ── Free Shipping Bar ───────────────────────────────────────── */
.grsp-freebar {
  background: #fff;
  border: 1px solid #e4e9ef;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.grsp-freebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 12px 12px 0 0;
}
.grsp-freebar--done {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}
.grsp-freebar--done .grsp-freebar__msg { color: #166534; }

.grsp-freebar__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.grsp-freebar__truck {
  font-size: 18px;
  animation: grspBounce 1.6s ease-in-out infinite;
  display: inline-block;
}
.grsp-freebar__msg { font-size: 13px; color: #374151; line-height: 1.4; }
.grsp-freebar__msg strong { color: #111827; }
.grsp-freebar__icon { font-size: 20px; margin-right: 4px; }

.grsp-freebar__track {
  background: #e4e9ef;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.grsp-freebar__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 999px;
  transition: width .85s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.grsp-freebar__fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35));
  animation: grspShimmer 1.6s infinite;
}
.grsp-freebar__labels {
  display: flex;
  justify-content: flex-end;
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
}

@keyframes grspBounce {
  0%,100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}
@keyframes grspShimmer {
  0%   { transform: translateX(-28px); }
  100% { transform: translateX(28px); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .grsp-rate-card { gap: 8px; }
  .grsp-rate-card__icon { width: 34px; height: 34px; }
  .grsp-rate-card__icon svg { width: 34px; height: 34px; }
  .grsp-rate-card__name { font-size: 13px; }
  .grsp-rate-card__price { font-size: 14px; }
  .woocommerce-shipping-methods li { padding: 9px 10px !important; }
  .grsp-locker-picker { margin-left: 0; }
}

/* ── Dark mode ───────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .woocommerce-shipping-methods li {
    border-color: #2a2d3a;
    background: #1a1d27;
    color: #e2e8f0;
  }
  .woocommerce-shipping-methods li:hover {
    border-color: #4b81f4;
    background: #1c2030;
  }
  .woocommerce-shipping-methods li:has(input:checked),
  .woocommerce-shipping-methods li.grsp-selected {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #1e2848 0%, #1a2540 100%);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  }
  .grsp-rate-card__name  { color: #f1f5f9; }
  .grsp-rate-card__price { color: #f1f5f9; }
  .grsp-eta              { color: #94a3b8; }
  .grsp-freebar {
    background: #1a1d27;
    border-color: #2a2d3a;
  }
  .grsp-freebar::before  { opacity: .8; }
  .grsp-freebar__msg     { color: #cbd5e1; }
  .grsp-freebar__msg strong { color: #f1f5f9; }
  .grsp-freebar__labels  { color: #475569; }
  .grsp-freebar__track   { background: #2a2d3a; }
  .grsp-freebar--done {
    background: linear-gradient(135deg, #0f2d1f 0%, #0a2416 100%);
    border-color: #166534;
  }
  .grsp-freebar--done .grsp-freebar__msg { color: #4ade80; }
  .grsp-zone-notice {
    background: #2d2500;
    border-color: #78450f;
    color: #fcd34d;
  }
  .grsp-zone-notice::before { filter: none; }
  .grsp-locker-btn {
    background: #052e16;
    border-color: #166534;
    color: #6ee7b7;
  }
  .grsp-locker-input {
    background: #1a1d27;
    color: #e2e8f0;
    border-color: #166534;
  }
  .grsp-rate-inline-desc { color: #94a3b8; }
}


/* ═══════════════════════════════════════════════════════════════
   TE Shipping Pro – Puppy4u / Woodmart soft color compatibility
   Version: 4.0.9
   Scope: WooCommerce cart + checkout only. No layout changes.
═══════════════════════════════════════════════════════════════ */

:root {
  --tesp-p4u-dark: #243746;
  --tesp-p4u-dark-hover: #1d2c38;
  --tesp-p4u-green: #4e6b5b;
  --tesp-p4u-green-soft: #eef4f0;
  --tesp-p4u-green-border: #d7e4dc;
  --tesp-p4u-sand: #d8b77a;
  --tesp-p4u-sand-hover: #c9a76a;
  --tesp-p4u-bg: #f8f7f3;
  --tesp-p4u-border: #e6e2da;
  --tesp-p4u-text: #4a5560;
}

body.woocommerce-cart,
body.woocommerce-checkout {
  background-color: var(--tesp-p4u-bg);
}

/* Free shipping bar – softer Puppy4u colors */
body.woocommerce-cart .grsp-freebar,
body.woocommerce-checkout .grsp-freebar {
  background: #ffffff;
  border: 1px solid var(--tesp-p4u-border);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(36, 55, 70, 0.055);
}

body.woocommerce-cart .grsp-freebar::before,
body.woocommerce-checkout .grsp-freebar::before {
  background: linear-gradient(90deg, var(--tesp-p4u-green), var(--tesp-p4u-sand));
}

body.woocommerce-cart .grsp-freebar--done,
body.woocommerce-checkout .grsp-freebar--done,
body.woocommerce-cart .woocommerce-notices-wrapper .grsp-freebar--done,
body.woocommerce-checkout .woocommerce-notices-wrapper .grsp-freebar--done {
  background: var(--tesp-p4u-green-soft) !important;
  border-color: var(--tesp-p4u-green-border) !important;
  color: var(--tesp-p4u-green) !important;
  box-shadow: none !important;
}

body.woocommerce-cart .grsp-freebar--done::before,
body.woocommerce-checkout .grsp-freebar--done::before {
  background: var(--tesp-p4u-green) !important;
}

body.woocommerce-cart .grsp-freebar--done .grsp-freebar__msg,
body.woocommerce-checkout .grsp-freebar--done .grsp-freebar__msg,
body.woocommerce-cart .grsp-freebar--done .grsp-freebar__msg strong,
body.woocommerce-checkout .grsp-freebar--done .grsp-freebar__msg strong {
  color: var(--tesp-p4u-green) !important;
}

body.woocommerce-cart .grsp-freebar__msg,
body.woocommerce-checkout .grsp-freebar__msg {
  color: var(--tesp-p4u-text);
}

body.woocommerce-cart .grsp-freebar__msg strong,
body.woocommerce-checkout .grsp-freebar__msg strong {
  color: var(--tesp-p4u-dark);
}

body.woocommerce-cart .grsp-freebar__track,
body.woocommerce-checkout .grsp-freebar__track {
  background: #ebe7df;
}

body.woocommerce-cart .grsp-freebar__fill,
body.woocommerce-checkout .grsp-freebar__fill {
  background: linear-gradient(90deg, var(--tesp-p4u-green), var(--tesp-p4u-sand));
}

/* Shipping method cards – override the stronger default blues */
body.woocommerce-cart .woocommerce-shipping-methods li,
body.woocommerce-checkout .woocommerce-shipping-methods li,
body.woocommerce-cart .wd-shipping-methods li,
body.woocommerce-checkout .wd-shipping-methods li {
  background: #ffffff;
  border-color: var(--tesp-p4u-border);
  color: var(--tesp-p4u-text);
  box-shadow: none;
}

body.woocommerce-cart .woocommerce-shipping-methods li:hover,
body.woocommerce-checkout .woocommerce-shipping-methods li:hover,
body.woocommerce-cart .wd-shipping-methods li:hover,
body.woocommerce-checkout .wd-shipping-methods li:hover {
  background: #fcfbf8;
  border-color: #d8cfc0;
  box-shadow: 0 4px 14px rgba(36, 55, 70, 0.055);
}

body.woocommerce-cart .woocommerce-shipping-methods li:has(input:checked),
body.woocommerce-checkout .woocommerce-shipping-methods li:has(input:checked),
body.woocommerce-cart .woocommerce-shipping-methods li.grsp-selected,
body.woocommerce-checkout .woocommerce-shipping-methods li.grsp-selected,
body.woocommerce-cart .wd-shipping-methods li.grsp-selected,
body.woocommerce-checkout .wd-shipping-methods li.grsp-selected {
  background: var(--tesp-p4u-green-soft) !important;
  border-color: var(--tesp-p4u-green) !important;
  box-shadow: 0 0 0 3px rgba(78, 107, 91, 0.10) !important;
}

body.woocommerce-cart .woocommerce-shipping-methods input[type=radio],
body.woocommerce-checkout .woocommerce-shipping-methods input[type=radio] {
  accent-color: var(--tesp-p4u-green);
}

body.woocommerce-cart .grsp-rate-card__name,
body.woocommerce-checkout .grsp-rate-card__name,
body.woocommerce-cart .grsp-rate-card__price,
body.woocommerce-checkout .grsp-rate-card__price {
  color: var(--tesp-p4u-dark);
}

body.woocommerce-cart .grsp-free,
body.woocommerce-checkout .grsp-free,
body.woocommerce-cart .grsp-locker-selected,
body.woocommerce-checkout .grsp-locker-selected {
  color: var(--tesp-p4u-green);
}

/* Badges – less saturated */
body.woocommerce-cart .grsp-badge--sat,
body.woocommerce-checkout .grsp-badge--sat,
body.woocommerce-cart .grsp-badge--lock,
body.woocommerce-checkout .grsp-badge--lock {
  background: var(--tesp-p4u-green-soft);
  color: var(--tesp-p4u-green);
}

body.woocommerce-cart .grsp-badge--cod,
body.woocommerce-checkout .grsp-badge--cod {
  background: #f7efe0;
  color: #8a6b32;
}

body.woocommerce-cart .grsp-badge--island,
body.woocommerce-checkout .grsp-badge--island {
  background: #f7f3ec;
  color: var(--tesp-p4u-text);
  border-color: var(--tesp-p4u-border);
}

/* Locker / zone notices */
body.woocommerce-cart .grsp-locker-btn,
body.woocommerce-checkout .grsp-locker-btn,
body.woocommerce-cart .grsp-locker-confirm,
body.woocommerce-checkout .grsp-locker-confirm {
  background: var(--tesp-p4u-green);
  border-color: var(--tesp-p4u-green);
  color: #ffffff;
}

body.woocommerce-cart .grsp-locker-btn:hover,
body.woocommerce-checkout .grsp-locker-btn:hover,
body.woocommerce-cart .grsp-locker-confirm:hover,
body.woocommerce-checkout .grsp-locker-confirm:hover {
  background: #415a4c;
  border-color: #415a4c;
  box-shadow: 0 3px 8px rgba(78, 107, 91, 0.18);
}

body.woocommerce-cart .grsp-locker-input,
body.woocommerce-checkout .grsp-locker-input {
  border-color: var(--tesp-p4u-green-border);
}

body.woocommerce-cart .grsp-locker-input:focus,
body.woocommerce-checkout .grsp-locker-input:focus {
  border-color: var(--tesp-p4u-green);
  box-shadow: 0 0 0 3px rgba(78, 107, 91, 0.12);
}

body.woocommerce-cart .grsp-zone-notice,
body.woocommerce-checkout .grsp-zone-notice {
  background: #f7efe0;
  border-color: #ead9b9;
  color: #7c6233;
}

/* Woodmart/WooCommerce cart visual polish */
body.woocommerce-cart .cart-totals-inner,
body.woocommerce-cart .cart_totals,
body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout .wd-checkout-prod,
body.woocommerce-checkout .checkout-order-review {
  border-color: var(--tesp-p4u-border) !important;
}

body.woocommerce-cart .cart_totals,
body.woocommerce-cart .cart-totals-inner,
body.woocommerce-checkout .woocommerce-checkout-review-order {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(36, 55, 70, 0.055);
}

body.woocommerce-cart .cart_totals h2,
body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td,
body.woocommerce-checkout h3 {
  color: var(--tesp-p4u-dark);
}

body.woocommerce-cart .cart_totals td,
body.woocommerce-cart .cart_totals .shipping td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
  color: var(--tesp-p4u-text);
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order,
body.woocommerce-checkout .button.alt,
body.woocommerce-cart .button[name="apply_coupon"],
body.woocommerce-cart .coupon .button {
  border-radius: 8px;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order,
body.woocommerce-checkout .button.alt {
  background: var(--tesp-p4u-dark) !important;
  border-color: var(--tesp-p4u-dark) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-checkout #place_order:hover,
body.woocommerce-checkout .button.alt:hover {
  background: var(--tesp-p4u-dark-hover) !important;
  border-color: var(--tesp-p4u-dark-hover) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .coupon .button,
body.woocommerce-cart .button[name="apply_coupon"] {
  background: var(--tesp-p4u-sand) !important;
  border-color: var(--tesp-p4u-sand) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .coupon .button:hover,
body.woocommerce-cart .button[name="apply_coupon"]:hover {
  background: var(--tesp-p4u-sand-hover) !important;
  border-color: var(--tesp-p4u-sand-hover) !important;
  color: #ffffff !important;
}

body.woocommerce-cart .button[name="update_cart"],
body.woocommerce-cart .actions .button:disabled,
body.woocommerce-cart .actions .button.disabled {
  background: #f1eee8 !important;
  border-color: #e4ded4 !important;
  color: #7a746b !important;
}

body.woocommerce-cart a,
body.woocommerce-checkout a {
  color: var(--tesp-p4u-green);
}

body.woocommerce-cart a:hover,
body.woocommerce-checkout a:hover {
  color: var(--tesp-p4u-dark);
}

/* Keep dark OS preference from forcing dark cards on this storefront */
@media (prefers-color-scheme: dark) {
  body.woocommerce-cart .grsp-freebar,
  body.woocommerce-checkout .grsp-freebar,
  body.woocommerce-cart .woocommerce-shipping-methods li,
  body.woocommerce-checkout .woocommerce-shipping-methods li {
    background: #ffffff;
    border-color: var(--tesp-p4u-border);
    color: var(--tesp-p4u-text);
  }

  body.woocommerce-cart .grsp-freebar--done,
  body.woocommerce-checkout .grsp-freebar--done,
  body.woocommerce-cart .woocommerce-shipping-methods li:has(input:checked),
  body.woocommerce-checkout .woocommerce-shipping-methods li:has(input:checked),
  body.woocommerce-cart .woocommerce-shipping-methods li.grsp-selected,
  body.woocommerce-checkout .woocommerce-shipping-methods li.grsp-selected {
    background: var(--tesp-p4u-green-soft) !important;
    color: var(--tesp-p4u-green) !important;
  }
}

/* Puppy4u: dog/cat products are excluded from free shipping */
body.woocommerce-cart .grsp-freebar--excluded,
body.woocommerce-checkout .grsp-freebar--excluded {
  background: var(--tesp-p4u-green-soft) !important;
  border-color: #d7e4dc !important;
  color: var(--tesp-p4u-green) !important;
}

/* Puppy4u v4.1.7: split packages, one shared pickup/delivery point UI */
body.grsp-puppy4u-split-shipping .woocommerce-shipping-destination.grsp-destination-hidden {
  display: none !important;
}

body.woocommerce-cart .grsp-shared-destination,
body.woocommerce-checkout .grsp-shared-destination {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--tesp-p4u-green-border, #d7e4dc);
  border-radius: 10px;
  background: var(--tesp-p4u-green-soft, #EEF4F0);
  color: var(--tesp-p4u-green, #4E6B5B);
  text-align: left;
}

body.woocommerce-cart .grsp-shared-destination__icon,
body.woocommerce-checkout .grsp-shared-destination__icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #ffffff;
  font-size: 14px;
  line-height: 1;
}

body.woocommerce-cart .grsp-shared-destination__body,
body.woocommerce-checkout .grsp-shared-destination__body {
  display: block;
  min-width: 0;
}

body.woocommerce-cart .grsp-shared-destination__title,
body.woocommerce-checkout .grsp-shared-destination__title {
  display: block;
  margin-bottom: 2px;
  color: var(--tesp-p4u-dark, #243746);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
}

body.woocommerce-cart .grsp-shared-destination__text,
body.woocommerce-checkout .grsp-shared-destination__text {
  display: block;
  color: var(--tesp-p4u-text, #4A5560);
  font-size: 12px;
  line-height: 1.45;
}

body.grsp-puppy4u-split-shipping .cart_totals tr.shipping th,
body.grsp-puppy4u-split-shipping .woocommerce-checkout-review-order-table tr.shipping th {
  vertical-align: top;
}
