/* ─── LAYOUT FOOTER PLUS ─────────────────────────────────── */

:root {
  --ink:      #0d0f12;
  --paper:    #f5f3ee;
  --cream:    #ede9e0;
  --accent:   #d4521a;
  --accent2:  #1a4fd4;
  --mid:      #6b6860;
  --border:   rgba(13,15,18,.12);
  --card-bg:  #ffffff;
  --shadow:   0 2px 24px rgba(13,15,18,.07);
  --r:        14px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* Footer Container */
.layout-footer-plus {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(
    to top,
    var(--paper) 0%,
    rgba(245, 243, 238, 0.95) 50%,
    transparent 100%
  );
  padding: 0px 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: visible;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* Plus Button */
.footer-plus-btn {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--accent);
  border: none;
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(212, 82, 26, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  transform: translateY(-16px);
  position: relative;
  box-sizing: border-box;
}

.footer-plus-btn svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.5;
  fill: none;
  stroke: #ffffff;
}

.footer-plus-btn:hover {
  transform: translateY(-20px) scale(1.1);
  box-shadow: 0 12px 40px rgba(212, 82, 26, 0.4);
}

.footer-plus-btn:active {
  transform: translateY(-16px) scale(0.95);
  box-shadow: 0 4px 16px rgba(212, 82, 26, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .layout-footer-plus {
    padding: 0px 0;
    min-height: 0px;
  }

  .footer-plus-btn {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    transform: translateY(-14px);
  }

  .footer-plus-btn:hover {
    transform: translateY(-18px) scale(1.1);
  }

  .footer-plus-btn:active {
    transform: translateY(-14px) scale(0.95);
  }

  .footer-plus-btn svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .layout-footer-plus {
    padding: 0px 0;
    min-height: 0px;
  }

  .footer-plus-btn {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    transform: translateY(-13px);
  }

  .footer-plus-btn:hover {
    transform: translateY(-17px) scale(1.1);
  }

  .footer-plus-btn:active {
    transform: translateY(-13px) scale(0.95);
  }

  .footer-plus-btn svg {
    width: 24px;
    height: 24px;
  }
}

/* ─── MODAL STYLES ─────────────────────────────────────────── */

/* Modal Container */
.footer-plus-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modal Overlay */
.footer-plus-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 18, 0.4);
  z-index: -1;
}

/* Modal Content */
.footer-plus-modal-content {
  background: var(--card-bg);
  border-radius: var(--r);
  box-shadow: var(--shadow), 0 16px 48px rgba(13, 15, 18, 0.12);
  padding: 0;
  width: 90%;
  max-width: 380px;
  animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

/* Modal Header */
.footer-plus-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-plus-modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
}

/* Modal Body */
.footer-plus-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Modal Footer */
.footer-plus-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

/* Modal Buttons */
.footer-plus-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
}

/* Primary Button */
.footer-plus-modal-btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(212, 82, 26, 0.25);
}

.footer-plus-modal-btn-primary:hover {
  background: #c24116;
  box-shadow: 0 6px 16px rgba(212, 82, 26, 0.35);
  transform: translateY(-2px);
}

.footer-plus-modal-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 82, 26, 0.2);
}

/* Secondary Button */
.footer-plus-modal-btn-secondary {
  background: var(--cream);
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.footer-plus-modal-btn-secondary:hover {
  background: var(--paper);
  border-color: var(--ink);
}

.footer-plus-modal-btn-secondary:active {
  background: var(--cream);
}

/* Premium Badge */
.premium-badge {
  background: #22c55e;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* Close Button */
.footer-plus-modal-close {
  background: none;
  border: none;
  color: var(--mid);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.footer-plus-modal-close:hover {
  background: var(--cream);
  color: var(--ink);
}

.footer-plus-modal-close:active {
  background: var(--border);
}

/* Modal Animations */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation for appearing */

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout-footer-plus[style*="display: flex"] {
  animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 
  ═══════════════════════════════════════════════════════════════
  SAFEGUARD: Prevenir overflow horizontal en viewport
  ─────────────────────────────────────────────────────────────
  Razón: Asegurar que ningún elemento (incluido footer flotante)
  escape el viewport horizontalmente causando scroll innecesario.
  Esto es una mejor práctica estándar para mobile.
  ═══════════════════════════════════════════════════════════════
*/
html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* Pulse animation on hover */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(212, 82, 26, 0.3);
  }
  50% {
    box-shadow: 0 8px 40px rgba(212, 82, 26, 0.5);
  }
}

.footer-plus-btn:focus {
  outline: none;
  animation: pulse 1.5s infinite;
}

.footer-plus-btn:focus:not(:focus-visible) {
  animation: none;
}
