@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  --primary-accent: #5f9c73;
}

html { font-family: "Open Sans", sans-serif; }
body { margin: 0; }
footer { text-align: center; }
footer a { color: #000; font-weight: bold; text-decoration: none; }

.topbar { 
  position: relative;
  background: var(--primary-accent);
  background: linear-gradient(180deg,rgba(95, 156, 115, 1) 20%, rgba(83, 189, 127, 1) 80%);
  border: 1px solid var(--primary-accent);
  padding: 8px 0; margin: 0px 0px 0px 0px; border-radius: 0px 0px 24px 24px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;	
}

.topbar a { text-decoration: none; color: #fff; }

h1 { margin: 0; padding: 0; color: #fff; text-shadow: 0px 1px 2px black; }

.topbar h2 { margin: 0; padding: 0; font-size: .6rem; color: #fff; }


.header-menu {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1000;
}

.header-menu-toggle {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
}

.header-menu-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.header-menu-panel {
  position: absolute;
  right: 0;
  top: 46px;
  min-width: 170px;
  background: #efefef;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-menu-panel[hidden] {
  display: none;
}

.header-menu-panel a,
.header-menu-more-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: #228B22;
  padding: 0.65rem 0.8rem;
  font-weight: 700;
  text-shadow: none;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.header-menu-more-toggle {
  justify-content: space-between;
}

.header-menu-more-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.header-menu-panel > * + * {
  border-top: 1px solid #dcdcdc;
}

.header-menu-panel a:hover,
.header-menu-panel a:focus-visible,
.header-menu-more-toggle:hover,
.header-menu-more-toggle:focus-visible {
  background: #e3e3e3;
}

.header-menu-sub-panel {
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
}

.header-menu-sub-panel[hidden] {
  display: none;
}

.header-menu-sub-panel a {
  padding-left: 2rem;
  font-weight: 600;
}

#location-info { margin-top: 1rem; }

#current-location, #location-info, #optional-info, #options-panel { max-width: 1000px; }

gmp-map { height: 320px; width: 100%; box-shadow: 0 3px 1px -2px rgb(0 0 0 / 16%), 0 2px 2px 0 rgb(0 0 0 / 11%), 0 1px 5px 0 rgb(0 0 0 / 10%);  }
.ctr { text-align: center; }
.place-picker-container { padding: 10px; }

.gww { width: 32px; height: 32px; border: none; margin: 1rem; }

.coords { display: inline-block !important; }
#lat, #lon { display: inline-block; flex: none; }
#lat { padding-right: 8px; }

.large-icon-cell { text-align: center; padding: 3rem; font-size: 3rem; color: #235734; }
.large-icon-cell .loading-pulse {
  display: inline-block;
  animation: loadingPulse 1.4s ease-in-out infinite;
}

@keyframes loadingPulse {
  0% {
    opacity: 0.4;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.4;
    transform: scale(0.95);
  }
}

#geo-loading {
  text-align: center;
  padding: 1rem;
  font-style: italic;
  color: #666;
}

#geo-error {
  text-align: center;
  color: #b00020;
  font-weight: 500;
  margin: 1rem auto;
  padding: 0.75rem;
  max-width: 90%;
  background: #fff4f4;
  border: 1px solid #e0b4b4;
  border-radius: 6px;
}

#place-overview-wrapper {
  max-width: 600px;
  margin: 1em auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.3s ease;
  pointer-events: none;
}

#place-overview-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#options-panel { margin: 1rem auto; }

.settings-table {
  margin-top: 1rem;
}

.settings-header-toggle {
  width: 100%;
  border: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  cursor: pointer;
  background-color: #6d737a;
  color: #fff;
}

.settings-title {
  grid-column: 2;
  justify-self: center;
}

.settings-arrow {
  grid-column: 3;
  justify-self: end;
  color: #fff;
  transition: transform 0.2s ease;
}

.settings-header-toggle[aria-expanded="true"] .settings-arrow {
  transform: rotate(180deg);
}

.settings-body[hidden] {
  display: none;
}

.settings-row {
  justify-content: space-between;
}

.settings-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: #444;
}


.poi-back-nav {
  margin-left: 2.5rem;
}

.poi-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-accent), #4257d1);
  box-shadow: 0 8px 20px rgba(40, 58, 161, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poi-back-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(40, 58, 161, 0.3);
}

.poi-back-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.location-table {
  width: 95%;
  margin: 2rem auto;
  background: #fff;
  border: 1px solid #ddd;               /* Restores the card border */
  border-radius: 9px;                   /* Rounded corners */
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);/* Soft shadow */
  font-size: 1rem;
  overflow: hidden;
}

.location-header-row {
  font-size: 1.125rem;
  font-weight: 600;
  background-color: var(--primary-accent);
  padding: 1rem;
  text-align: center;
  border-radius: 9px 9px 0 0;
  border-bottom: 1px solid #ddd;
  color: #efefef;
}

.location-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* vertical centering of children */
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  gap: 0.75rem;
}

