/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.lpac-map {
  height: 400px;
  /* width: 100%; */
}

/* Fixes issue with map pin sometimes being white boxes */
.lpac-map img {
  background: none !important;
}

#lpac-map-container {
  margin-top: 10px;
}

#lpac-find-location-btn {
  margin: 20px 0;
}

body .hidden {
  display: none !important;
}

#lpac-map-instructions {
  font-size: 12px;
  margin: 10px;
  text-align: center;
}

#lpac-find-location-btn-wrapper {
  display: flex;
  justify-content: center;
}

#lpac-saved-addresses {
  text-align: center;
}

.lpac-map-controls #lpac-saved-addresses {
  margin: 20px 0;
}

.lpac-map-controls #lpac-saved-addresses ul {
  list-style-type: none;
  padding: 0;
}

.lpac-map-controls #lpac-saved-addresses ul li {
  display: inline-block;
  margin: 10px 10px 0 0;
}

/* Google maps info window */

.woocommerce-checkout .lpac-map .gm-style-iw-d {
  color: #000 !important;
  font-weight: bold;
}

.woocommerce-page .lpac-map .gm-style-iw-d p {
  font-size: 14px;
  margin-bottom: 0 !important;
}

.woocommerce-view-order .lpac-map .gm-style-iw-d p,
.woocommerce-order-received .lpac-map .gm-style-iw-d p {
  font-weight: 800;
  margin: 5px !important;
  font-size: 14px;
  text-align: center;
}

/* Saved Addresses */

#lpac-saved-addresses ul {
  margin-left: 0;
}

#edit-saved-addresses {
  font-size: 16px;
  margin-top: 10px;
  text-decoration: underline;
}

/* Shortcodes */

#lpac-store-selector-shortcode select {
  padding: 10px;
}

/* Ensure dropdown is always on top of other elements such as the site menu bar. */
.select2-dropdown.select2-dropdown--below {
  z-index: 9999 !important;
}

/* After selecting location the select2 dropdown is set to 1px for some reason. We're overriding this here */
#lpac_order__origin_store_field .select2.select2-container {
  width: 100% !important;
}

/**
 * Map info windows.
 *
 * Kikote passes plain text to google.maps.InfoWindow, which Google renders with an empty header row for the close
 * button and small bold text. These rules turn it into a compact rounded card: the close button floats in the
 * corner and the text gets room around it. They only use Google's .gm-style-iw-* classes, scoped to Kikote's maps
 * (checkout, order and settings maps use .lpac-map; PRO shortcode and Map Builder maps use their own class).
 * !important is needed because Google sets several of these properties inline.
 */
.lpac-map .gm-style .gm-style-iw-c,
.kikote-shortcode-map .gm-style .gm-style-iw-c,
.kikote-map-builder-preview .gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

/* The header row only holds the close button; take it out of the flow so it doesn't add an empty line. */
.lpac-map .gm-style .gm-style-iw-chr,
.kikote-shortcode-map .gm-style .gm-style-iw-chr,
.kikote-map-builder-preview .gm-style .gm-style-iw-chr {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 1;
}

.lpac-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect,
.kikote-shortcode-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect,
.kikote-map-builder-preview .gm-style .gm-style-iw-chr .gm-ui-hover-effect {
  width: 26px !important;
  height: 26px !important;
  opacity: 0.55;
}

.lpac-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect span,
.kikote-shortcode-map .gm-style .gm-style-iw-chr .gm-ui-hover-effect span,
.kikote-map-builder-preview
  .gm-style
  .gm-style-iw-chr
  .gm-ui-hover-effect
  span {
  width: 14px !important;
  height: 14px !important;
  margin: 6px !important;
}

/* Content: right padding leaves room for the close button. */
.lpac-map .gm-style .gm-style-iw-d,
.kikote-shortcode-map .gm-style .gm-style-iw-d,
.kikote-map-builder-preview .gm-style .gm-style-iw-d {
  padding: 11px 32px 11px 14px !important;
  overflow: hidden !important;
  max-width: 230px;
  font: 500 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: #1e1e1e;
}

.lpac-map .gm-style .gm-style-iw-d p,
.kikote-shortcode-map .gm-style .gm-style-iw-d p,
.kikote-map-builder-preview .gm-style .gm-style-iw-d p {
  margin: 2px 0 0 !important;
}

/* PRO shipping region labels: the region name, then the price. */
.lpac-shipping-region-infowindow {
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  color: #1e1e1e;
}
