/**
 * Lab Tests Off-Canvas Cart – lab-offcanvas.css  v3.1.0
 * Re-themed to match the LabCity storefront design system.
 * Same selectors/IDs as v3.0.0 — this is a visual reskin only,
 * nothing here should require JS/PHP changes.
 */

:root{
  --lc-red:#c2191a;
  --lc-red-dark:#a5130f;
  --lc-red-light:#ffece9;
  --lc-navy:#040f33;
  --lc-navy-light:#eef0f6;
  --lc-muted:#5b6172;
  --lc-line:#e5e7ef;
  --lc-bg:#f4f5f8;
  --lc-green:#159a63;
  --lc-green-light:#e6f6ee;
  --lc-font:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
}

.lab-offcanvas,
.lab-parameters-modal-content{
  font-family:var(--lc-font);
}

/* ─── Savings banner ──────────────────────────────────────────────────────── */

#lab-offcanvas-savings-banner {
  background: var(--lc-green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  padding: 9px 16px;
  display: flex;
  border-radius: 22px 22px 0 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}
/* Prevent centered modal from shifting when scrollbar is compensated */
.lab-offcanvas {
    margin-right: 0 !important;
}
#lab-offcanvas-savings-banner .banner-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: lab-banner-flash 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lab-banner-flash {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(400%) skewX(-15deg); }
}

/* ─── Product card ─────────────────────────────────────────────────────────── */

.test-pckg-card-wrapper {
}

.test-pckg-card-wrapper .test-pckg-card {
  background: #ffffff;
  border: 1px solid var(--lc-line);
  border-radius: 18px;
  padding: 18px;
  max-width: 100%;
  margin: auto;
  box-shadow: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.test-pckg-card-wrapper .test-pckg-card:hover{
  border-color: transparent;
  box-shadow: 0 10px 26px -14px rgba(4,15,51,.28);
}

.test-pckg-card-wrapper .test-pckg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.test-pckg-card-wrapper .test-pckg-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--lc-navy);
  line-height: 1.32;
}

.test-pckg-card-wrapper .test-pckg-price {
  text-align: right;
  flex-shrink: 0;
}

.test-pckg-card-wrapper .test-pckg-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
}

.test-pckg-card-wrapper .test-pckg-old {
  font-size: 12px;
  color: var(--lc-muted);
  text-decoration: line-through;
  margin-right: 2px;
}

.test-pckg-card-wrapper .test-pckg-new {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--lc-navy);
}

.test-pckg-card-wrapper .test-pckg-report {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--lc-muted);
}
.lab-search-input::placeholder {
  color: #9aa0b0;
}
.test-pckg-card-wrapper .test-pckg-report span {
  color: var(--lc-red);
  font-weight: 700;
}

.test-pckg-card-wrapper .test-pckg-divider {
  margin: 15px 0;
  height: 1px;
  background: var(--lc-line);
}

.test-pckg-card-wrapper .test-pckg-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.test-pckg-card-wrapper .test-pckg-desc {
  max-width: 75%;
  font-size: 12px;
  line-height: 1.5;
  color: var(--lc-muted);
}

.test-pckg-card-wrapper .test-pckg-desc strong {
  font-weight: 700;
  color: var(--lc-navy);
}

.test-pckg-card-wrapper .test-pckg-view {
  margin-top: 6px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--lc-red);
  text-decoration: none;
}
.test-pckg-card-wrapper .test-pckg-view:hover{
  text-decoration: underline;
}

/* ─── Add / Remove buttons ─────────────────────────────────────────────────── */

.lab-add-to-cart-btn,
.lab-remove-from-cart-btn {
  border: 1.5px solid var(--lc-red);
  background: var(--lc-red);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--lc-font);
}

.lab-add-to-cart-btn:hover {
  background: var(--lc-red-dark);
  border-color: var(--lc-red-dark);
}

.lab-remove-from-cart-btn {
  background: var(--lc-red-light);
  color: var(--lc-red);
  border-color: rgba(194,25,26,.25);
}

.lab-remove-from-cart-btn:hover {
  background: var(--lc-red);
  color: #fff;
  border-color: var(--lc-red);
}

.lab-add-to-cart-btn:disabled,
.lab-remove-from-cart-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ─── Popup / Off-canvas shell ─────────────────────────────────────────────── */

.lab-offcanvas {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 430px;
  max-height: 85vh;
  background: white;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(4,15,51,.35);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.lab-offcanvas.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.lab-offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 15, 51, 0.55);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lab-offcanvas-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── Search bar ───────────────────────────────────────────────────────────── */

.lab-offcanvas-search {
  padding: 20px;
  position: relative;
}

.lab-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.lab-search-back {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--lc-navy);
  font-size: 22px;
  font-weight: 400;
  z-index: 3;
  background: transparent;
  line-height: 1;
  transition: color 0.2s;
}

