/**
 * Widget Flotante de 'Segurito' - Tuasegúrate Mediación
 * Posicionado en la esquina inferior izquierda
 */

.segurito-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9995;
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 360px;
  width: calc(100vw - 48px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.segurito-widget-card {
  pointer-events: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px -4px rgba(13, 41, 93, 0.16), 0 4px 12px rgba(13, 41, 93, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.95);
  overflow: hidden;
  position: relative;
  animation: seguritoSlideUp 0.4s ease-out forwards;
}

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

.segurito-widget-topbar {
  background: linear-gradient(135deg, #0d295d 0%, #177a72 100%);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.segurito-widget-header-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.segurito-widget-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.segurito-widget-btn-ctrl {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.segurito-widget-btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.3);
}

.segurito-widget-body {
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.segurito-avatar-wrapper {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #edf6f5;
  border: 1px solid rgba(23, 122, 114, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(23, 122, 114, 0.1);
}

.segurito-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.segurito-content-wrapper {
  flex-grow: 1;
  min-width: 0;
}

.segurito-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #177a72;
  background: #edf6f5;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.segurito-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d295d;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.segurito-text {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 10px 0;
}

.segurito-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #177a72;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.segurito-cta-btn:hover {
  background: #125e58;
  transform: translateY(-1px);
}

/* Badge Minimizado de Segurito */
.segurito-minimized-bubble {
  pointer-events: auto;
  display: none;
  background: #ffffff;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(13, 41, 93, 0.16);
  border: 2px solid #177a72;
  padding: 6px 16px 6px 6px;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: seguritoPop 0.3s ease-out;
}

@keyframes seguritoPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.segurito-minimized-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 41, 93, 0.22);
}

.segurito-mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #edf6f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.segurito-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.segurito-mini-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d295d;
  white-space: nowrap;
}

/* Ajustes Responsive */
@media (max-width: 576px) {
  .segurito-widget-container {
    bottom: 16px;
    left: 16px;
    max-width: 320px;
  }
  .segurito-avatar-wrapper {
    width: 46px;
    height: 46px;
  }
  .segurito-title {
    font-size: 0.88rem;
  }
  .segurito-text {
    font-size: 0.8rem;
  }
}
