/*
 * DALMIA PRIME PAGE-FAMILY FIXES v1
 * Visual QA corrections for navigation, mobile, commerce and admin pages.
 */

/* Make the compact announcement row readable even without legacy CSS. */
.dc-offer-ticker{overflow:hidden!important}
.dc-ticker-track{
  display:flex!important;
  align-items:center!important;
  gap:38px!important;
  width:max-content;
  min-width:100%;
  white-space:nowrap;
}
.dc-ticker-track span{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto}
.dc-ticker-track span+span::before{content:"•";color:var(--dp-cyan);font-weight:900;margin-right:10px}

/* Legacy dropdowns must not remain permanently open after old CSS is retired. */
.dc-dropdown{position:relative;display:flex;align-items:center}
.dc-dropdown-panel{
  display:none!important;
  position:absolute!important;
  top:calc(100% + 8px);
  left:0;
  z-index:1200;
  min-width:250px;
  padding:8px!important;
  grid-template-columns:repeat(2,minmax(105px,1fr));
  gap:3px!important;
}
.dc-dropdown:hover>.dc-dropdown-panel,
.dc-dropdown:focus-within>.dc-dropdown-panel{display:grid!important}
.dc-dropdown-panel a{padding:8px 10px!important;white-space:nowrap}

/* Commerce/service/content hero family. */
body[data-page-type="commerce"] .dc-hero,
body[data-page-type="service"] .dc-hero,
body[data-page-type="content"] .dc-hero{
  position:relative;
  overflow:hidden!important;
  min-height:360px!important;
  background:
    radial-gradient(circle at 78% 40%,rgba(0,207,232,.2),transparent 30%),
    linear-gradient(112deg,#061747 0%,#0a2d72 58%,#06133e 100%)!important;
}
body[data-page-type="commerce"] .dc-hero>.dc-wrap.dc-grid,
body[data-page-type="service"] .dc-hero>.dc-wrap.dc-grid,
body[data-page-type="content"] .dc-hero>.dc-wrap.dc-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.75fr)!important;
  align-items:center!important;
  gap:34px!important;
  min-height:360px!important;
  padding-block:30px!important;
}
body[data-page-type="commerce"] .dc-hero h1,
body[data-page-type="service"] .dc-hero h1,
body[data-page-type="content"] .dc-hero h1{
  color:#fff!important;
  margin:10px 0!important;
  font-size:clamp(36px,5vw,66px)!important;
  line-height:.98!important;
  max-width:760px;
}
body[data-page-type="commerce"] .dc-hero .dc-lead,
body[data-page-type="service"] .dc-hero .dc-lead,
body[data-page-type="content"] .dc-hero .dc-lead{color:#dce9ff!important;max-width:740px!important;font-size:16px!important}
body[data-page-type="commerce"] .dc-hero .dc-pill,
body[data-page-type="service"] .dc-hero .dc-pill,
body[data-page-type="content"] .dc-hero .dc-pill{color:#84f3ff!important;border-color:rgba(0,207,232,.65)!important}
body[data-page-type="commerce"] .dc-hero .dc-visual,
body[data-page-type="service"] .dc-hero .dc-visual,
body[data-page-type="content"] .dc-hero .dc-visual{
  width:100%!important;
  height:300px!important;
  min-height:300px!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.08)!important;
  border:1px solid rgba(255,255,255,.16)!important;
}
body[data-page-type="commerce"] .dc-hero .dc-visual img,
body[data-page-type="service"] .dc-hero .dc-visual img,
body[data-page-type="content"] .dc-hero .dc-visual img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  opacity:1!important;
  transform:none!important;
}
body[data-page-type="commerce"] .dc-section,
body[data-page-type="service"] .dc-section,
body[data-page-type="content"] .dc-section{position:relative;z-index:2;background:#fff!important}
body[data-page-type="commerce"] .dc-section h2,
body[data-page-type="service"] .dc-section h2,
body[data-page-type="content"] .dc-section h2{color:var(--dp-ink)!important}
body[data-page-type="commerce"] .dc-cards,
body[data-page-type="service"] .dc-cards,
body[data-page-type="content"] .dc-cards{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important;margin-top:16px!important}
body[data-page-type="commerce"] .dc-card,
body[data-page-type="service"] .dc-card,
body[data-page-type="content"] .dc-card{padding:18px!important;min-height:130px!important;opacity:1!important;transform:none!important}
body[data-page-type="commerce"] .dc-card h3,
body[data-page-type="service"] .dc-card h3,
body[data-page-type="content"] .dc-card h3{color:var(--dp-ink)!important}

/* Blue CTA bands require an explicit light-on-dark content contract. */
body[data-page-type="commerce"] .dc-band h2,
body[data-page-type="service"] .dc-band h2,
body[data-page-type="content"] .dc-band h2,
body[data-page-type="commerce"] .dc-band h3,
body[data-page-type="service"] .dc-band h3,
body[data-page-type="content"] .dc-band h3{color:#fff!important}
body[data-page-type="commerce"] .dc-band p,
body[data-page-type="service"] .dc-band p,
body[data-page-type="content"] .dc-band p{color:#dce9ff!important}
body[data-page-type="commerce"] .dc-band .dc-list a,
body[data-page-type="service"] .dc-band .dc-list a,
body[data-page-type="content"] .dc-band .dc-list a{
  color:#fff!important;
  background:rgba(255,255,255,.1)!important;
  border-color:rgba(255,255,255,.22)!important;
  text-decoration:none!important;
}

/* Admin command-centre contrast. */
body[data-page-type="admin"] .setup-shell{color:var(--dp-text)!important}
body[data-page-type="admin"] .setup-shell>h1{color:var(--dp-ink)!important}
body[data-page-type="admin"] .setup-shell>.dc-lead{color:var(--dp-muted)!important}
body[data-page-type="admin"] .setup-panel{
  background:linear-gradient(145deg,#102a55,#172f53)!important;
  border:1px solid rgba(0,207,232,.24)!important;
  box-shadow:0 18px 46px rgba(7,24,65,.16)!important;
}
body[data-page-type="admin"] .setup-panel h2,
body[data-page-type="admin"] .setup-panel h3,
body[data-page-type="admin"] .setup-panel strong{color:#fff!important}
body[data-page-type="admin"] .setup-panel p,
body[data-page-type="admin"] .setup-panel small{color:#c7d7ef!important}
body[data-page-type="admin"] .setup-panel label{color:#e4eeff!important}
body[data-page-type="admin"] .setup-panel input,
body[data-page-type="admin"] .setup-panel select,
body[data-page-type="admin"] .setup-panel textarea{background:#fff!important;color:var(--dp-ink)!important;border-color:#b9cbe7!important}
body[data-page-type="admin"] .setup-status{background:#071a39!important;color:#cfe1ff!important}
body[data-page-type="admin"] .forced span{background:rgba(0,207,232,.12)!important;color:#dcecff!important}

/* Prevent visual QA or real users from seeing legacy reveal animations half-finished. */
body[data-dalmia-prime="true"] .dc-card,
body[data-dalmia-prime="true"] .dc-visual,
body[data-dalmia-prime="true"] .dc-hero h1,
body[data-dalmia-prime="true"] .dc-hero .dc-lead,
body[data-dalmia-prime="true"] .dc-hero .dc-pill,
body[data-dalmia-prime="true"] .dc-hero .dc-actions{opacity:1!important;transform:none!important}

@media(max-width:900px){
  body[data-page-type="commerce"] .dc-hero>.dc-wrap.dc-grid,
  body[data-page-type="service"] .dc-hero>.dc-wrap.dc-grid,
  body[data-page-type="content"] .dc-hero>.dc-wrap.dc-grid{grid-template-columns:1fr!important;min-height:0!important}
  body[data-page-type="commerce"] .dc-hero .dc-visual,
  body[data-page-type="service"] .dc-hero .dc-visual,
  body[data-page-type="content"] .dc-hero .dc-visual{height:230px!important;min-height:230px!important}
}

@media(max-width:760px){
  .dp-home .dc-nav{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    padding:7px 0!important;
  }
  .dp-home .dc-brand{min-width:0!important;overflow:hidden;font-size:15px!important}
  .dp-home .dc-brand span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dp-home .dc-nav>a[aria-label*="location"]{display:none!important}
  .dp-home .dc-nav>form{
    grid-column:1/-1!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  .dp-home .dc-links{display:none!important}
  .dp-category-ribbon__inner{width:calc(100% - 20px)!important}
  .dc-ticker-track{gap:24px!important;padding-inline:10px!important;font-size:10px!important}
  .dp-home .dp-home-hero__inner{padding-top:20px!important}
  .dp-home .dp-hero-visual{height:250px!important;align-items:center!important}
  .dp-home .dp-hero-visual img{object-fit:contain!important}
  .dp-home .dp-hero-facts{top:8px!important;right:4px!important;gap:5px!important}
  .dp-home .dp-hero-fact{min-width:140px!important;padding:7px 8px!important;font-size:9px!important}
  body[data-page-type="commerce"] .dc-cards,
  body[data-page-type="service"] .dc-cards,
  body[data-page-type="content"] .dc-cards{grid-template-columns:1fr!important}
}