.lab-search-back svg path{
  stroke: var(--lc-navy);
  transition: stroke .2s;
}

.lab-search-back:hover {
  color: var(--lc-red);
}
.lab-search-back:hover svg path{
  stroke: var(--lc-red);
}

.lab-search-clear {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--lc-navy);
  font-size: 16px;
  z-index: 3;
  background: transparent;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.lab-search-clear::before {
  content: "✕";
}

.lab-search-clear:hover {
  color: var(--lc-red);
  background: var(--lc-red-light);
}

.lab-search-clear.visible {
  display: flex;
}

.lab-offcanvas-search .lab-search-input {
  width: 100%;
  height: 48px;
  padding: 12px 45px !important;
  border: 1.5px solid var(--lc-line);
  border-radius: 13px;
  font-size: 14px;
  font-family: var(--lc-font);
  color: var(--lc-navy);
  background: var(--lc-bg);
  transition: all 0.2s ease;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.lab-offcanvas-search .lab-search-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--lc-red);
  box-shadow: 0 0 0 4px rgba(194,25,26,.08);
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */

.lab-offcanvas-tabs {
  padding: 0px 20px 20px 20px;
  background: #fff;
  border-bottom: 1px solid var(--lc-line);
}

.lab-tabs-inner {
  display: flex;
  position: relative;
  background: var(--lc-bg);
  border-radius: 13px;
  padding: 4px;
  gap: 0;
}

.lab-tab-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(4,15,51,.14);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  z-index: 0;
  pointer-events: none;
}

.lab-tab-slider.packages {
  transform: translateX(100%);
}

.lab-tab-btn {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--lc-muted);
  position: relative;
  z-index: 1;
  transition: color 0.22s ease;
  text-align: center;
  font-family: var(--lc-font);
}

.lab-tab-btn.active {
  color: var(--lc-red);
}

/* ─── Content area ─────────────────────────────────────────────────────────── */

.lab-offcanvas-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  border-radius: 20px;
  background-color: var(--lc-bg);
  min-height: 0;
}

.lab-tab-content {
  display: none;
}

.lab-tab-content.active {
  display: block;
}

.lab-products-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lab-no-products {
  text-align: center;
  color: var(--lc-muted);
  padding: 40px 20px;
  background: #fff;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  font-size: 14px;
}

/* ─── Load more ───────────────────────────────────────────────────────────── */

.lab-load-more-wrapper{
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.lab-load-more-btn{
  border: 1.5px solid var(--lc-red);
  background: var(--lc-red-light);
  color: var(--lc-red);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--lc-font);
  padding: 9px 22px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s ease;
}
.lab-load-more-btn:hover{
  background: var(--lc-red);
  color: #fff;
}

/* ─── Cart summary bar ─────────────────────────────────────────────────────── */

.lab-cart-summary {
  flex-shrink: 0;
  background: #ffffff;
  border-top: 1px solid var(--lc-line);
  padding: 15px 20px 15px 20px;
  box-shadow: 0 -4px 16px rgba(4,15,51,.05);
  border-radius: 0 0 24px 24px;
  z-index: 10;
  display: none;
}

.lab-cart-summary.has-items {
  display: block;
}

.lab-cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.lab-cart-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.lab-cart-icon {
  font-size: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--lc-red-light);
  flex-shrink: 0;
}

.lab-cart-details {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.lab-cart-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.lab-cart-total {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--lc-navy);
  line-height: 1.3;
}

.lab-cart-items {
  font-size: 12px;
  color: var(--lc-muted);
  font-weight: 500;
  line-height: 1.3;
}

.lab-view-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lc-muted);
  text-decoration: none;
  white-space: nowrap;
}

.lab-view-cart-link:hover {
  text-decoration: underline;
}

.lab-arrow {
  font-size: 16px;
  line-height: 1;
}

.lab-cart-right {
  flex-shrink: 0;
}

.lab-proceed-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(160deg, #e2413c 0%, var(--lc-red-dark) 100%);
  color: #fff;
  gap: 18px;
  border: none;
  border-radius: 13px;
  font-family: var(--lc-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 -2px 0 rgba(0,0,0,0.15) inset,
    0 10px 24px rgba(194,25,26,.4),
    0 2px 4px rgba(194,25,26,.25);
  transition: all 0.2s ease;
}
.lab-proceed-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 -2px 0 rgba(0,0,0,0.2) inset,
    0 16px 32px rgba(194,25,26,.48),
    0 4px 8px rgba(194,25,26,.3);
  color: #fff;
}
.lab-proceed-btn:active { transform: translateY(0); }
.lab-proceed-btn-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.18);
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-left: 10px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.lab-proceed-btn:hover .lab-proceed-btn-arrow { transform: translateX(3px); }

