:root {
  --ctm-brand: #ff5a5f;
}

body {
  background: #f7f7f9;
  -webkit-tap-highlight-color: transparent;
}

.btn-danger {
  background-color: var(--ctm-brand);
  border-color: var(--ctm-brand);
}

.ctm-fullmap {
  width: 100%;
}

/* Deterrent only (not real security) — right-click/save is also blocked via JS in app.js. */
.ctm-protected-img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.ctm-dropzone {
  border: 2px dashed #ced4da;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.ctm-dropzone:hover,
.ctm-dropzone:focus-visible,
.ctm-dropzone.ctm-dropzone-active {
  border-color: var(--ctm-brand);
  background-color: rgba(255, 90, 95, 0.06);
  outline: none;
}

.ctm-fullmap-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctm-fab {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.blink-soft {
  animation: ctm-blink-soft 1.6s ease-in-out infinite;
}

@keyframes ctm-blink-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ctm-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.ctm-map {
  width: 100%;
  height: 280px;
  border-radius: 12px;
}

@media (max-width: 576px) {
  .ctm-map {
    height: 220px;
  }
  .container, .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================
   Address autocomplete (geocoder)
   Same pattern as Ozroofracks (cart/helpers/address.php): the plain text
   input stays hidden — only the Mapbox geocoder's own input is visible,
   with a crosshairs button overlaid on the right.
========================= */

.ctm-geocoder {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder {
  position: relative !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 0.375rem !important;
  overflow: visible !important;
  background: none !important;
  box-shadow: none !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--input {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  height: 42px !important;
  padding-left: 0.9em !important;
  /* Room for the plugin's own clear/spinner icons (~8-30px) plus our crosshair beyond them */
  padding-right: 64px !important;
  background: #fff !important;
  margin: 0 !important;
  border-radius: 0.375rem !important;
  border: 1px solid #ced4da !important;
  box-shadow: none !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--icon-search {
  display: none !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--pin-right > *,
.ctm-geocoder .mapboxgl-ctrl-geocoder--button {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Our crosshairs button, positioned clear of the plugin's own clear/spinner
   icons (which sit around right:8px–30px) so they don't overlap. */
.ctm-geomarker {
  position: absolute !important;
  right: 38px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 99999 !important;
  color: var(--ctm-brand) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  font-size: 1em !important;
  line-height: 1 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ctm-directions-control {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  gap: 6px;
}

/* Suggestions dropdown */

.ctm-geocoder .suggestions {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 999998 !important;
  background: #fff !important;
  border: 1px solid #d9d9d9 !important;
  border-top: none !important;
  border-radius: 0 0 6px 6px !important;
  overflow: hidden !important;
  text-align: left !important;
  box-shadow: none !important;
}

.ctm-geocoder .suggestions > li,
.ctm-geocoder .mapboxgl-ctrl-geocoder--suggestion {
  color: #111 !important;
  text-align: left !important;
  cursor: pointer !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--suggestion:last-child {
  border-bottom: none !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--suggestion:hover,
.ctm-geocoder .active {
  background: #f5f5f5 !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--suggestion-title {
  color: #111 !important;
  font-weight: 600 !important;
}

.ctm-geocoder .mapboxgl-ctrl-geocoder--suggestion-address {
  color: #666 !important;
}


@media (max-width: 576px) {
  .ctm-geomarker {
    font-size: 1.4em !important;
  }
}
