/* CCGLS – minimal, theme-friendly styling (no dark blocks)
   - keep it light / inherit theme
   - dropdown always under input, scrollable
   - mobile friendly
   - handle OPC container quirks (.row negative margins / overflow / positioning)
*/

.ccgls{
  background: transparent;
  color: inherit;
  padding: 15px;
  box-sizing: border-box;
  width: 100%;
  font-size: 14px;
  line-height: 1.35;
  position: relative;
  /* IMPORTANT: avoid dropdown clipping in weird containers */
  overflow: visible;
}

.ccgls *{
  box-sizing: border-box;
}

.ccgls_info{
  margin: 0 0 10px 0;
  color: inherit;
  opacity: 0.9;
}

/* New: small status line (rate limit / loading hints) */
.ccgls_notice{
  margin: 0 0 10px 0;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
  color: inherit;
  font-size: 13px;
  line-height: 1.3;
}


/* Postal-code fallback warning: belongs directly to the search field. */
.ccgls_zip_notice{
  display: none;
  margin: 7px 0 4px 0;
  padding: 10px 12px;
  border: 1px solid #efb6bc;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f2633;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}

/* Alerts */
.ccgls .ccgls_success,
.ccgls .ccgls_error{
  margin: 8px 0;
}

/* Type bar */
.ccgls-typebar{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px 0;
}

.ccgls-typechk{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px !important;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  background: #f9f9f9;
  cursor: pointer;
  user-select: none;
}

.ccgls-typechk input{
  margin: 0;
}

.ccgls-typeicon{
  width: 30px;
  height: 30px;
  min-width: 30px;
  object-fit: contain;
  display: inline-block;
  border: 0;
  border-radius: 0;
}

/* Labels */
.ccgls-label{
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
  color: inherit;
}

/* City input + dropdown */
.ccgls-citywrap{
  position: relative;
  width: 100%;
  /* keep the absolute dropdown anchored to this box, not to some parent */
  display: block;
}

.ccgls_city_input{
  width: 100%;
}

/*
  Dropdown must ALWAYS be under the input.
  Some themes/OPC wrappers use transforms/positioning which can cause strange placement.
  By anchoring to .ccgls-citywrap and forcing full width, it stays aligned.
*/
.ccgls-city-dd{
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999; /* OPC overlays can be high */
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  overflow: hidden;
  /* prevent “floating to the side” feeling */
  transform: translate3d(0,0,0);
}

.ccgls-city-dd-list{
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 220px; /* comfortable */
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ccgls-city-dd-item{
  padding: 10px 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ccgls-city-dd-item:hover{
  background: rgba(0,0,0,0.05);
}

/* Point select */
.ccgls_point{
  width: 100%;
}

/* Details card */
.ccgls_details{
  position: relative;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #9fd2aa;
  border-radius: 12px;
  background: #edf9f0;
  color: #1f4d2b;
  box-shadow: 0 1px 3px rgba(30, 104, 52, 0.08);
}

.ccgls_details_title{
  font-weight: 700;
  margin-bottom: 8px;
  color: #246b36;
}

.ccgls_details_name{
  font-weight: 700;
  margin: 0 0 8px 0;
}

.ccgls_details_row{
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 6px 0;
}

.ccgls_details_row > span{
  display: inline-flex;
  width: 18px;
  min-width: 18px;
  height: 18px;
  opacity: 0.85;
}

.ccgls_details_addr,
.ccgls_details_phone,
.ccgls_details_email{
  color: inherit;
  opacity: 0.95;
  word-break: break-word;
}

/* Hours collapsible */
.ccgls_hours{
  margin-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.12);
  padding-top: 8px;
}

.ccgls_hours_sum{
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.ccgls_hours_sum::-webkit-details-marker{
  display: none;
}

.ccgls_details_hours{
  margin-top: 8px;
  white-space: pre-line;
  opacity: 0.95;
}

/* Map */
.ccgls_map_wrap{
  margin-top: 12px;
}

.ccgls_map_iframe{
  width: 100%;
  height: 220px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background: #f7f7f7;
}

.ccgls_map_actions{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ccgls_map_note{
  margin-top: 6px;
  opacity: 0.85;
}

/* ---- OPC / theme quirks ----
   Some templates wrap carrier-extra-content into a .row with negative margins.
   We can't safely remove that globally, but we can keep our module visually contained.
*/
.row.carrier-extra-content{
  padding-left: 8px;
  padding-right: 8px;
  overflow: visible; /* allow dropdown to overflow if needed */
}

/* Prevent weird horizontal overflow caused by negative margins in parent grid */
.ccgls[id^="ccgls_"]{
  max-width: 100%;
}

/* If theme uses transform on parent, dropdown can be clipped – we try to keep it visible */
#shipping_container,
#js-delivery,
#onepagecheckoutps,
#order-opc,
#checkout{
  overflow: visible;
}

/* Mobile tweaks */
@media (max-width: 575px){
  .ccgls{
    padding: 8px;
  }
  .ccgls-typebar{
    gap: 6px;
  }
  .ccgls-typechk{
    padding: 6px 8px;
    border-radius: 10px;
  }
  .ccgls-city-dd-list{
    max-height: 180px;
  }
  .ccgls_map_iframe{
    height: 180px;
  }
}

/* Tablet+ */
@media (min-width: 768px){
  .ccgls_details{
    padding: 16px;
  }
  .ccgls_map_iframe{
    height: 260px;
  }
}.ccgls-typeicon{position:relative;display:inline-block;width:30px;height:30px;min-width:30px;border:0;border-radius:0;opacity:.85}
.ccgls-locker-icon:before{content:"";position:absolute;left:4px;right:4px;top:3px;bottom:3px;border-top:1px solid currentColor;border-bottom:1px solid currentColor}
.ccgls-shop-icon:before{content:"";position:absolute;left:2px;right:2px;top:-4px;height:6px;border:1.5px solid currentColor;border-bottom:0;border-radius:3px 3px 0 0}
.ccgls_ico_pin:before{content:"\1F4CD"}.ccgls_ico_clock:before{content:"\1F552"}

.ccgls-checkout-disabled{opacity:.55!important;cursor:not-allowed!important;pointer-events:none!important;}
