/* Stock ordering and clinical inputs: quiet surfaces, clear actions. */
html body[data-app-page="stock-order"] #stockOrderGrid {
  --fmt-card-frost-background: transparent;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body[data-app-page="stock-order"] :is(.stock-catalog-filter, .stock-tube-mode-toggle .group-chip) {
  text-decoration: none !important;
}
html body[data-app-page="stock-order"] .stock-catalog-filter[aria-pressed="true"] {
  color: #e6cf8c !important;
  font-weight: 700;
}
html body[data-app-page="home"] .clinical-workup-field-label {
  display: block;
  font-weight: 700;
  color: #fffdf8;
  margin-bottom: 6px;
}
html body[data-app-page="home"] .clinical-workup-actions {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  gap: 12px;
  padding-right: 0;
}
html body[data-app-page="home"] .clinical-workup-actions button {
  flex: 0 1 auto;
  width: auto;
}
html body[data-app-page="home"] #clinicalWorkupResetBtn {
  margin-left: auto;
}
html body[data-app-page="home"] #clinicalChoiceModal {
  background-color: #03111f;
  background-image: var(--fmt-scene-tone), url("../images/scene-reference-20261013.webp");
  background-position: center;
  background-size: cover;
}
html body[data-app-page="home"] #clinicalChoiceModal[data-choice-type="pregnancy"] {
  background-image:
    linear-gradient(90deg, rgba(3, 24, 42, .64), rgba(7, 31, 46, .24)),
    url("../images/scene-pregnancy-20261013.webp");
  background-position: center, 76% center;
}
html body[data-app-page="home"] #clinicalChoiceModal .clinical-choice-backdrop {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html body[data-app-page="home"] #clinicalChoiceModal .clinical-choice-sheet {
  background: transparent !important;
  backdrop-filter: blur(4px) saturate(1.04) !important;
  -webkit-backdrop-filter: blur(4px) saturate(1.04) !important;
}

html body[data-app-page="home"] #clinicalChoiceModal .clinical-choice-options {
  background: transparent;
}

html body[data-app-page="home"] #clinicalChoiceModal .clinical-choice-option {
  background: rgba(3, 17, 31, .06);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

html body[data-app-page="home"] #clinicalChoiceModal .clinical-choice-option:is(:hover, :focus-visible, .is-selected) {
  background: rgba(230, 207, 140, .1);
}

html body[data-app-page="home"] .clinical-workup-actions {
  flex-wrap: nowrap;
  flex-direction: row;
}
html body[data-app-page="home"] #clinicalWorkupSubmitBtn {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
}
html body[data-app-page="home"] #clinicalWorkupResetBtn {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  margin-left: 0;
}
/* Use the same accessible photographic choices on desktop and mobile. */
html body[data-app-page="home"] select.clinical-choice-native {
  display: none !important;
}
html body[data-app-page="home"] .clinical-choice-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 0;
  font: inherit;
  text-align: left;
}
html body[data-app-page="home"] .clinical-choice-trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body[data-app-page="home"] .clinical-choice-trigger-chevron {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Empty field hints can emphasize the clinical term without bold examples. */
#clinicalWorkupForm .clinical-hint-wrap {
  position: relative;
  width: 100%;
  font-size: .86rem;
  line-height: 1.42;
}
#clinicalWorkupForm .clinical-hint-wrap textarea {
  display: block;
  font: inherit;
  font-weight: 400;
  min-height: calc(2 * 1.42em + 26px);
}
#clinicalWorkupForm .clinical-hint-wrap textarea::placeholder {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  opacity: 0;
}
#clinicalWorkupForm .clinical-field-hint {
  position: absolute;
  inset: 1px 1px auto;
  padding: 12px;
  color: rgba(255, 253, 248, .72);
  font: inherit;
  font-weight: 400;
  pointer-events: none;
  text-transform: none;
  letter-spacing: normal;
}
#clinicalWorkupForm .clinical-field-hint strong {
  display: inline;
  color: #fffdf8;
  font-weight: 700;
}
#clinicalWorkupForm textarea:not(:placeholder-shown) ~ .clinical-field-hint {
  display: none;
}
@media (max-width: 860px) {
  #clinicalWorkupForm .clinical-hint-wrap { font-size: .84rem; }
}

