/* Atlas v6.19.8 — search meta toolbar + spelling correction cleanup */

/* The result summary now belongs to the main column, directly above Atlas AI. */
.a18-search-page .a18-result-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  min-width:0!important;
  margin:0 0 10px!important;
  padding:0 2px!important;
}
.a18-search-page .a18-result-toolbar .a18-result-meta{
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  color:#8591a6!important;
  font-size:11px!important;
  font-weight:500!important;
  line-height:1.45!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.a18-search-page .a18-result-toolbar .a18-result-meta [data-a18-result-count]{
  color:#718097!important;
}
.a18-search-page .a18-result-sort-slot{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  min-height:34px!important;
}
.a18-search-page .a18-result-sort-slot:empty{
  min-height:0!important;
}

/* Google CSE's duplicate result-count/order row stays in the DOM only as a
   native sort backend. Atlas owns the visible summary + control above AI. */
.a18-search-page .a18-results-panel .gsc-above-wrapper-area{
  display:none!important;
}

/* Sort control in the Atlas toolbar. */
.a18-search-page .a18-result-sort-slot .atlas-sort-control{
  display:block!important;
  position:relative!important;
  z-index:80!important;
}
.a18-search-page .a18-result-sort-slot .atlas-sort-trigger{
  min-width:174px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 10px 0 12px!important;
  border:1px solid #dfe5ef!important;
  border-radius:11px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(31,45,78,.025)!important;
}
.a18-search-page .a18-result-sort-slot .atlas-sort-prefix{
  color:#9aa5b7!important;
  font-size:9px!important;
  font-weight:500!important;
}
.a18-search-page .a18-result-sort-slot .atlas-sort-trigger-label{
  color:#455268!important;
  font-size:10px!important;
  font-weight:650!important;
}
.a18-search-page .a18-result-sort-slot .atlas-sort-menu{
  right:0!important;
  left:auto!important;
  min-width:174px!important;
}

/* Google spelling correction is not a search-result card. */
.a18-search-page .a18-results-panel .gsc-webResult.gsc-result.atlas-spelling-result,
.a18-search-page .a18-results-panel .gsc-result.atlas-spelling-result{
  margin:12px 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.a18-search-page .a18-results-panel .atlas-spelling-result .gsc-thumbnail-inside,
.a18-search-page .a18-results-panel .atlas-spelling-result .gsc-url-top{
  padding:0!important;
}
.a18-search-page .a18-results-panel .atlas-spelling-result .gs-spelling{
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.a18-search-page .atlas-spell-card{
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
  width:100%!important;
  min-width:0!important;
  padding:11px 12px!important;
  border:1px solid #e1e7f0!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fbfcff 0%,#f8faff 100%)!important;
  box-shadow:0 3px 12px rgba(42,59,94,.025)!important;
  color:#4e5c72!important;
  font-family:inherit!important;
}
.a18-search-page .atlas-spell-icon{
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:9px!important;
  background:#eef1ff!important;
  color:#6474e8!important;
}
.a18-search-page .atlas-spell-icon svg{
  width:16px!important;
  height:16px!important;
}
.a18-search-page .atlas-spell-copy{
  flex:1 1 auto!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}
.a18-search-page .atlas-spell-line{
  display:flex!important;
  align-items:baseline!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  color:#48566c!important;
  font-size:11px!important;
  line-height:1.4!important;
}
.a18-search-page .atlas-spell-query{
  color:#4159cf!important;
  font-size:11px!important;
  font-weight:700!important;
  text-decoration:none!important;
}
.a18-search-page .atlas-spell-query:hover{
  text-decoration:underline!important;
  text-underline-offset:2px!important;
}
.a18-search-page .atlas-spell-copy small{
  color:#9aa5b6!important;
  font-size:9px!important;
  line-height:1.35!important;
}
.a18-search-page .atlas-spell-original{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  min-height:32px!important;
  padding:0 11px!important;
  border:1px solid #dce3ee!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#57657a!important;
  font-size:9.5px!important;
  font-weight:620!important;
  line-height:1!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
.a18-search-page .atlas-spell-original:hover{
  border-color:#cfd8e7!important;
  background:#f9fbff!important;
  color:#3e4d65!important;
}

/* Safe fallback before JS decorates a just-inserted CSE correction node. */
.a18-search-page .a18-results-panel .gsc-result:has(.gs-spelling){
  min-height:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

@media (max-width:760px){
  .a18-search-page .a18-result-toolbar{
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:7px!important;
    margin-bottom:9px!important;
  }
  .a18-search-page .a18-result-toolbar .a18-result-meta{
    width:100%!important;
    white-space:normal!important;
  }
  .a18-search-page .a18-result-sort-slot{
    width:100%!important;
    justify-content:flex-start!important;
  }
  .a18-search-page .a18-result-sort-slot .atlas-sort-trigger{
    min-width:168px!important;
  }
  .a18-search-page .atlas-spell-card{
    align-items:flex-start!important;
    flex-wrap:wrap!important;
  }
  .a18-search-page .atlas-spell-copy{
    min-width:calc(100% - 44px)!important;
  }
  .a18-search-page .atlas-spell-original{
    margin-left:41px!important;
  }
}
