/* Estilos para funcionalidades do PWA */

/* Notificação de atualização disponível */
.pwa-update-notification {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #4B70E2;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  animation: slideIn 0.3s ease-out;
  font-family: 'Poppins', sans-serif;
}

.pwa-update-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-update-content button {
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

#update-app-btn {
  background: white;
  color: #4B70E2;
}

#update-app-btn:hover {
  background: #f0f0f0;
}

#dismiss-update-btn {
  background: transparent;
  color: white;
}

#dismiss-update-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Botão de instalação do PWA */
.install-pwa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #4B70E2;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 10px;
  font-family: 'Poppins', sans-serif;
}

.install-pwa-btn:hover {
  background: #3A5BC9;
}

/* Tela de carregamento inicial do PWA */
.pwa-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4b70e2, #3a5bc9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 10000;
  transition: opacity 0.5s, visibility 0.5s;
}

.pwa-splash-logo {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  margin-bottom: 20px;
  font-size: 2.5rem;
  font-weight: bold;
  color: #4B70E2;
  animation: pulse 1.5s infinite;
}

.pwa-splash-title {
  color: white;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin-top: 20px;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.5s;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

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

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

/* Estilos para o modo offline */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ff4d4d;
  color: white;
  text-align: center;
  padding: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* Responsividade para PWA em dispositivos móveis */
@media screen and (max-width: 768px) {
  .pwa-update-notification {
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
  }

  .install-pwa-btn span {
    display: none;
  }

  .install-pwa-btn {
    padding: 8px;
  }
  
  /* Aplicando a ordem específica para telas móveis conforme preferência do usuário */
  #study-time-selection-page .dashboard-content {
    display: flex;
    flex-direction: column;
  }
  
  #study-time-main-panel {
    order: 1;
    margin-top: 15px;
  }
  
  #pomodoro-legend {
    order: 2;
    display: none; /* Só aparece quando Pomodoro estiver habilitado */
  }
  
  #pomodoro-settings {
    order: 3;
    display: none; /* Só aparece quando Pomodoro estiver habilitado */
  }
  
  /* Mostrar painéis do Pomodoro apenas quando habilitado */
  .pomodoro-enabled #pomodoro-legend,
  .pomodoro-enabled #pomodoro-settings {
    display: block;
  }
}



