/* ============================================================
   POPUP PLAZAS LIMITADAS — Design System v9
   ============================================================ */

/* Overlay oscuro elegante */
.layoscamp-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 58, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.layoscamp-popup-overlay.active {
  opacity: 1;
}

/* Popup principal */
.layoscamp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 9999;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(26, 58, 10, 0.2), 0 8px 24px rgba(26, 58, 10, 0.1);
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.layoscamp-popup.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Header del popup con gradiente */
.layoscamp-popup__header {
  background: linear-gradient(135deg, #2D5016 0%, #1a3a0a 100%);
  padding: 32px 32px 24px;
  position: relative;
  overflow: hidden;
}
.layoscamp-popup__header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(200, 168, 78, 0.1);
  border-radius: 50%;
}

/* Badge de urgencia */
.layoscamp-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200, 168, 78, 0.2);
  border: 1px solid rgba(200, 168, 78, 0.3);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #E8D48A;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.layoscamp-popup__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #C8A84E;
  border-radius: 50%;
  animation: pulse-glow 2s ease infinite;
}

/* Título del popup */
.layoscamp-popup__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 0;
}

/* Cuerpo del popup */
.layoscamp-popup__body {
  padding: 24px 32px 32px;
}
.layoscamp-popup__body p {
  font-size: 1rem;
  color: #4A4A4A;
  line-height: 1.7;
  margin: 0 0 12px;
}
.layoscamp-popup__body p strong {
  color: #2D5016;
  font-weight: 600;
}

/* Barra de progreso visual */
.layoscamp-popup__progress {
  margin: 20px 0;
}
.layoscamp-popup__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #6B6B6B;
  margin-bottom: 8px;
}
.layoscamp-popup__progress-bar {
  height: 8px;
  background: #F0F4E8;
  border-radius: 4px;
  overflow: hidden;
}
.layoscamp-popup__progress-fill {
  height: 100%;
  width: 78%;
  background: linear-gradient(90deg, #C8A84E, #E8D48A);
  border-radius: 4px;
  transition: width 2s ease;
}

/* Botón CTA */
.layoscamp-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #C8A84E, #D4B85F);
  color: #1a3a0a;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: 8px;
}
.layoscamp-popup__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 168, 78, 0.4);
}

/* Botón cerrar */
.layoscamp-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.layoscamp-popup__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* ============================================================
   FLOATING CTA — Design System v9
   ============================================================ */
.layoscamp-floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #C8A84E, #D4B85F);
  color: #1a3a0a;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(200, 168, 78, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
}
.layoscamp-floating-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 168, 78, 0.4);
}
.layoscamp-floating-cta::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #1a3a0a;
  border-radius: 50%;
  animation: pulse-glow 2s ease infinite;
}

/* ============================================================
   CHATBOT — Design System v9
   ============================================================ */
.chatbot-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2D5016, #1a3a0a);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 58, 10, 0.3);
  transition: all 0.3s ease;
  position: relative;
}
.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(26, 58, 10, 0.4);
}

/* Icono del chatbot */
.chatbot-toggle svg {
  width: 28px;
  height: 28px;
  fill: #FFFFFF;
}

/* Indicador de mensajes nuevos */
.chatbot-toggle__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: #C8A84E;
  color: #1a3a0a;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
}

/* Ventana del chatbot */
.chatbot-window {
  position: absolute;
  bottom: 72px;
  left: 0;
  width: 360px;
  max-height: 500px;
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(26, 58, 10, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.chatbot-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Header del chatbot */
.chatbot-window__header {
  background: linear-gradient(135deg, #2D5016, #1a3a0a);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chatbot-window__avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-window__avatar svg {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
}
.chatbot-window__info {
  flex: 1;
}
.chatbot-window__name {
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
}
.chatbot-window__status {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chatbot-window__status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #8BA841;
  border-radius: 50%;
}

/* Área de mensajes */
.chatbot-window__messages {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  background: #F7FAF2;
}

/* Mensaje del bot */
.chatbot-message--bot {
  background: #FFFFFF;
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-size: 0.9375rem;
  color: #1A1A1A;
  line-height: 1.5;
  max-width: 85%;
}

/* Input del chatbot */
.chatbot-window__input {
  padding: 16px 24px;
  background: #FFFFFF;
  border-top: 1px solid #F0F4E8;
  display: flex;
  gap: 12px;
}
.chatbot-window__input-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #E8E8E8;
  border-radius: 50px;
  font-size: 0.9375rem;
  color: #1A1A1A;
  background: #F7FAF2;
  outline: none;
  transition: border-color 0.2s ease;
}
.chatbot-window__input-field:focus {
  border-color: #8BA841;
}
.chatbot-window__send {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #C8A84E, #D4B85F);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.chatbot-window__send:hover {
  transform: scale(1.05);
}
.chatbot-window__send svg {
  width: 20px;
  height: 20px;
  fill: #1a3a0a;
}

/* Animaciones */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 168, 78, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(200, 168, 78, 0); }
}

/* Responsive */
@media (max-width: 480px) {
  .layoscamp-popup {
    width: 95%;
    border-radius: 20px;
  }
  .layoscamp-popup__header,
  .layoscamp-popup__body {
    padding-left: 24px;
    padding-right: 24px;
  }
  .chatbot-window {
    width: calc(100vw - 48px);
    left: 24px;
  }
}
