/* ════════════════════════════════════════════════════════════
   css/components.css — Botones, glass, panels, modal, WA flotante
   Coexsis v17
   ════════════════════════════════════════════════════════════ */


/* ========================================
   1. BOTONES — BASE
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-family);
  font-weight: 700;
  border-radius: 50px;         /* ← píldora, no rectangulo */
  border: none; cursor: pointer;
  text-decoration: none;
  position: relative; overflow: hidden;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

/* Tamaños */
.btn--sm   { padding: 9px 20px; font-size: 0.82rem; }
.btn--full { width: 100%; justify-content: center; }

/* Elementos internos con z-index para quedar sobre el ::before de hover */
.btn__icon  { position: relative; z-index: 1; display: flex; align-items: center; flex-shrink: 0; }
.btn__label { position: relative; z-index: 1; }

/* Flecha en ghost */
.btn__arrow { display: flex; align-items: center; transition: transform 0.3s var(--ease); }


/* ========================================
   2. BOTÓN HERO PRIMARY — Gradiente rosa/púrpura
   ======================================== */
.btn--hero-primary {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #6366f1 100%);
  color: #fff;
  padding: 15px 32px; font-size: 0.95rem;
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.3),
    0 4px 20px rgba(236, 72, 153, 0.4),
    0 0 40px rgba(139, 92, 246, 0.2);
}
/* Overlay más claro para el hover (se activa con opacity: 1) */
.btn--hero-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #f472b6 0%, #a78bfa 50%, #818cf8 100%);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn--hero-primary:hover::before { opacity: 1; }
.btn--hero-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.5),
    0 8px 30px rgba(236, 72, 153, 0.6),
    0 0 60px rgba(139, 92, 246, 0.3);
}
.btn--hero-primary:active { transform: translateY(-1px) scale(0.99); }


/* ========================================
   3. BOTÓN HERO GHOST — Transparente con borde
   ======================================== */
.btn--hero-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 15px 28px; font-size: 0.95rem;
}
.btn--hero-ghost::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn--hero-ghost:hover::before { opacity: 1; }
.btn--hero-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff; transform: translateX(4px);
}
.btn--hero-ghost:hover .btn__arrow { transform: translateX(5px); }


/* ========================================
   4. BOTÓN SECTION PRIMARY — Glass con hover degradado
   ======================================== */
.btn--section-primary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff; padding: 13px 28px; font-size: 0.9rem;
  backdrop-filter: blur(4px);
}
.btn--section-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.15),
    rgba(139, 92, 246, 0.15)
  );
  opacity: 0; transition: opacity 0.3s ease;
}
.btn--section-primary:hover::before { opacity: 1; }
.btn--section-primary:hover {
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.2);
}
/* Flecha inline animada */
.btn--section-primary::after {
  content: '→'; margin-left: 4px;
  transition: transform 0.3s ease;
  display: inline-block; position: relative; z-index: 1;
}
.btn--section-primary:hover::after { transform: translateX(4px); }


/* ========================================
   5. BOTÓN GHOST — Minimal
   ======================================== */
.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 24px; font-size: 0.9rem;
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}


/* ========================================
   6. BOTÓN WHATSAPP
   ======================================== */
.btn--wa {
  background: #25D366; color: #fff;
  padding: 12px 20px; font-size: 14px;
}
.btn--wa:hover {
  background: #1fba58; transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}


/* ========================================
   7. BRILLO ANIMADO EN BOTONES
   Barre de izquierda a derecha cada 3s automáticamente
   ======================================== */
.btn__shine {
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  animation: shineSweep 3s ease-in-out infinite; /* ← automático, no solo hover */
  pointer-events: none;
}

/* CTA row */
.cta-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 2rem; align-items: center;
}


/* ========================================
   8. GLASSMORPHISM
   ======================================== */
/* ✅ Usa --glass-bg (no --bg-panel que ya no existe) */
.glass, .case-card, .panel, .console {
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 32px 0 rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px var(--glass-shine);
  border-radius: 18px;
  position: relative; overflow: hidden;
  will-change: transform;
}
.glass:hover, .case-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 35, 60, 0.85);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 40px -10px rgba(236, 72, 153, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Grid de 3 columnas para case cards */
.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 40px;
}

