#cac-container {
  padding: 1.5em;
  background-color: #a9c675;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
#cac-form {
  display: flex;
  gap: 0.5em; /* Add spacing between input and button */
  align-items: stretch; /* Make both elements the same height */
}
#cac-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  display: none;
}
#cac-address {
  flex: 1; /* Allow input to grow and fill available space */
  padding: 0.75em;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}
#cac-address:focus {
  border-color: #7ea840;
  outline: none;
}
#cac-submit {
  margin-top: 0; /* Remove top margin since they're now side by side */
  background-color: #7ea840;
  border: none;
  color: white;
  padding: 0.75em 1.5em;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  flex-shrink: 0; /* Prevent button from shrinking */
}
#cac-submit:hover {
  background-color: #6a832f;
}
#cac-message {
  /* margin-top: 1.2em; */
  padding: 0;
  border-radius: 0;
  color: #fff;
  line-height: 1.1;
  font-weight: 500;
  font-family: 'Barlow Condensed', sans-serif;
}
#cac-message.success {
  font-size: 1.1em;
  font-weight: 600;
  text-align: center;
}
#cac-message.success a.cac-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #7ea840;
  border: 2px solid transparent;
  border-radius: 25px;
  padding: 0.5em;
  margin-top: 0.5em;
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 400;
  font-size: 0.9em;
  line-height: 1;
  font-family: Barlow, sans-serif;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

#cac-message.success a.cac-cta:hover {
  transform: scale(1.05);
  font-weight: 600;
  border-color: #6d8c37;
}

#cac-message.error {
  font-size: 0.95em;
}

#cac-message.error a {
  color: #ffc20e;
  font-weight: 800;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  font-family: Barlow, sans-serif;
  display: inline-block;
  transition: all 0.3s ease;
}
#cac-message.error a:hover {
  /* text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); */
  transform: scale(1.1);
}

#cac-message.debug {
  font-size: 0.85em;
  color: #333;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 1em;
  white-space: pre-wrap;
  font-family: monospace;
  height: auto;
}

/* #cac-form,
#cac-loading,
#cac-message {
  opacity: 1;
  transition: opacity 0.4s ease;
}

#cac-form.cac-hidden,
#cac-message.cac-hidden,
#cac-loading.cac-hidden,
.cac-hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
} */

#cac-loading {
  z-index: 20;
}
#cac-message {
  z-index: 30;
}

/* = = = = = = = = = = = = = = = = =
*  Loading Animation displaeyd
*  while address is searched
= = = = = = = = = = = = = = = = = */
:root {
  --container-width: 75px;
  --container-height: 75px;
  --container-bg: rgba(0, 0, 0, 0);

  --orbit-width: 100%; /* full orbit radius */
  --orbit-height: 100%;
  --anim-duration: 3s;

  --pin-scale-max: 3;
  --pin-scale-min: 1;
}

.container.map-marker-ani {
  position: relative;
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Base map stays visible */
.map-marker-ani .map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Orbit defines circular motion path */
.map-marker-ani .orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: center center;
  animation: rotateOrbit var(--anim-duration) linear infinite;
  z-index: 2;
  overflow: visible;
}

/* Pin stays upright while orbit rotates */
.map-marker-ani .pin-wrapper {
  position: absolute;
  top: 0; /* start at orbit perimeter */
  left: 50%;
  transform: translate(-50%, 0) rotate(0deg);
  transform-origin: center center;
  animation: counterRotate var(--anim-duration) linear infinite;
}

/* Pin appearance and pulse scale */
.map-marker-ani .animated-svg {
  width: 25%; /* makes the pin large enough to see orbit */
  height: auto;
  transform-origin: center bottom;
  animation: scalePin var(--anim-duration) ease-in-out infinite;
  display: block;
}

/* Keyframes */
@keyframes rotateOrbit {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes counterRotate {
  from {
    transform: translate(-50%, 0) rotate(0deg);
  }
  to {
    transform: translate(-50%, 0) rotate(-360deg);
  }
}

@keyframes scalePin {
  0% {
    transform: scale(var(--pin-scale-min));
  }
  50% {
    transform: scale(var(--pin-scale-max));
  }
  100% {
    transform: scale(var(--pin-scale-min));
  }
}

#cac-container {
  display: grid;
  /* All children occupy the same grid cell */
  grid-template-areas: 'stack';
  align-items: center;
}

#cac-container > * {
  grid-area: stack;
  /* Fade transition */
  transition: opacity 0.3s ease;
}

#cac-container > .cac-hidden {
  opacity: 0;
  pointer-events: none; /* Prevent interaction with hidden elements */
}

/* = = = = = = = = = = = = = = = = =
*  Loading Animation displaeyd
*  while address is searched
= = = = = = = = = = = = = = = = = */
.loading-ani--text1 {
  /* left: 50%;
  top: 50%; */
  font-size: 1.5em;
  font-family: 'Barlow', sans-serif;
  /* font-weight: bold; */
  /* letter-spacing: 4.4px; */
  text-transform: capitalize;
  position: relative;
  overflow: hidden;
  width: fit-content;
  height: fit-content;
  margin: 0 auto;
  line-height: normal;
  /* transform: translate(-50%, -60%); */
}
.loading-ani--text1::before {
  color: rgba(255, 255, 255, 0.4);
  content: attr(data-loading-text) !important;
}
.loading-ani--text1::after {
  top: 0;
  left: 0;
  width: 0;
  opacity: 1;
  color: rgba(255, 255, 255.8);
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  content: attr(data-loading-text) !important;
  /* -webkit-animation: loading 5s infinite; */
}
.loading-ani--text1:not(.cac-hidden) {
  animation: letter-spacing 0.5s infinite;
  animation-direction: alternate;
}
.loading-ani--text1:not(.cac-hidden)::after {
  animation: loading 2s infinite;
}
@-webkit-keyframes loading {
  0% {
    width: 0;
    /* letter-spacing: 4.4px; */
  }
  100% {
    width: 100%;
    /* letter-spacing: 9.4px; */
  }
}
@keyframes loading {
  0% {
    width: 0;
    /* letter-spacing: 4.4px; */
  }
  100% {
    width: 100%;
    /* letter-spacing: 9.4px; */
  }
}

@keyframes letter-spacing {
  0% {
    letter-spacing: 4.4px;
  }
  100% {
    letter-spacing: 9.4px;
  }
}