.location-row:last-child {
  border-bottom: none;	
}

.location-row:nth-child(even) {
  background-color: #f9f9f9;
  
}

.location-row h2 { color: #000; }

.location-left {
  display: flex;
  align-items: center;
  flex: 1; /* takes up remaining space */
}

.location-right {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
}

.nearby-results-table {
  border-radius: 14px;
}

.nearby-result-row {
  align-items: stretch;
  gap: 1rem;
}

.nearby-left {
  gap: 0.85rem;
  min-width: 0;
}

.nearby-text-wrap {
  min-width: 0;
}

.nearby-text-wrap .poi-title {
  display: block;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.poi-meta {
  color: #5b6470;
  font-size: 0.85rem;
}

.nearby-right {
  align-items: flex-end;
  justify-content: center;
  min-width: 170px;
}

.distance-pill {
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #225a36;
  background: #e9f5ee;
  border: 1px solid #cfe8d9;
}

.nearby-save-btn {
  width: auto;
  min-width: 170px;
  margin-left: 0;
}

.favorite-delete-button {
  border: none;
  background: transparent;
  padding: 0.25rem;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.favorite-delete-button:hover,
.favorite-delete-button:focus-visible {
  background-color: rgba(0, 0, 0, 0.05);
  outline: none;
  transform: scale(1.05);
}

.favorite-delete-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: grayscale(100%) brightness(1.3);
}

.action-button {
  display: block;
  width: 100%;
  margin-left: 0rem;
  padding: .5rem;
  border-radius: 9px;
  outline: 0;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  color: rgb(72, 76, 122);
  background-image: linear-gradient(180deg,#fff,#f5f5fa);
  box-shadow: 0 4px 11px 0 rgb(37 44 97 / 15%), 0 1px 3px 0 rgb(93 100 148 / 20%);
  transition: all .2s ease-out;
}

.action-button i {
    margin: 0.1rem 0.5rem;
}

.action-button.saved {
    color: #1f6b3a;
    background-image: linear-gradient(180deg, #ecfff3, #d8f3e4);
}

.action-button.saved-animate {
    animation: savedPulse 0.45s ease;
}

@keyframes savedPulse {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

.action-button:hover {
    box-shadow: 0 8px 22px 0 rgb(37 44 97 / 15%), 0 4px 6px 0 rgb(93 100 148 / 20%);
}


.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;      /* or your desired fixed size */
  height: 42px;     /* same as above to make it square */
  margin-right: .5rem;     /* space between icon and label */
}

.icon i { font-size: 24px; }

.label {
  flex: 1 1 45%;
  font-weight: 600;
  color: #333;
  min-width: 150px;
}

.value {
  flex: 1 1 50%;
  text-align: right;
  color: #444;
  word-break: break-word;
}

#optional-info .location-row {
  border-top: none;
  padding: 1rem;
}

#unitToggle {
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.poi-title {
  text-decoration: none;
  font-weight: bold;
  color: #000;
}

.poi-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
    flex-shrink: 0;
}

@media (max-width: 700px) {
  .nearby-result-row {
    flex-direction: column;
    align-items: stretch;
  }

  .nearby-right {
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .nearby-left {
    width: 100%;
    justify-content: flex-start;
  }

  .distance-pill,
  .nearby-save-btn {
    width: auto;
    box-sizing: border-box;
    text-align: center;
  }

  .nearby-save-btn {
    min-width: 0;
  }
}

.lg-poi-thumbnail {
    width: 150px;
    height: 150px;
    object-fit: cover;
    float: right;
    margin-left: 1rem;
    margin-bottom: 2rem;
}

.geo-error-zone { display:none; text-align:center; color:#b00020; margin-top:1rem; font-weight:500; }

.full-width-centered {
  width: 100%;
  display: flex;
  justify-content: center;   /* horizontal centering */
  align-items: center;       /* vertical centering */
}

.saved-location-banner {
  display: none;
  margin: 0.75rem auto 0;
  max-width: 720px;
  text-align: center;
  color: #2b2b2b;
  font-weight: 500;
}

.saved-location-link {
  border: 0;
  background: none;
  color: var(--primary-accent);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
  margin-left: 0.35rem;
  padding: 0;
}

.address-display {
  margin: 1.5rem auto;
  background: #fff;
  padding: 1rem;
}

.address-line, .coord-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.address-text {
  flex: 1;
  font-weight: 600;
}

.address-display .actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.address-display .actions.actions-centered {
  margin-top: 0.75rem;
  margin-left: 0;
  justify-content: center;
}

.address-display .actions.actions-centered .action-button {
  width: auto;
  min-width: 320px;
  margin-left: 0;
}

.view-favorites-link-wrapper {
  margin-top: 0.65rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.view-favorites-link-wrapper.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#view-favorites-link {
  display: inline-block;
  color: var(--primary-accent);
  font-weight: 600;
  text-decoration: underline;
}

.copy-btn .copy-icon {
  transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.copy-btn .copy-icon.copy-icon--copied {
  color: var(--primary-accent);
  transform: scale(1.2);
  animation: copy-icon-pop 0.3s ease;
}

@keyframes copy-icon-pop {
  0% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1.2);
  }
}

.coord-line {
  margin-top: 0.5rem;
  color: #000;
  justify-content: stretch;
}

.line-header {
  color: #aaa;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

/* More menu */

.more-menu-wrapper {
    padding: 0;
    margin: 0;
}

.more-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.more-menu-item + .more-menu-item {
    border-top: 1px solid #ececec;
}

.more-menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #1c1c1c;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.more-menu-link:hover,
.more-menu-link:focus-visible {
    background-color: rgba(95, 156, 115, 0.08);
    transform: translateX(4px);
}

.more-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(95, 156, 115, 0.12);
    color: var(--primary-accent);
    flex-shrink: 0;
    font-size: 1.5rem;
}

.more-menu-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.more-menu-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
}

.more-menu-desc {
    font-size: 0.9rem;
    color: #6b6b6b;
}

@media (max-width: 480px) {
    .more-menu-link {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .more-menu-icon {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
    }

    .more-menu-title {
        font-size: 1rem;
    }

    .more-menu-desc {
        font-size: 0.85rem;
    }
}


footer { 
  text-align: center;	
}

#footer-desc-section {
  font-size: .8rem;
  margin: 3rem 5rem 1rem;
}

#ios-app-download {
  margin-top: 2rem;
  text-align: center;
}

#ios-app-download a { color: #000; }

.about-note {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f7fbf8 0%, #ffffff 100%);
  border: 1px solid #d5e8db;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(20, 64, 35, 0.08);
  color: #1f3225;
}

.about-note p {
  margin: 0.5rem 0 0;
  line-height: 1.65;
}

.about-note strong a {
  color: #235734;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.about-note-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #235734;
  background: #e8f5ec;
  border: 1px solid #c4dfcd;
  border-radius: 999px;
  margin: .25rem 0;
  padding: 0.3rem 0.65rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  #footer-desc-section {
    margin: 2rem 1rem 1rem;
  }

  .about-note {
    padding: 0.9rem 1rem;
  }
}

