/* ============================================================
   Blue Ark Social Bubbles — Frontend CSS
   Plugin: bluearksolutions-bubbles v1.0.0
   ============================================================ */

:root {
  --bas-size: 56px;
  --bas-gap: 12px;
  --bas-radius: 50%;
  --bas-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  --bas-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.35);
  --bas-offset-bottom: 24px;
  --bas-offset-side: 20px;
  --bas-z: 9999;
  --bas-anim: 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Gradientes por defecto — colores de marca de cada red */
  --bas-facebook:  linear-gradient(135deg, #1877f2 0%, #0050b3 100%);
  --bas-instagram: linear-gradient(135deg, #f58529 0%, #dd2a7b 40%, #8134af 70%, #515bd4 100%);
  --bas-whatsapp:  linear-gradient(135deg, #25d366 0%, #128c4a 100%);
  --bas-phone:     linear-gradient(135deg, #1565c0 0%, #0d2f6e 100%);
  --bas-telegram:  linear-gradient(135deg, #2ea6d9 0%, #0a7ab5 100%);
  --bas-x:         linear-gradient(135deg, #2c2c2c 0%, #000000 100%);
  --bas-linkedin:  linear-gradient(135deg, #0a66c2 0%, #004d92 100%);
}

/* ── Wrapper ─────────────────────────────────────────────── */
.bas-bubble-wrapper {
  position: fixed;
  bottom: var(--bas-offset-bottom);
  z-index: var(--bas-z);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bas-gap);
}

.bas-pos-right { right: var(--bas-offset-side); }
.bas-pos-left  { left:  var(--bas-offset-side); }

/* ── Burbuja base ────────────────────────────────────────── */
.bas-bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width:  var(--bas-size);
  height: var(--bas-size);
  border-radius: var(--bas-radius);
  box-shadow: var(--bas-shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--bas-anim), box-shadow var(--bas-anim);
  /* Animación de entrada escalonada — JS añade clase .bas-visible */
  opacity: 0;
  transform: scale(0.4) translateY(20px);
}

.bas-bubble.bas-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.bas-bubble:hover,
.bas-bubble:focus-visible {
  transform: scale(1.12) translateY(-2px);
  box-shadow: var(--bas-shadow-hover);
  outline: none;
}

/* ── Iconos SVG ──────────────────────────────────────────── */
.bas-bubble svg {
  width:  calc(var(--bas-size) * 0.52);
  height: calc(var(--bas-size) * 0.52);
  fill: #ffffff;
  display: block;
  pointer-events: none;
}

/* ── Colores por red ─────────────────────────────────────── */
.bas-bubble--facebook  { background: var(--bas-facebook);  }
.bas-bubble--instagram { background: var(--bas-instagram); }
.bas-bubble--whatsapp  { background: var(--bas-whatsapp);  }
.bas-bubble--phone     { background: var(--bas-phone);     }
.bas-bubble--telegram  { background: var(--bas-telegram);  }
.bas-bubble--x         { background: var(--bas-x);         }
.bas-bubble--linkedin  { background: var(--bas-linkedin);  }

/* ── Tooltip ────────────────────────────────────────────── */
.bas-bubble__tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Posicionamiento del tooltip según lado */
.bas-pos-right .bas-bubble__tooltip {
  right: calc(var(--bas-size) + 10px);
  top: 50%;
  transform: translateY(-50%);
}
.bas-pos-left .bas-bubble__tooltip {
  left: calc(var(--bas-size) + 10px);
  top: 50%;
  transform: translateY(-50%);
}

.bas-bubble:hover .bas-bubble__tooltip,
.bas-bubble:focus-visible .bas-bubble__tooltip {
  opacity: 1;
}

/* ── Formulario de contacto (shortcode) ──────────────────── */
.bas-contact-wrap {
  max-width: 600px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Honeypot oculto accesiblemente */
.bas-hp-wrapper {
  position: absolute;
  left: -9999px;
  top: -9999px;
  overflow: hidden;
  height: 1px;
  width: 1px;
}

.bas-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.bas-field-group--half {
  flex-direction: row;
  gap: 16px;
}
.bas-field-group--half > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bas-field-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.bas-required { color: #e74c3c; }

.bas-field-group input,
.bas-field-group textarea {
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.bas-field-group input:focus,
.bas-field-group textarea:focus {
  outline: none;
  border-color: #1877f2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}

.bas-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1877f2, #0050b3);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.bas-submit-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.bas-submit-btn:active { transform: translateY(0); }
.bas-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.bas-contact-response {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.bas-contact-response.is-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.bas-contact-response.is-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --bas-size: clamp(40px, var(--bas-size), var(--bas-size));
    --bas-offset-side: 12px;
    --bas-offset-bottom: 16px;
    --bas-gap: 8px;
  }

  .bas-bubble__tooltip { display: none; }

  .bas-field-group--half {
    flex-direction: column;
  }
}