/* Both actions share the same text centre line and touch target. */
#clinicalWorkupForm :is(#clinicalWorkupSubmitBtn, #clinicalWorkupResetBtn) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1.2;
  padding: 10px 12px;
  margin-top: 0;
  margin-bottom: 0;
}

/* Tube Plan controls use the site's restrained rectangular shape. */
html[data-theme] body #drawModal :is(#drawTestsToggleBtn, #drawClearAllBtn) {
  border-radius: 0;
}

/* Keep touch, wheel and keyboard scrolling without a visible scroll track. */
html[data-theme] body #drawModal :is(.draw-modal-card, .draw-planner-body, .draw-selected-list),
html[data-theme] body[data-app-page="find-my-tube"] #cardsContainer {
  scrollbar-width: none;
}
html[data-theme] body #drawModal :is(.draw-modal-card, .draw-planner-body, .draw-selected-list)::-webkit-scrollbar,
html[data-theme] body[data-app-page="find-my-tube"] #cardsContainer::-webkit-scrollbar {
  display: none;
}

/* Recognisable contact silhouettes, enlarged within the existing borderless targets. */
html body[data-app-page] :is(.site-menu-contact-link, .contact-sheet-action-icon, .home-help-actions a) svg.contact-real-icon {
  width: 38px;
  height: 38px;
  fill: currentColor;
  stroke: none;
  filter: none;
}
html body[data-app-page] .contact-sheet-action-icon {
  width: 38px;
  height: 38px;
}

