@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

/* -----------------------
   BLOCK
----------------------- */
.connection-toast {
  position: fixed; /* fixo na tela, acompanha scroll */
  bottom: 20px;
  left: 20px;
  width: 430px;
  font-family: 'Poppins', sans-serif;
  z-index: 9999;

  /* invisível por padrão */
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
  transition: all 0.5s ease;
}

/* -----------------------
   MODIFIERS
----------------------- */
.connection-toast--show {
  opacity: 1;
  transform: translateX(20px);
  pointer-events: auto;
}
.connection-toast--offline {}
.connection-toast--online {}

/* -----------------------
   BOX (inner wrapper)
----------------------- */
.connection-toast__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 16px 12px;
  border-radius: 8px;
  border-left: 4px solid #2ecc71;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.connection-toast__box--offline {
  border-color: #ccc;
}
.connection-toast__box--online {
  border-color: #2ecc71;
}

/* -----------------------
   ELEMENTS
----------------------- */
.connection-toast__content {
  display: flex;
  align-items: center;
}
.connection-toast__icon {
  font-size: 20px;
  color: #fff;
  height: 40px;
  width: 40px;
  display: flex;              
  align-items: center;        
  justify-content: center;    
  border-radius: 50%;
  background: #2ecc71;
  flex-shrink: 0;
}
.connection-toast__box--offline .connection-toast__icon {
  background: #ccc;
}
.connection-toast__box--online .connection-toast__icon {
  background: #2ecc71;
}

.connection-toast__details {
  margin-left: 12px;
}
.connection-toast__title {
  font-size: 16px;
  font-weight: 600;
}
.connection-toast__subtitle {
  font-size: 14px;
  color: #717171;
}

.connection-toast__close {
  color: #717171;
  font-size: 20px;
  cursor: pointer;
  height: 32px;
  width: 32px;
  display: flex;              
  align-items: center;        
  justify-content: center;    
  border-radius: 50%;
  background: #f2f2f2;
  transition: all 0.3s ease;
}
.connection-toast__close:hover {
  background: #e6e6e6;
}

/* -----------------------
   RESPONSIVIDADE
----------------------- */
@media (max-width: 768px) {
  .connection-toast {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 100%); /* inicia fora da tela */
    width: calc(100% - 40px);
    max-width: 360px;
  }
  .connection-toast--show {
    transform: translate(-50%, 0);
  }
  .connection-toast__box {
    padding: 14px 10px;
    border-radius: 6px;
  }
  .connection-toast__icon {
    height: 36px;
    width: 36px;
    font-size: 18px;
    line-height: 36px;
  }
  .connection-toast__title {
    font-size: 15px;
  }
  .connection-toast__subtitle {
    font-size: 13px;
  }
  .connection-toast__close {
    height: 28px;
    width: 28px;
    font-size: 18px;
    line-height: 28px;
  }
}
