/* =========================
   GeoNB CTS - AEM-aligned styling (v4)
   ========================= */

html, body { margin: 0; padding: 0; }

body {
  background: #f4f4f4;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  font-size: 16px;
  line-height: 1.4;
}

/* Page wrapper */
.aem-page { padding: 0 0 4rem; }

/* Full-width hero (matches AEM sample) */
.aem-hero{
  background:#006055;
  padding:2.75rem 1rem 3rem;
}

.aem-hero-inner{
  max-width:1200px;
  margin:0 auto;
}

.aem-breadcrumbs{
  font-size:0.95rem;
  font-weight:600;
  color:#fff;
}

.aem-breadcrumbs a{
  color:#fff;
  text-decoration:underline;
}

.aem-breadcrumbs .sep{
  padding:0 0.5rem;
  opacity:0.9;
}

.aem-hero-rule{
  margin:1.25rem 0 1.75rem;
  height:1px;
  background:rgba(255,255,255,0.35);
}

.aem-hero .PageTitle{
  color:#fff;
  margin:0;
  font-size:4rem;
  line-height:1.05;
  font-weight:700;
  font-family: Georgia, "Times New Roman", Times, serif;
  letter-spacing: -0.01em;
}

.aem-hero .VerText{
  margin:1.25rem 0 0;
  color:#fff;
  font-size:1.35rem;
  line-height:1.4;
  max-width:60rem;
}

.aem-links{ margin-top: 0.9rem; }

.aem-sep{ padding: 0 0.5rem; color: rgba(255,255,255,0.85); }

.aem-hero a.ctslink:link,
.aem-hero a.ctslink:visited,
.aem-hero a.CTSLink:link,
.aem-hero a.CTSLink:visited{
  color:#fff;
  text-decoration: underline;
  font-weight: 600;
  font-size: 1rem;
}

.aem-hero a.ctslink:hover,
.aem-hero a.CTSLink:hover{ text-decoration: none; }

/* Main content area under hero */
.aem-content { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 0; }

.cts-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 1rem;
}

/* Make the CTS app tall enough so results show without scrolling */
#borderContainer{
  width: min(100%, 1200px);
  height: calc(100vh - 320px); /* hero + page chrome */
  min-height: 820px;
  margin: 0 auto;
}

.aem-disclaimer {
  max-width: 1200px;
  margin: 2rem auto 0 auto;
  padding: 0;
}

/* Links (outside hero) */
a.ctslink:link,
a.ctslink:visited,
a.CTSLink:link,
a.CTSLink:visited {
  color: #005a4f;
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.95rem;
}

a.ctslink:hover,
a.CTSLink:hover { text-decoration: none; }

a.ctslink:active,
a.CTSLink:active { text-decoration: underline; }

/* GeoNB CTS - functional styles (kept) */
label.input { font-size: 13px; }

textarea { resize: none; }

/* Loader overlay */
#loader{
  padding:0;
  margin:0;
  position:fixed;
  inset:0;
  background:rgba(255,255,255,0.75);
  z-index:9999;
}

#loaderInner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  background-image: url('loader_lg.gif');
  background-repeat: no-repeat;
}

/* Disclaimer text styles */
.PageText{font-size:1rem;color:#222;margin:0 0 0.75rem 0;}
.PageParaTitle{font-size:1.35rem;font-weight:700;margin:1.5rem 0 0.75rem 0;color:#222;}

/* Coordinate system properties area */
.coordProperties { font-size: 90%; }

.coordPropertiesCellVal {
  background-color: white;
  color: rgb(119, 118, 118);
}

.coordPropertiesLabel {
  color: rgb(63, 62, 62);
  font-weight: bold;
}

/* Drag/drop upload */
#drop-area {
  border: 2px dashed white;
  border-radius: 10px;
  padding: 5px;
}

#drop-area.highlight { border-color: #ccc; }

/* Spacing so initial results show without scrolling */
.dijitContentPane {
  padding: 0.75rem;
  padding-bottom: 2rem;
}

.dijitButton { margin-bottom: 1.25rem; }

/* Make the green hero full width even if nested inside a max-width container */
.aem-hero{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Mobile tuning */
@media (max-width: 600px){

  .aem-hero{
    padding: 1.5rem 1rem 1.75rem; /* less vertical space */
  }

  .aem-hero-rule{
    margin: 0.9rem 0 1.1rem;
  }

  .aem-hero .PageTitle{
    font-size: 2.35rem;  /* was huge on mobile */
    line-height: 1.05;
  }

  .aem-hero .VerText{
    font-size: 1.05rem;
    margin-top: 0.9rem;
  }

  .aem-breadcrumbs{
    font-size: 0.85rem;
  }

  /* Let the CTS app use the phone width */
  #borderContainer{
    width: 100%;
    min-width: 0;
    border-radius: 6px;
  }

  /* Give the app more of the viewport height on phones */
  #borderContainer{
    height: calc(100vh - 320px);
    min-height: 560px;
  }
}
/* Prevent legacy fixed-width tables from breaking mobile layout */
@media (max-width: 600px){
  table[width]{
    width: 100% !important;
  }
}