body[data-app-page="stock-order"] .stock-cart-bar[hidden] { display: none; }
body[data-app-page="stock-order"] .stock-cart-bar {
  position: fixed;
  z-index: 1120;
  left: 50%;
  bottom: 18px;
  width: min(550px, calc(100% - 32px));
  transform: translateX(-50%);
}
body[data-app-page="stock-order"] .stock-cart-open {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(230, 207, 140, .55);
  border-radius: 9px;
  background: rgba(8, 30, 43, .94);
  color: #fff;
  box-shadow: 0 14px 34px rgba(2, 14, 23, .3);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
body[data-app-page="stock-order"] .stock-cart-open-copy { display: grid; gap: 2px; }
body[data-app-page="stock-order"] .stock-cart-open-copy small { color: #e6cf8c; }
body[data-app-page="stock-order"] .stock-cart-open:focus-visible,
body[data-app-page="stock-order"] .stock-cart-close:focus-visible { outline: 3px solid #e6cf8c; outline-offset: 3px; }
body[data-app-page="stock-order"] .stock-cart-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: min(90dvh, 850px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(230, 207, 140, .44);
  border-radius: 10px;
  background-color: #081d2b;
  background-image: var(--fmt-scene-tone), url("../images/scene-stock-20261013.webp");
  background-position: center, 72% center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #f8fbfb;
  box-shadow: 0 24px 70px rgba(2, 14, 23, .45);
}
body[data-app-page="stock-order"] .stock-cart-dialog::backdrop {
  background: rgba(2, 14, 23, .72);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
body[data-app-page="stock-order"] .stock-cart-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body[data-app-page="stock-order"] .stock-cart-dialog-head h2 { margin: 0; font-size: 1.4rem; }
body[data-app-page="stock-order"] .stock-cart-close {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(22, 55, 58, .2);
  border-radius: 6px;
  background: transparent;
  color: #f8fbfb;
  font: inherit;
  cursor: pointer;
}
body[data-app-page="stock-order"] .stock-cart-dialog-help { margin: 8px 0 18px; color: #cad8d9; }
body[data-app-page="stock-order"] .stock-cart-dialog .stock-order-form { margin-bottom: 18px; }
body[data-app-page="stock-order"] .stock-cart-dialog .stock-order-preview-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
/* Avoid stacking frosted wrappers over the photograph; frost individual fields and items. */
html[data-theme] body[data-app-page="stock-order"] #stockOrderCartDialog :is(.stock-order-form, .stock-order-preview-card, .stock-order-summary-item) {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0;
  box-shadow: none;
}
html[data-theme] body[data-app-page="stock-order"] #stockOrderCartDialog :is(.stock-order-field input, .stock-order-field select, .stock-order-field textarea, .stock-order-repeat-reason select, .stock-order-selected-card) {
  background: var(--fmt-card-frost-background) !important;
  backdrop-filter: var(--fmt-card-frost-filter) !important;
  -webkit-backdrop-filter: var(--fmt-card-frost-filter) !important;
}
html body[data-app-page="stock-order"] .stock-cart-dialog :is(.stock-order-field input, .stock-order-field select, .stock-order-field textarea, .stock-order-repeat-reason select) {
  background: transparent;
  border-color: rgba(255, 255, 255, .23);
  color: #f8fbfb;
}
body[data-app-page="stock-order"] .stock-cart-dialog :is(input, textarea)::placeholder { color: #c4d2d5; opacity: 1; }
body[data-app-page="stock-order"] .stock-cart-dialog select option { background: #102c3d; color: #fff; }
html body[data-app-page="stock-order"] .stock-cart-dialog :is(.stock-order-summary-item, .stock-order-selected-card) {
  background: transparent;
  border-color: rgba(255, 255, 255, .14);
}
html body[data-app-page="stock-order"] .stock-cart-dialog :is(.stock-order-request-head h3, .stock-order-selected-name, .stock-order-summary-value, .stock-order-request-meta, .stock-order-summary-label, .stock-order-selected-quantity) { color: #f8fbfb; }
body[data-app-page="stock-order"] .stock-cart-dialog .stock-order-selected-remove { color: #e6cf8c; }
html body[data-app-page="stock-order"] .stock-cart-dialog #submitStockOrderBtn { background: #e6cf8c; color: #102c3d; border-color: #e6cf8c; }
html body[data-app-page="stock-order"] .stock-cart-dialog #submitStockOrderBtn:disabled { opacity: .55; }
html body[data-app-page="stock-order"] .stock-cart-dialog #resetStockOrderBtn { color: #e6cf8c; border-color: rgba(230, 207, 140, .64); }
@media (max-width: 860px) {
  body[data-app-page="stock-order"] .stock-cart-bar { bottom: calc(env(safe-area-inset-bottom) + 82px); }
  body[data-app-page="stock-order"] .stock-cart-dialog { max-height: calc(100dvh - env(safe-area-inset-bottom) - 28px); padding: 16px; }
}
@media (max-width: 520px) {
  body[data-app-page="stock-order"] .stock-cart-dialog .stock-order-form { grid-template-columns: 1fr; }
  body[data-app-page="stock-order"] .stock-cart-dialog .stock-order-field { grid-column: 1; }
}

/* iOS WebKit composites nested backdrop filters unevenly. Let the enclosing
   frosted panel blur the scene once; its children retain their transparent fill.
   The cart's transparent wrappers are excluded so its fields still own their frost. */
@supports (-webkit-touch-callout: none) {
  html[data-theme] body[data-app-page] :is(
    .clinical-workup-panel,
    .draw-modal-card,
    .profile-modal-card,
    .contact-sheet-card,
    .about-info-modal-card,
    .legal-modal-card,
    .section-browse-modal-card,
    .stock-dashboard-card,
    .stock-dashboard-login-modal-card,
    .stock-dashboard-request-card
  ) > *,
  html[data-theme] body[data-app-page] #stockOrderPanel :is(.stock-order-form, .stock-order-request-card) > * {
    --fmt-card-frost-filter: none;
  }
}

/* A short, optional first-visit guide using the home page's existing lab scene. */
body[data-app-page="home"] .home-hero-guide-btn {
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #e6cf8c;
  font: inherit;
  font-size: .75rem;
  white-space: nowrap;
  cursor: pointer;
}
/* The walkthrough points to the real controls on each page. */
body.site-guide-open { overflow: hidden; }
body.site-guide-open #homeHeroCarousel * { animation: none !important; transition: none !important; }
/* Keep the menu control aligned with its close control and walkthrough target. */
html[data-theme] body #menuToggleBtn:is(:hover, :active) { transform: none !important; }
html body #homeIntroDialog.site-guide-dialog {
  position: fixed; inset: 0; margin: 0; padding: 0;
  width: 100%; height: 100dvh; max-width: none; max-height: none;
  border: 0; border-radius: 0; background: transparent; color: #fffdf8;
  overflow: hidden; box-shadow: none; font: inherit;
}
.site-guide-dialog::backdrop { background: transparent; }
.site-guide-spotlight {
  position: absolute; box-sizing: border-box; border: 2px solid #e6cf8c;
  border-radius: 4px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(2, 12, 23, .72);
}
.site-guide-spotlight[hidden] { display: none; }
.site-guide-panel {
  position: absolute; box-sizing: border-box; width: min(420px, calc(100% - 24px));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 110px); overflow: hidden; padding: 18px;
  border: 1px solid rgba(230, 207, 140, .55); border-radius: 4px;
  background: linear-gradient(120deg, #081e30, #14252d 65%, #30271d);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.site-guide-top, .site-guide-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.site-guide-top { color: #e6cf8c; font-size: .8rem; margin-bottom: 8px; }
.site-guide-actions { margin-top: 16px; }
.site-guide-copy { overflow: auto; }
.site-guide-copy:focus-visible { outline: 2px solid #e6cf8c; outline-offset: -2px; }
.site-guide-panel h2 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.25; color: #fffdf8; }
.site-guide-panel p { margin: 0; font-size: .93rem; line-height: 1.5; color: #d8e3e6; }
.site-guide-panel button { min-height: 44px; padding: 8px 14px; border: 1px solid rgba(255, 253, 248, .3); border-radius: 3px; color: #fffdf8; background: transparent; font: inherit; cursor: pointer; }
.site-guide-panel #skipHomeIntroBtn { border-color: transparent; }
.site-guide-panel #nextHomeIntroBtn { background: #e6cf8c; border-color: #e6cf8c; color: #102c3d; }
.site-guide-panel button:disabled { opacity: .4; cursor: default; }
.site-guide-panel button:focus-visible { outline: 2px solid #e6cf8c; outline-offset: 3px; }
@media (max-height: 500px) {
  .site-guide-panel { padding: 12px; max-height: calc(100dvh - 200px); }
  .site-guide-top { margin-bottom: 4px; }
  .site-guide-actions { margin-top: 8px; }
  .site-guide-panel h2 { font-size: 1.05rem; margin-bottom: 6px; }
  .site-guide-panel p { font-size: .85rem; line-height: 1.4; }
}

/* Ordering units stay visible before and after expanding an item. */
html[data-theme] body[data-app-page="stock-order"] .stock-order-item-card .stock-order-item-kicker {
  display: block !important; font-size: .78rem; line-height: 1.35;
  color: #d8e3e6; white-space: normal;
}

.stock-availability-notice {
  margin: 10px 0; padding: 10px 12px; border-left: 2px solid #e6cf8c;
  background: rgba(230, 207, 140, .08); color: #fff1c9;
  font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere;
}
.stock-availability-notice p { margin: 4px 0 0; }
.stock-item-unavailable { color: #f1d18a !important; font-weight: 600; }
.stock-availability-editor { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .18); }
.stock-availability-editor h4 { margin: 0 0 8px; }
.stock-availability-editor p { font-size: .88rem; line-height: 1.5; }
.stock-availability-editor fieldset { margin: 12px 0; padding: 0; border: 0; min-width: 0; }
.stock-availability-editor legend { font-size: .88rem; font-weight: 600; }
.stock-availability-editor label { min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; }
.stock-availability-editor label span { min-width: 0; overflow-wrap: anywhere; }
.stock-availability-editor input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; accent-color: #e6cf8c; }
.stock-availability-editor-status { min-height: 1.5em; }

/* Each order owns its update state, with confirmation kept beside the action. */
.stock-dashboard-request-number { display: block; margin-top: 4px; font-size: .75rem; overflow-wrap: anywhere; color: #c9d8e2; }
.stock-dashboard-status-primary { min-height: 44px; font-weight: 600; }
.stock-dashboard-status-other { width: 100%; font-size: .88rem; }
.stock-dashboard-status-other summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.stock-dashboard-status-other[open] { display: grid; gap: 8px; }
.stock-dashboard-request-feedback { flex-basis: 100%; margin: 8px 0 0; font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.stock-dashboard-request-feedback[data-kind="error"], .stock-dashboard-request-feedback[data-kind="unconfirmed"] { color: #ffd2bd; }
.stock-dashboard-request-feedback[data-kind="success"] { color: #c6e9ce; }
.stock-dashboard-status-confirm { display: grid; gap: 8px; width: 100%; }
.stock-dashboard-status-confirm .stock-dashboard-request-feedback { margin: 0; }
.stock-dashboard-update-receipt { margin: 0 0 14px; padding: 12px; border-left: 2px solid #b9d7c1; background: rgba(185, 215, 193, .08); }
.stock-dashboard-update-receipt p { margin: 0 0 8px; overflow-wrap: anywhere; }
.stock-dashboard-status-btn:disabled { opacity: .65; cursor: wait; }
html[data-theme] body[data-app-page="stock-dashboard"] #stockDashboardRequestList .stock-dashboard-status-primary {
  border-radius: 4px !important; background: #e6cf8c !important; color: #102c3d !important;
  border: 1px solid #e6cf8c !important;
}
html[data-theme] body[data-app-page="stock-dashboard"] .stock-dashboard-request-feedback {
  padding: 8px; background: rgba(3, 17, 31, .8); color: #fff1c9;
}
html[data-theme] body[data-app-page="stock-dashboard"] .stock-dashboard-request-feedback[data-kind="error"],
html[data-theme] body[data-app-page="stock-dashboard"] .stock-dashboard-request-feedback[data-kind="unconfirmed"] { color: #ffd2bd; }
html[data-theme] body[data-app-page="stock-dashboard"] .stock-dashboard-request-feedback[data-kind="success"] { color: #c6e9ce; }
.stock-dashboard-status-other summary { gap: 8px; }
html[data-theme] body[data-app-page="stock-dashboard"] .stock-dashboard-status-other summary { color: #fffdf8; text-shadow: 0 1px 3px #03111f; }
.stock-dashboard-status-confirm button { border-radius: 4px !important; }
.stock-dashboard-update-receipt { color: #fffdf8; background: rgba(3, 17, 31, .8); }

.push-controls { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.push-controls h4 { margin: 0 0 8px; }
.push-controls-status { margin: 0 0 10px; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.push-controls-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-controls-actions button { min-height: 44px; }
#labPushPanel .push-controls { margin-top: 0; padding-top: 0; border-top: 0; }

/* Push actions distinguish an available test from a blocked browser permission. */
html[data-theme] body[data-app-page] .push-controls-actions button:not(:disabled) {
  opacity: 1 !important;
  color: #fffdf8 !important;
  background: transparent !important;
  border-color: rgba(230, 207, 140, .65) !important;
  cursor: pointer;
}
html[data-theme] body[data-app-page] .push-controls-actions [data-push-test]:not(:disabled) {
  color: #102c3d !important;
  background: #e6cf8c !important;
}
html[data-theme] body[data-app-page] .push-controls-actions button:disabled {
  opacity: .45 !important;
  cursor: not-allowed;
}
html[data-theme] body[data-app-page] .push-controls-actions button:focus-visible {
  outline: 2px solid #bbdbe9;
  outline-offset: 3px;
}

.push-device-checks { margin: 12px 0 0; padding-left: 20px; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.push-device-checks li + li { margin-top: 6px; }