/* Nav */

#nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
}

nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  background-color: #f6f9ff;
  padding: 10px;
  border-radius: 40px;
  transform: scale(1.8);
  overflow: hidden;
  width: 420px;
  margin: 20px auto;
}

nav a {
  position: relative;
  text-decoration: none;
  color: #228B22;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  display: inline-block;
  width: 100px;
  padding: 10px;
  box-sizing: border-box;
  z-index: 2;
  transition: 0.3s;
  text-shadow: text-shadow: 0px 1px 1px #FFF;
}

nav a b {
  position: relative;
  top: 40px;
  transition: 0.3s ease top;
  display: block;
}

nav a i {
  display: block;
  text-align: center;
  font-size: 20px;
  margin: 0 auto;
  transition: none;
}

nav span {
  position: absolute;
  width: 100px;
  background-color: #e5eeff;
  top: 10px;
  bottom: 10px;
  left: 10px;
  border-radius: 50px;
  z-index: 1;
  transition: 0.3s ease left;
}

nav a:hover b {
  top: 6px;
}

/* highlight background movement */
nav a:nth-child(1):hover ~ span {
  left: 10px;
}

nav a:nth-child(2):hover ~ span {
  left: 114px;
}

nav a:nth-child(3):hover ~ span {
  left: 218px;
}

nav a:nth-child(4):hover ~ span {
  left: 322px;
}

/*  Responsive: icons only under 420px - nav doesn't work as well on smaller sizes */
@media (max-width: 840px) {
  nav {
    transform: scale(1);
    width: 100%;
    justify-content: space-around;
    padding: 10px 0;
  }

  nav a {
    width: 60px;
    padding: 10px 0;
  }

  nav a b {
    display: none;
  }

  nav i {
    margin: 0 auto;
    font-size: 20px;
  }

  nav span {
    display: none;
  }
}



@media screen and (max-width: 406px) {
  .location-row {
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    text-align: center;
  }

  .location-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .icon {
    margin-bottom: 0.5rem;
  }

  .label,
  .value {
    flex: 1 1 100%;
    text-align: center;
    margin-bottom: 0.25rem;
    word-break: break-word;
  }
  
  #lat { padding-right: 0px; }
  
  .location-right {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .action-button {
    width: auto; /* or set fixed width like 100px */
    margin-top: 0.5rem;
    margin-left: 0rem !important;
    padding: .75rem 1rem;
  }

  .nearby-right {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nearby-result-row {
    align-items: stretch;
    text-align: left;
  }

  .nearby-left {
    width: 100%;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .nearby-save-btn {
    margin-top: 0;
  }
  
  .address-line, .coord-line {
    flex-direction: column;
    text-align: center;
  }
  
  .address-display .actions {
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
  }

  .line-header {
    display: none;
  }
}