/* ─── Spinner / loading overlay ────────────────────────────────────────────── */

.lab-offcanvas-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10002;
}

.lab-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--lc-red-light);
  border-top: 4px solid var(--lc-red);
  border-radius: 50%;
  animation: lab-spin 0.9s linear infinite;
}

@keyframes lab-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─── Skeleton loader ──────────────────────────────────────────────────────── */

.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--lc-line);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: none;
}

.skeleton-line {
  height: 16px;
  background: linear-gradient(90deg, var(--lc-navy-light) 25%, #e2e5ee 50%, var(--lc-navy-light) 75%);
  background-size: 200% 100%;
  animation: lab-shimmer 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-line.short  { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long   { width: 100%; }
.skeleton-line.small  { width: 40%; height: 14px; }

.skeleton-button {
  width: 70px;
  height: 36px;
  background: linear-gradient(90deg, var(--lc-navy-light) 25%, #e2e5ee 50%, var(--lc-navy-light) 75%);
  background-size: 200% 100%;
  animation: lab-shimmer 1.5s infinite;
  border-radius: 40px;
}

@keyframes lab-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Search-active banner ─────────────────────────────────────────────────── */

.lab-search-active {
  background: var(--lc-red-light);
  padding: 11px 15px;
  margin-bottom: 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid var(--lc-red);
}

.lab-search-active span {
  color: var(--lc-navy);
  font-size: 13.5px;
  font-weight: 600;
}

.lab-clear-search {
  background: none;
  border: 1.5px solid var(--lc-red);
  color: var(--lc-red);
  padding: 5px 13px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--lc-font);
  transition: all 0.2s;
}

.lab-clear-search:hover {
  background: var(--lc-red);
  color: white;
}

/* ─── Parameters modal ─────────────────────────────────────────────────────── */

.lab-parameters-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 15, 51, 0.55);
  z-index: 10003;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lab-parameters-modal-content {
  background: white;
  border-radius: 18px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(4,15,51,.35);
}

.lab-parameters-modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--lc-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  border-radius: 18px 18px 0 0;
}

.lab-parameters-modal-header h3 {
  margin: 0;
  color: var(--lc-navy);
  font-size: 17px;
  font-weight: 800;
}

.lab-parameters-modal-close {
  background: var(--lc-bg);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--lc-muted);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.lab-parameters-modal-close:hover {
  color: var(--lc-red);
  background: var(--lc-red-light);
}

.lab-parameters-modal-body {
  padding: 20px;
}

/* ─── Parameters list ──────────────────────────────────────────────────────── */

.parameters-details {
  font-family: inherit;
}

.parameter-group {
  margin-bottom: 22px;
}

.package-group {
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.package-header {
  background: var(--lc-bg);
  padding: 13px 15px;
  font-weight: 700;
  color: var(--lc-navy);
  border-bottom: 1px solid var(--lc-line);
  font-size: 13.5px;
}

.parameter-badge {
  margin-left: 8px;
  padding: 3px 10px;
  background: var(--lc-green);
  color: white;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

.parameters-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.parameters-list li {
  padding: 11px 15px 11px 35px;
  border-bottom: 1px dashed var(--lc-line);
  position: relative;
  font-size: 13.5px;
  color: var(--lc-navy);
}

.parameters-list li:last-child {
  border-bottom: none;
}

.parameter-check {
  position: absolute;
  left: 13px;
  color: var(--lc-green);
  font-weight: 800;
}

.report-time {
  background: var(--lc-red-light);
  padding: 14px 15px;
  border-radius: 12px;
  margin-top: 18px;
  border-left: 3px solid var(--lc-red);
  color: var(--lc-navy);
  font-size: 13.5px;
}

.no-parameters {
  text-align: center;
  color: var(--lc-muted);
  padding: 30px;
  background: var(--lc-bg);
  border-radius: 14px;
}

/* ─── Floating button (kept for optional use) ──────────────────────────────── */

.lab-floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--lc-red);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 15px 25px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--lc-font);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(194,25,26,.35);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lab-floating-btn:hover {
  transform: translateY(-2px);
  background: var(--lc-red-dark);
  box-shadow: 0 14px 32px rgba(194,25,26,.42);
}

.lab-cart-count {
  background: var(--lc-navy);
  color: white;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  margin-left: 5px;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .lab-offcanvas {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: translate(0, 0) scale(0.9);
    transform-origin: center;
  }

  .lab-offcanvas.open {
    transform: translate(0, 0) scale(1);
  }

  .lab-offcanvas-content {
    max-height: calc(100vh - 200px);
  }

  .lab-cart-summary {
    border-radius: 0;
  }

  #lab-offcanvas-savings-banner{
    border-radius: 0;
  }

  .lab-floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
  }
}