/* =========================================================
   mAbs Process Tabs - Styles (Full Replacement)
   Fixes right-side layout with a grid-based column system
   ========================================================= */

/* Base */
.mabs-process-tabs {
  max-width: 100%;
  margin: 0 auto;
}

/* -----------------------------
   Tabs header + arrows
------------------------------ */

.mabs-process-tabs .tabs {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.mabs-process-tabs .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  height: 250px;
  flex: 1;
  padding: 16px;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid #5E97BB;
  border-radius: 10px 10px 0 0;
  background: #fff;
}

.mabs-process-tabs .tab.active {
  background-color: #002A48;
  color: #fff;
  border-color: #002A48;
}

.mabs-process-tabs .tab img {
  height: 85px;
  width: auto;
  margin-bottom: 10px;
}

.mabs-process-tabs .tab-text {
  font-size: 14px;
  height: 40px;
  line-height: 1.2;
  overflow: hidden;
}

/* Arrow pointing to the right */
.mabs-process-tabs .arrow-right {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #00406D;
  z-index: 10;
}

/* Arrow pointing down (only for active tab) */
.mabs-process-tabs .arrow-down {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid #ffffff;
  border-right: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid transparent;
}

/* Hide all down arrows by default */
.mabs-process-tabs .arrow-down {
  display: none;
}

/* Show only on the active tab */
.mabs-process-tabs .tab.active .arrow-down {
  display: block;
}

/* -----------------------------
   Tab content container
------------------------------ */

.mabs-process-tabs .tab-content {
  display: none;
  margin-top: 8px;
  background-color: #002A48;
  border-radius: 0 0 10px 10px;
  border: 1px solid #002A48;
  box-sizing: border-box;

  /* inner scroll */
  max-height: 650px;
  overflow-y: auto;
  padding: 24px;

  /* allow fixed overlays to feel clean near edges */
  overscroll-behavior: contain;
}

.mabs-process-tabs .tab-content.active {
  display: block !important;
}

.mabs-process-tabs .tab-content-inner {
  text-align: center;
  color: #fff;
}

.mabs-process-tabs .tab-content-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0;
}

.mabs-process-tabs .tab-content-description {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-top: 8px;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* -----------------------------
   Lanes layout (the rows)
------------------------------ */

.mabs-process-tabs .container-below-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 18px;
}

/* Each lane row: left tile + right box */
.mabs-process-tabs .icon-content-pair {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

/* Left lane tile */
.mabs-process-tabs .icon-container {
  position: relative;
  width: 175px;
  min-width: 175px;
  height: 172px;
  background: linear-gradient(to right, #00406D 0%, #025C7F 47%, #028293 100%);
  border-radius: 10px;
  border: 2px solid #5E97BB;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
}

/* your JS treats icon-container as non-interactive here */
.mabs-process-tabs .icon-container {
  cursor: default;
}

/* Down arrow under the lane tile */
.mabs-process-tabs .arrow-down-inner {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid #5E97BB;
  border-right: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid transparent;
}

/* Remove down arrow from the last lane */
.mabs-process-tabs .icon-content-pair:last-child .arrow-down-inner {
  display: none;
}

.mabs-process-tabs .icon-container img {
  height: 85px;
  width: auto;
  margin-bottom: 8px;
}

/* Right white box */
.mabs-process-tabs .flex-fill-container {
  flex: 1;
  min-width: 0; /* prevents overflow + weird wrap */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  height: 172px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
}

/* The columns wrapper */
.mabs-process-tabs .inner-flex-container {
  width: 100%;
  height: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0; /* keep divider lines clean */
}

/* Always show all right-side blocks */
.mabs-process-tabs .flex-fill-container {
  display: block;
}

/* Remove any “active-only” behavior */
.mabs-process-tabs .icon-container.active + .flex-fill-container {
  display: block;
}

/* -----------------------------
   Each column (support BOTH .section and .lane-col)
------------------------------ */

.mabs-process-tabs .section,
.mabs-process-tabs .lane-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 14px;
  box-sizing: border-box;
  position: relative;
}

/* Vertical dividers between columns */
.mabs-process-tabs .section:not(:last-child)::after,
.mabs-process-tabs .lane-col:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: #cfd6dc;
}

/* Column title */
.mabs-process-tabs .top-aligned-text {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.10;
  margin: 0 0 30px 0;
  color: #0b0f14;
  word-break: normal;
}

/* --------------------------------
   CTA Button (new .cta-btn)
   very muted, supports long names
---------------------------------- */

.mabs-process-tabs .cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0px;

  width: 100%;
  text-decoration: none;

  padding: 9px 11px;
  border-radius: 5px;

  background: rgba(2, 42, 72, 0.04);
  border: 1px solid rgba(2, 42, 72, 0.12);

  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mabs-process-tabs .cta-btn:hover {
  background: rgba(2, 42, 72, 0.06);
  border-color: rgba(2, 42, 72, 0.18);
}

