/* Rudi apps v80 — mobile polish, light theme consistency, consent/nav layering */

/* Better light theme surfaces across the current site. */
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 7%, rgba(63, 122, 255, .08), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(150, 81, 255, .07), transparent 24%),
    #f5f7fc !important;
  color:#151b2a !important;
}
html[data-theme="light"] .site-header{
  background:rgba(250,251,255,.94)!important;
  border-bottom-color:rgba(37,53,88,.10)!important;
  box-shadow:0 8px 26px rgba(42,53,82,.04)!important;
}
html[data-theme="light"] .site-footer{
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(241,244,250,.78))!important;
  border-top-color:rgba(39,55,88,.09)!important;
}
html[data-theme="light"] .footer-brand strong,
html[data-theme="light"] .footer-links b,
html[data-theme="light"] .footer-socials b{color:#1c2333!important}
html[data-theme="light"] .footer-grid p,
html[data-theme="light"] .footer-grid small,
html[data-theme="light"] .footer-grid a{color:#657087!important}

html[data-theme="light"] .mobile-about-card,
html[data-theme="light"] .mobile-news-compact,
html[data-theme="light"] .mobile-social-row a,
html[data-theme="light"] .mobile-idea-card,
html[data-theme="light"] .mobile-ecosystem-list{
  background:linear-gradient(145deg,#ffffff,#f7f8fd)!important;
  border-color:rgba(49,67,108,.11)!important;
  color:#171d2c!important;
  box-shadow:0 10px 28px rgba(40,53,83,.06)!important;
}
html[data-theme="light"] .mobile-about-card strong,
html[data-theme="light"] .mobile-news-compact strong,
html[data-theme="light"] .mobile-social-row strong,
html[data-theme="light"] .mobile-idea-card strong,
html[data-theme="light"] .mobile-section-title span{color:#1a2131!important}
html[data-theme="light"] .mobile-about-card small,
html[data-theme="light"] .mobile-news-compact small,
html[data-theme="light"] .mobile-news-compact time,
html[data-theme="light"] .mobile-ecosystem-list small{color:#69758c!important}
html[data-theme="light"] .mobile-news-compact>a,
html[data-theme="light"] .mobile-ecosystem-list>a{border-color:rgba(50,68,106,.08)!important}
html[data-theme="light"] .mobile-hub-account{
  background:linear-gradient(145deg,#f4f1ff,#ffffff)!important;
  color:#684fd1!important;
  border-color:rgba(103,78,207,.16)!important;
}
html[data-theme="light"] .lang-switch,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .nav-toggle,
html[data-theme="light"] .account-mobile{
  background:rgba(255,255,255,.78)!important;
  border-color:rgba(48,64,99,.12)!important;
  color:#20283a!important;
}

/* Generic dark-card leftovers that looked pasted onto the light page. */
html[data-theme="light"] .catalog-card,
html[data-theme="light"] .product-catalog-card,
html[data-theme="light"] .featured-product-card,
html[data-theme="light"] .building-card,
html[data-theme="light"] .social-card,
html[data-theme="light"] .support-card,
html[data-theme="light"] .news-catalog-card,
html[data-theme="light"] .news-featured-card,
html[data-theme="light"] .privacy-content article,
html[data-theme="light"] .legal-content article,
html[data-theme="light"] .legal-toc,
html[data-theme="light"] .legal-draft-card{
  background:#ffffff!important;
  border-color:rgba(44,62,102,.10)!important;
  color:#171d2c!important;
  box-shadow:0 10px 30px rgba(40,53,83,.05)!important;
}
html[data-theme="light"] .catalog-card p,
html[data-theme="light"] .product-catalog-card p,
html[data-theme="light"] .featured-product-card p,
html[data-theme="light"] .building-card p,
html[data-theme="light"] .social-card small,
html[data-theme="light"] .support-card p,
html[data-theme="light"] .news-catalog-card p,
html[data-theme="light"] .news-featured-card p,
html[data-theme="light"] .privacy-content article p,
html[data-theme="light"] .legal-copy p,
html[data-theme="light"] .legal-copy li,
html[data-theme="light"] .legal-toc a{color:#667188!important}

/* Analytics must never be covered by site navigation. */
.analytics-consent{
  z-index:30000!important;
}
body.rudi-consent-open .rudi-mobile-bottom-nav{
  opacity:0!important;
  pointer-events:none!important;
  transform:translateY(calc(100% + 28px))!important;
}

/* Mobile footer accordion is progressive enhancement: JS adds the marker class. */
@media (max-width:700px){
  body{padding-bottom:68px!important}

  .rudi-mobile-bottom-nav{
    left:14px!important;
    right:14px!important;
    bottom:max(4px, env(safe-area-inset-bottom))!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
    padding:4px!important;
    gap:3px!important;
    border-radius:17px!important;
    z-index:10000!important;
    transition:transform .24s ease,opacity .2s ease!important;
    will-change:transform,opacity;
  }
  .rudi-mobile-bottom-nav>a{
    height:48px!important;
    max-height:48px!important;
    padding:3px 2px!important;
    grid-template-rows:23px auto!important;
    border-radius:12px!important;
  }
  .rudi-mobile-bottom-nav a>span{
    width:23px!important;
    height:23px!important;
    border-radius:8px!important;
    font-size:12px!important;
  }
  .rudi-mobile-bottom-nav a>small{
    font-size:8px!important;
    line-height:1!important;
  }
  .rudi-mobile-bottom-nav.rudi-nav-hidden{
    opacity:0!important;
    pointer-events:none!important;
    transform:translateY(calc(100% + 28px))!important;
  }

  .analytics-consent{
    left:12px!important;
    right:12px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-height:min(72vh,620px)!important;
    overflow:auto!important;
    gap:10px!important;
    padding:15px!important;
    border-radius:18px!important;
  }
  .analytics-consent__copy strong{font-size:17px!important}
  .analytics-consent__copy p{font-size:13px!important;line-height:1.48!important}
  .analytics-consent__actions{gap:8px!important}
  .analytics-consent__details{font-size:12px!important;padding:0 2px 1px!important}
  .analytics-consent__button{min-height:42px!important;padding:9px 10px!important;font-size:12px!important}

  .site-footer.rudi-footer-enhanced .footer-grid{
    gap:12px!important;
    padding-bottom:18px!important;
  }
  .site-footer.rudi-footer-enhanced .footer-links{
    display:block!important;
    padding:0!important;
    border-top:1px solid rgba(120,138,177,.10);
  }
  .site-footer.rudi-footer-enhanced .footer-links>b{
    position:relative;
    display:block!important;
    padding:15px 28px 15px 0!important;
    cursor:pointer;
    user-select:none;
  }
  .site-footer.rudi-footer-enhanced .footer-links>b::after{
    content:'⌄';
    position:absolute;
    right:2px;
    top:50%;
    transform:translateY(-50%);
    color:#8e7cff;
    transition:transform .2s ease;
  }
  .site-footer.rudi-footer-enhanced .footer-links.is-open>b::after{
    transform:translateY(-50%) rotate(180deg);
  }
  .site-footer.rudi-footer-enhanced .footer-links:not(.is-open)>a{display:none!important}
  .site-footer.rudi-footer-enhanced .footer-links.is-open>a{
    display:block!important;
    padding:7px 0!important;
  }
  .site-footer.rudi-footer-enhanced .footer-socials{padding-top:4px!important}
}

@media (prefers-reduced-motion:reduce){
  .rudi-mobile-bottom-nav{transition:none!important}
}
.rudi-legal-language-note{
  margin-top:18px!important;
  margin-bottom:0!important;
  padding:12px 14px!important;
  border:1px solid rgba(90,111,180,.16);
  border-radius:14px;
  background:rgba(83,102,171,.08);
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
}
html[data-theme="light"] .rudi-legal-language-note{
  background:#f4f6fd;
  border-color:rgba(47,65,109,.10);
  color:#667188;
}
