/**
 * 2007-2024 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    Hugo Antunes
 * @copyright 2024 Hugo Antunes
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */

 .store-map-container {
  position: relative;
  padding-inline: 23px;
  padding-bottom: 100px;
}

.store-map-container::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 0;
  background-color: #331812;
  clip-path: polygon(0 55%, 100% 10%, 100% 100%, 0% 100%);
}

@media (min-width: 768px) {
  .store-map-container::before {
    clip-path: polygon(0 70%, 100% 15%, 100% 100%, 0% 100%);
  }
}

@media (min-width: 1024px) {
  .store-map-container::before {
    clip-path: polygon(0px 66%, 100% 22%, 100% 100%, 0% 100%);
  }
}

@media (min-width: 1500px) {
  .store-map-container::before {
    clip-path: polygon(0px 78%, 100% 10%, 100% 100%, 0% 100%);
  }
}

.stores-map {
  width: min(100%, 1200px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  position: relative;
}

.stores-map #map-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.stores-map .store {
  --positionX: 0%;
  --positionY: 0%;
  position: absolute;
  top: var(--positionY);
  left: var(--positionX);
  z-index: 4;
  width: 15px;
  height: 15px;
  object-fit: fill;
}

.stores-map .store:nth-child(odd) {
  z-index: 3;
}

.stores-map .store .store-icon {
  position: absolute;
  cursor: pointer;
  width: 15px;
  height: 18px;
  max-width: fit-content !important;
  bottom: 175%;
  left: -35%;
  object-fit: contain;
  z-index: 4;
}

.stores-map .store .store-icon:first-of-type {
  z-index: 2;
}

.stores-map .store .store-icon:last-of-type {
  z-index: 1;
}

.stores-map .store.store-selected {
  z-index: 5;
}

.stores-map .store.store-selected .store-icon:first-of-type {
  z-index: 1;
}

.stores-map .store .popup {
  position: absolute;
  background: #ffffff 0% 0% no-repeat padding-box;
  border-radius: 35px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 48px 43px 30px 26px;
  text-align: left;
  font: normal normal normal 18px/24px Lexend;
  letter-spacing: 0px;
  width: 400px;
  z-index: 100 !important;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.stores-map .store .popup .close-popup-btn {
  width: 20px;
  height: 20px;
  position: absolute;
  top: 20px;
  right: 29px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.stores-map .store .popup .close-popup-btn svg {
  width: 100%;
  height: 100%;
}

.stores-map .store .popup .phone {
  margin-top: 16px;
}

.stores-map .store .popup .email {
  margin-top: 8px;
}

.stores-map .store .popup .popup-accent {
  color: #ff6a13;
}

.stores-map .store .popup.top {
  bottom: calc(200% + 40px);
}

.stores-map .store .popup.top::after {
  bottom: -5px;
  left: 50%;
  margin-left: -5px;
}

.stores-map .store .popup.bottom {
  top: 50%;
}

.stores-map .store .popup.bottom::after {
  top: -5px;
  left: 50%;
  margin-left: -5px;
}

.stores-map .store .popup.right {
  left: 0;
}

.stores-map .store .popup.right::after {
  left: 10%;
}

.stores-map .store .popup.left {
  right: 0;
}

.stores-map .store .popup.left::after {
  left: 90%;
}

.stores-map .store .popup::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  transform: rotate(45deg);
}

.stores-map .store.store-selected .popup {
  visibility: visible;
  opacity: 1;
}

@media screen and (max-width: 1200px) {
  .stores-map .store .popup {
    display: none;
  }
}

@media screen and (orientation: landscape), (min-width: 768px) {
  .stores-map .store {
    top: calc(var(--positionY) + 1.2%);
  }
}

@media screen and (min-width: 768px) {
  .stores-map .store .store-icon {
    width: 20px;
    height: 25px;
  }
}

@media screen and (min-width: 1024px) {
  .stores-map .store .store-icon {
    width: 30px;
    height: 35px;
  }
  .stores-map .store {
    top: calc(var(--positionY) + 1.8%);
    left: calc(var(--positionX) - 0.8%);
  }
}

