/* Pop-up de mensaje personalizado  */

.popup-msg-popup,
.popup-msg-popup *,
.popup-msg-popup *::after,
.popup-msg-popup *::before,
.popup-msg-bell,
.popup-msg-bell *,
.popup-msg-bell *::after,
.popup-msg-bell *::before {
  box-sizing: border-box;
}

.popup-msg-popup {
  --popup-msg-primary: #fd8926;
  --popup-msg-primary-hover: #ca6e1e;
  --popup-msg-text-gray: #666666;
  --popup-msg-text-dark: #444444;
  --popup-msg-bg-white: #ffffff;
  --popup-msg-backdrop: rgba(0, 0, 0, 0.6);

  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: Arial, Helvetica, sans-serif;
}

.popup-msg-popup.popup-msg-activo {
  display: flex;
}

.popup-msg-popup .popup-msg-backdrop {
  position: absolute;
  inset: 0;
  background-color: var(--popup-msg-backdrop);
}

.popup-msg-popup .popup-msg-card {
  position: relative;
  background-color: var(--popup-msg-bg-white);
  width: 100%;
  max-width: 400px;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.popup-msg-popup .popup-msg-hero {
  position: relative;
  width: 100%;
  display: none;
}

.popup-msg-popup .popup-msg-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.15);
  border: none;
  padding: 0;
  color: white;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 1;
}

.popup-msg-popup .popup-msg-close-btn:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.popup-msg-popup .popup-msg-close-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.popup-msg-popup .popup-msg-header {
  background-color: var(--popup-msg-primary);
  padding: 1.5rem 3.5rem;
  text-align: center;
  color: white;
}

.popup-msg-popup .popup-msg-header h2 {
  font-weight: bold;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  color: inherit;
  font-family: inherit;
}

.popup-msg-popup .popup-msg-main {
  padding: 1.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.popup-msg-popup .popup-msg-intro {
  color: var(--popup-msg-text-gray);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.popup-msg-popup .popup-msg-discount {
  color: var(--popup-msg-text-dark);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: bold;
  margin: 0;
}

.popup-msg-popup .popup-msg-cta-container {
  margin-top: 0.25rem;
}

.popup-msg-popup .popup-msg-cta-button {
  display: inline-block;
  background-color: var(--popup-msg-primary);
  color: white;
  font-weight: bold;
  padding: 0.75rem 2.5rem;
  border-radius: 0.65rem;
  text-decoration: none;
  font-size: 1.1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
}

.popup-msg-popup .popup-msg-cta-button:hover {
  background-color: var(--popup-msg-primary-hover);
  color: white;
}

.popup-msg-popup .popup-msg-footer {
  width: auto;
  height: auto;
  background: transparent;
  padding: 0;
  clear: none;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--popup-msg-text-gray);
  line-height: 1.4;
}

.popup-msg-popup .popup-msg-footer p {
  margin: 0;
}

.popup-msg-popup .popup-msg-phone-link {
  color: inherit;
  font-weight: bold;
  text-decoration: underline;
  white-space: nowrap;
}

.popup-msg-bell {
  position: fixed;
  bottom: 50%;
  right: 1.5rem;
  background-color: #fd8926;
  color: white;
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.2s;
  z-index: 999999;
  padding: 0;
}

.popup-msg-bell:hover {
  background-color: #ca6e1e;
}

.popup-msg-bell.popup-msg-mostrar {
  display: flex;
  animation-name: popup-msg-pulso;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.popup-msg-bell-border {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  border: 1px solid #fd8926;
  border-radius: 50%;
  box-shadow: 2px 2px 5px #ccc, -2px -2px 5px #ccc;
  animation-name: popup-msg-anillo;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.popup-msg-bell img {
  width: 24px;
  height: 24px;
  filter: invert(100%);
  animation-name: popup-msg-campanazo;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.popup-msg-bell .popup-msg-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #f7941e;
  border: 2px solid #ffffff;
  display: none;
}

.popup-msg-bell.popup-msg-no-leido .popup-msg-dot {
  display: block;
}

@keyframes popup-msg-pulso {
  0%, 75%, 100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.1);
  }
}

@keyframes popup-msg-anillo {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.9);
    opacity: 0.1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.9);
    opacity: 0;
  }
}

@keyframes popup-msg-campanazo {
  0% {
    transform: rotate(0deg);
  }
  5%, 15% {
    transform: rotate(25deg);
  }
  10%, 20% {
    transform: rotate(-25deg);
  }
  25%, 100% {
    transform: rotate(0deg);
  }
}

@media (min-width: 768px) {
  .popup-msg-popup .popup-msg-card {
    max-width: 560px;
    max-height: 85vh;
  }
}
