/*
 * Polish round 2, lane r2-owner-pages: owner-visible fixes that need a rendering rule (page data: bin/polish-r2-owner-pages.php).
 * Measurements: pekanai-build/qa/polish/r2-owner-pages/REPORT.md
 */

/* /ai-micro-saas/ WSJ photo card (0908efb): white copy + "Learn more" sat straight on a mid-purple photo
   (label 3.45:1, hover turned it black on purple). With the padding below, site-glass.js classifies the caption as a
   dark card on a photo (its V5 material paints the frosted wash; the background here is the no-JS fallback);
   the link stays white with a clear hover. */
body.page-id-24 .elementor-element-0908efb .elementor-element-d5d6161 {
  background: linear-gradient(180deg, rgb(12 8 28 / 58%), rgb(12 8 28 / 70%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

body.page-id-24 .elementor-element-0908efb .elementor-element-d5d6161 .elementor-element-d46ad95 {
  color: #fff;
}

body.page-id-24 .pk-r2-photo-link .elementor-button {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 180ms linear, text-underline-offset 180ms ease;
}

body.page-id-24 .pk-r2-photo-link .elementor-button :is(.elementor-button-text, .elementor-button-content-wrapper) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor;
}

body.page-id-24 .pk-r2-photo-link .elementor-button:is(:hover, :focus-visible) {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

body.page-id-24 .pk-r2-photo-link .elementor-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body.page-id-24 .elementor-element-0908efb .elementor-element-d5d6161 {
    background: #0c081c;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* /ai-trainers/ hero CTA (eacbe49) on the purple photo: the primary purple fill was 1.5:1 against the photo and a
   dark glass only 2.4:1 (the photo overlay is mid grey-violet). White variant (role pk-btn-secondary in the data):
   near-opaque white face, deep-purple label; hover stays light (a purple fill would melt into the photo again)
   with a purple rim and tint. */
body:is(.pk-glassified, #pk-r2) .elementor-widget-button.pk-r2-hero-cta .elementor-button:not(:where(.pk-src *, [class*="pk-s-"] *)) {
  color: var(--pk-color-purple-deep, #423ef3) !important;
  -webkit-text-fill-color: var(--pk-color-purple-deep, #423ef3);
  background: linear-gradient(115deg, rgb(255 255 255 / 97%), rgb(255 255 255 / 90%) 60%, rgb(255 255 255 / 95%)) !important;
  border: 1px solid #fff !important;
  box-shadow: inset 0 -1px 0 rgb(131 138 255 / 25%), 0 14px 30px -14px rgb(8 6 24 / 55%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
}

body:is(.pk-glassified, #pk-r2) .elementor-widget-button.pk-r2-hero-cta .elementor-button:not(:where(.pk-src *, [class*="pk-s-"] *)):is(:hover, :focus-visible) {
  color: var(--pk-color-purple-deep, #423ef3) !important;
  -webkit-text-fill-color: var(--pk-color-purple-deep, #423ef3);
  background: linear-gradient(rgb(89 86 233 / 12%), rgb(89 86 233 / 12%)), #fff !important;
  border-color: var(--pk-color-purple-core, #5956e9) !important;
  box-shadow: 0 16px 32px -14px rgb(8 6 24 / 70%) !important;
  transform: translateY(-1px);
}

body:is(.pk-glassified, #pk-r2) .elementor-widget-button.pk-r2-hero-cta .elementor-button:not(:where(.pk-src *, [class*="pk-s-"] *)):focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 3px !important;
}

/* Unixy library at <768px: unx-h03-04 is desktop-only on the source (83c5c23 is elementor-hidden-mobile), so its
   label bar sat on a 1px exhibit. Say so instead of showing an empty label. */
@media (max-width: 767px) {
  body.page-child.parent-pageid-987657 .pk-library-label + .elementor-widget:has(.pk-s-unx-h03-04)::before {
    content: "Desktop-only section: the source hides it below 768px. Open Preview at desktop width to see it.";
    display: block;
    margin: 0;
    padding: 18px 20px;
    border: 1px dashed rgb(255 255 255 / 28%);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #15141c;
    color: rgb(255 255 255 / 82%);
    font: 500 14px/1.45 "Museo Sans Rounded", system-ui, sans-serif;
  }
}

/* Headings on the owner's theme pages whose wrap left a top line 1.6-4x the second (qa/polish/r2-owner-pages/owner.py):
   balance gives near-equal lines. Two-line display headings with a 3-word text are handled by nbsp in the page data. */
body.pk-glassified :is(
  .elementor-element-415d6b1, .elementor-element-b089316, .elementor-element-459b980, .elementor-element-4e696fd,
  .elementor-element-ee1bac9, .elementor-element-84e4ab5, .elementor-element-9826068, .elementor-element-b20a49c,
  .elementor-element-6758c37f, .elementor-element-48ea6fec, .elementor-element-d55e221, .elementor-element-46597c6,
  .elementor-element-fe5f931
) :is(.elementor-heading-title, .elementor-widget-container > div) {
  text-wrap: balance;
}