/* Case cards (s2 — casos de uso) */
.case-card {
  padding: 30px;
  display: flex; flex-direction: column;
  min-height: 220px;
}
.case-card__top {
  display: flex; justify-content: space-between; margin-bottom: 20px;
}
.case-num {
  font-size: 2.5rem; font-weight: 800;
  color: rgba(255, 255, 255, 0.05); line-height: 1;
}
.case-tag {
  font-size: 10px; color: var(--p1);
  border: 1px solid var(--p1);
  padding: 4px 10px; border-radius: 20px;
  align-self: flex-start;
  text-transform: uppercase; font-weight: 700;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}
.case-card h3 { font-size: 1.2rem; color: #fff; margin-bottom: 10px; }
.case-card p  { font-size: 0.9rem; color: var(--muted); }
.case-metrics {
  margin-top: auto; padding-top: 16px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--success);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.case-metrics span { display: flex; align-items: center; gap: 6px; }


/* ========================================
   9. PANELS — Paneles con cabecera
   ======================================== */
.panel { display: flex; flex-direction: column; overflow: hidden; }

.panel__head, .console__head {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: #fff;
}

/* Dot de estado del panel (verde = activo) */
.dotx, .light {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; opacity: 0.8;
  animation: blink 2s infinite; flex-shrink: 0;
}

.panel__title { font-size: 0.85rem; font-weight: 600; color: #fff; }

.panel__body, .console__body {
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px; color: #a5b4fc;
  height: 240px; overflow-y: auto;
}
.console__body { height: 130px; }
.console__input-line {
  display: flex; align-items: center;
  padding: 0 20px 16px;
}
.prompt {
  color: var(--success); font-family: monospace;
  margin-right: 10px; font-weight: 700;
}
#cmdInput {
  background: transparent; border: none; color: #fff;
  font-family: monospace; font-size: 14px; flex-grow: 1; outline: none;
}
#cmdInput:focus { caret-color: #4ade80; }


/* ========================================
   10. MODAL
   ======================================== */
dialog {
  margin: auto; padding: 0;
  background: transparent; border: none;
  max-width: 500px; width: 90%; color: #fff;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}
dialog[open] { animation: popIn 0.4s var(--ease); }

.modal-head {
  background: #111424;
  padding: 1.5rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  border-top-left-radius: 24px; border-top-right-radius: 24px;
  border: 1px solid var(--glass-border); border-bottom: none;
}
.modal-head h3 { font-size: 1.25rem; font-weight: 700; }

.modal-body {
  background: #0a0d1a; padding: 2rem;
  border-bottom-left-radius: 24px; border-bottom-right-radius: 24px;
  border: 1px solid var(--glass-border);
}
.modal-lead { color: var(--text-mut); margin-bottom: 2rem; font-size: 0.95rem; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { margin-bottom: 1.5rem; text-align: left; }
.field label {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--text-mut); margin-bottom: 0.5rem;
}
.field input,
.field textarea,
.field select {
  width: 100%; padding: 0.9rem 1rem; border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: #fff; font-family: var(--font-family);
  font-size: 1rem; transition: all 0.3s;
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--indigo);
  background: rgba(99, 102, 241, 0.05);
}
.field textarea { resize: vertical; min-height: 100px; }

.modal-actions {
  display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem;
}
.modal-note {
  text-align: center; font-size: 0.8rem;
  color: var(--text-mut); margin-top: 1.5rem; opacity: 0.8;
}


/* ========================================
   11. WHATSAPP FLOTANTE
   ======================================== */
.floating-wa {
  position: fixed; bottom: 30px; left: 30px; z-index: 90;
  display: flex; align-items: center; gap: 0.75rem;
  background: #25D366; color: #fff;
  padding: 12px 20px 12px 14px;
  border-radius: 100px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}
.floating-wa svg { width: 24px; height: 24px; flex-shrink: 0; }
.floating-wa:hover { transform: translateY(-5px) scale(1.05); }

@media (max-width: 768px) {
  .floating-wa {
    padding: 14px; border-radius: 50%;
    bottom: 20px; left: 20px;
  }
  .floating-wa span { display: none; }
}