/* Occuspace inline Case Study widget — v1 (prototype: cre-lease-renewal) */

/* ---------- In-section link ---------- */
.cs-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cs-inline-icon {
  order: -1;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(11, 17, 22, 0.10));
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.cs-inline-text {
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #249ED4;
  transition: color 140ms ease;
}
.cs-inline-text .cs-inline-label {
  color: #0B1116;
  font-weight: 700;
}
.cs-inline-link:hover .cs-inline-text { color: #1A7AA6; text-decoration: underline; text-underline-offset: 3px; }
.cs-inline-link:hover .cs-inline-icon { transform: translateY(-1px); }
.cs-inline-link:active .cs-inline-icon { transform: scale(0.99); }

/* ---------- Popup overlay ---------- */
.cs-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(11, 17, 22, 0.6);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cs-popup-overlay.cs-open { display: flex; animation: csFadeIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes csFadeIn { from { opacity: 0; } to { opacity: 1; } }
html.cs-noscroll, html.cs-noscroll body { overflow: hidden !important; }

/* ---------- Popup card ---------- */
.cs-popup-card {
  position: relative;
  display: grid;
  grid-template-columns: 264px 1fr;
  width: 100%;
  max-width: 760px;
  max-height: min(86vh, 720px);
  background: #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(11, 17, 22, 0.35);
  animation: csCardIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  text-align: left;
}
@keyframes csCardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .cs-popup-overlay.cs-open, .cs-popup-card { animation: none; }
}

/* Left: image panel (1:1 placeholder until final imagery lands) */
.cs-popup-media {
  position: relative;
  background: #E5ECF1;
  min-height: 264px;
}
.cs-popup-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-popup-media .cs-media-bars {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 5px;
}
.cs-popup-media .cs-media-bars span { width: 34px; height: 12px; border-radius: 2px; }
.cs-popup-media .cs-media-bars span:nth-child(1) { background: #674EA7; }
.cs-popup-media .cs-media-bars span:nth-child(2) { background: #C6D3DD; }
.cs-popup-media .cs-media-bars span:nth-child(3) { background: #249ED4; }
.cs-popup-media .cs-media-bars span:nth-child(4) { background: #5AC4C4; }

/* Right: copy */
.cs-popup-body {
  padding: 40px 40px 28px;
  overflow-y: auto;
  max-height: min(86vh, 720px);
}
.cs-popup-eyebrow {
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #674EA7;
  margin: 0 0 10px;
}
.cs-popup-eyebrow::before {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: #674EA7;
  margin-bottom: 10px;
}
.cs-popup-hook {
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: #0B1116;
  margin: 0 0 16px;
  text-wrap: balance;
}
.cs-popup-copy {
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #2A323A;
}
.cs-popup-copy p { margin: 0 0 14px; }

/* Footer links */
.cs-popup-footer {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #E5ECF1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.cs-popup-footer a {
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #249ED4;
  text-decoration: none;
}
.cs-popup-footer a:hover { color: #1A7AA6; text-decoration: underline; text-underline-offset: 3px; }

/* Close button */
.cs-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 17, 22, 0.06);
  color: #0B1116;
  font-size: 18px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  transition: background 140ms ease;
  z-index: 2;
  padding: 0;
}
.cs-popup-close:hover { background: rgba(11, 17, 22, 0.12); }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .cs-popup-card { grid-template-columns: 1fr; max-height: 88vh; }
  .cs-popup-media { min-height: 0; aspect-ratio: 2.2 / 1; }
  .cs-popup-body { padding: 24px 20px 20px; max-height: none; }
  .cs-popup-hook { font-size: 20px; }
  .cs-inline-text { font-size: 15px; }
}

/* ---------- Section image fill boost (desktop) ----------
   Template images render ~87% of column with baked-in whitespace.
   Boost to 114% but ALWAYS extend OUTWARD (away from the copy column)
   so the established gutter between image and copy is preserved. */
@media (min-width: 768px) {
  /* Image on the RIGHT of copy: grow rightward (default LTR growth) */
  #sol-right-sizing .image-21,
  #sol-cost-of-guessing .image-21,
  #sol-hvac .image-21,
  #sol-food-service .image-21,
  #sol-real-estate .image-21,
  #cre-lease-renewal .image-21 {
    width: 114%;
    max-width: none;
  }
  /* Image on the LEFT of copy: grow leftward (pull outward, keep right edge) */
  #sol-workplace .heat-map-image,
  #sol-cleaning .image-21,
  #sol-portfolio-planning .image-21,
  #cre-space-types .heat-map-image,
  #cre-neighborhoods .image-21,
  #highered-libraries .image-21,
  #highered-capital-planning .image-21 {
    width: 114%;
    max-width: none;
    margin-left: -14%;
  }
}