.mabs-process-tabs .cta-btn:active {
  transform: translateY(1px);
}

.mabs-process-tabs .cta-label {
  font-size: 0.79rem;
  color: rgba(0,0,0,0.65);
  line-height: 1.10;

  /* allow long names */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.mabs-process-tabs .cta-btn .chev {
	display:none !important;
}

/* keep focus visible */
.mabs-process-tabs .cta-btn:focus {
  outline: none;
}
.mabs-process-tabs .cta-btn:focus-visible {
  outline: 2px solid rgba(94, 151, 187, 0.9);
  outline-offset: 2px;
}

/* Optional utility */
.text-md {
  font-size: 12px;
  font-weight: 500;
}

/* -----------------------------
   Responsive
------------------------------ */

@media (max-width: 768px) {

  /* Tabs */
  .mabs-process-tabs .tabs { gap: 5px; }
  .mabs-process-tabs .tab { height: 100px; padding: 5px; }
  .mabs-process-tabs .tab img { height: 38px; margin-bottom: 4px; }
  .mabs-process-tabs .tab-text { font-size: 2.8vw; font-weight: 500; height: auto; }

  /* Content panel height */
  .mabs-process-tabs .tab-content { padding: 16px; }

  /* Lanes become horizontally scrollable cards */
  .mabs-process-tabs .container-below-text {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 14px;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .mabs-process-tabs .icon-content-pair {
    flex: 0 0 auto;
    width: 328px;
    flex-direction: column;
    gap: 12px;
  }

  .mabs-process-tabs .icon-container {
    width: 328px;
    min-width: 328px;
    height: 240px;
  }

  .mabs-process-tabs .flex-fill-container {
    width: 328px;
    height: auto;
    padding: 14px;
  }

  /* Stack columns vertically on mobile */
  .mabs-process-tabs .inner-flex-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .mabs-process-tabs .section,
  .mabs-process-tabs .lane-col {
    padding: 0;
  }

  .mabs-process-tabs .section:not(:last-child),
  .mabs-process-tabs .lane-col:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid #ccc;
    padding-bottom: 14px;
  }

  .mabs-process-tabs .section:not(:last-child)::after,
  .mabs-process-tabs .lane-col:not(:last-child)::after {
    display: none;
  }
}

/* =========================================================
   CTA Preview Dialog (image + title only) — refined polish
   (drop-in replacement for your dialog CSS block)
   ========================================================= */

.mabs-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.20);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 9998;
}

.mabs-dialog-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mabs-dialog {
  position: fixed;
  z-index: 9999;

  /* Min size 300px, but still responsive */
  width: max(300px, min(360px, calc(100vw - 32px)));

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.20);
  overflow: hidden;

  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.mabs-dialog.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Close button stays top-right (no header row) */
.mabs-dialog .mabs-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;

  border: 1px solid rgba(0,0,0,0.12);

  /* Slightly more translucent at rest so it doesn't compete with the image */
  background: rgba(255,255,255,0.72);

  border-radius: 10px;
  width: 36px;
  height: 32px;
  cursor: pointer;

  font-size: 18px;
  line-height: 1;

  z-index: 2;
  backdrop-filter: blur(4px);

  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.mabs-dialog .mabs-dialog-close:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(0,0,0,0.16);
}

.mabs-dialog .mabs-dialog-close:active {
  transform: translateY(1px);
}

/* Image fills the container area */
.mabs-dialog .mabs-dialog-media {
  width: 100%;
  height: 240px;
  background: rgba(0,0,0,0.02);
}

.mabs-dialog .mabs-dialog-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Product name below image — tightened so it feels less like a big footer */
.mabs-dialog .mabs-dialog-title-wrap {
  padding: 10px 14px 12px;
}

.mabs-dialog .mabs-dialog-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;

  /* Optional: keeps long names clean without making the card tall */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile: centered modal layout */
@media (max-width: 720px) {
  .mabs-dialog {
    left: 16px !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: auto;
  }

  .mabs-dialog.is-open {
    transform: translateY(-50%) !important;
  }

  .mabs-dialog .mabs-dialog-media {
    height: 220px;
  }
}



/* =========================================================
   HARD OVERRIDES: ensure every lane shows its right-side box
   (protects against any older leftover accordion/hide CSS)
   ========================================================= */

.mabs-process-tabs .icon-content-pair {
  align-items: stretch;
}

.mabs-process-tabs .icon-content-pair .flex-fill-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mabs-process-tabs .icon-content-pair .inner-flex-container {
  display: grid !important;
}

@media (max-width: 768px) {
  .mabs-process-tabs .icon-content-pair .inner-flex-container {
    display: flex !important;
  }
}

