/**
 * Scoped styles for the suggestion launcher and dialog.
 */

.gmap-suggest-launcher {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 80;
  max-width: calc(100vw - 2rem);
  box-shadow: 0 8px 24px rgba(20, 18, 16, 0.16);
}

.gmap-suggest-launcher.is-inline {
  position: static;
  display: inline-flex;
  margin: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom));
  box-shadow: none;
}

html.gmap-suggest-raised .gmap-suggest-launcher:not(.is-inline),
body.woocommerce-checkout .gmap-suggest-launcher:not(.is-inline) {
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

.gmap-suggest-launcher:focus-visible,
.gmap-suggest__close:focus-visible,
.gmap-suggest__form :focus-visible {
  outline: 2px solid var(--gmap-copper, #b75f2a);
  outline-offset: 3px;
}

.gmap-suggest-launcher__icon {
  flex: 0 0 auto;
}

.gmap-suggest-dialog {
  width: min(28rem, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--gmap-surface, #fff);
  color: var(--gmap-text, #171512);
  box-sizing: border-box;
}

.gmap-suggest-dialog::backdrop {
  background: rgba(20, 18, 16, 0.48);
}

.gmap-suggest__panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 1.25rem 1.25rem 0;
}

.gmap-suggest-dialog .gmap-suggest__form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.gmap-suggest-dialog .gmap-suggest__fields {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 0.5rem;
}

.gmap-suggest__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--gmap-border, #e6ded4);
  border-radius: 999px;
  background: var(--gmap-surface, #fff);
  color: var(--gmap-text, #171512);
  box-shadow: 0 1px 2px rgba(20, 18, 16, 0.08);
  cursor: pointer;
}

.gmap-suggest__close:hover {
  background: var(--gmap-surface-warm, #f5efe8);
}

.gmap-suggest__close:focus-visible,
.gmap-suggest__more summary:focus-visible {
  outline: 2px solid var(--gmap-focus, #171512);
  outline-offset: 2px;
}

.gmap-suggest__title {
  margin: 0 3.25rem 0.5rem 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.gmap-suggest__support,
.gmap-suggest__privacy,
.gmap-suggest__hint {
  color: var(--gmap-text-secondary, #6e675f);
  font-size: 0.95rem;
}

.gmap-suggest__field {
  margin: 0 0 1rem;
}

.gmap-suggest__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.gmap-suggest__form input[type="text"],
.gmap-suggest__form input[type="email"],
.gmap-suggest__form textarea,
.gmap-suggest__form select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--gmap-border, #e6ded4);
  border-radius: var(--gmap-radius-sm, 0.5rem);
  background: var(--gmap-surface, #fff);
  color: inherit;
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.gmap-suggest__choices {
  display: grid;
  gap: 0.5rem;
}

.gmap-suggest__choice,
.gmap-suggest__check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.gmap-suggest__field.is-invalid input,
.gmap-suggest__field.is-invalid textarea,
.gmap-suggest__field.is-invalid select {
  border-color: #8c2f2f;
}

.gmap-suggest__error,
.gmap-suggest__banner {
  color: #8c2f2f;
}

.gmap-suggest__banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--gmap-radius-sm, 0.5rem);
  background: #f8ece8;
}

.gmap-suggest__more {
  margin: 0.25rem 0 1rem;
  border: 1px solid var(--gmap-border, #e6ded4);
  border-radius: 0.75rem;
  background: var(--gmap-surface-warm, #f5efe8);
}

.gmap-suggest__more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.gmap-suggest__more summary::-webkit-details-marker {
  display: none;
}

.gmap-suggest__more summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.gmap-suggest__more[open] summary::after {
  margin-top: 0.2rem;
  transform: rotate(-135deg);
}

.gmap-suggest__more-body {
  padding: 0 1rem 0.35rem;
}

.gmap-suggest__actions {
  flex: none;
  margin: 0 -1.25rem 0;
  padding: 0.85rem 1.25rem max(0.85rem, env(safe-area-inset-bottom));
  background: var(--gmap-surface, #fff);
  border-top: 1px solid var(--gmap-border, #e6ded4);
}

.gmap-suggest--page .gmap-suggest__actions {
  margin: 1rem 0 0;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.gmap-suggest__actions .gmap-btn {
  width: 100%;
}

.gmap-suggest__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gmap-suggest--page {
  box-sizing: border-box;
  max-width: 40rem;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

@media (max-width: 782px) {
  .gmap-suggest-dialog {
    width: 100vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gmap-suggest-dialog,
  .gmap-suggest-launcher {
    transition: none;
    scroll-behavior: auto;
  }
}

@media print {
  .gmap-suggest-launcher,
  .gmap-suggest-dialog {
    display: none !important;
  }
}
