/* =========================================================================
   PEDScreve — Estilos: botão de instalação, modal iOS, toast de atualização
   ========================================================================= */

:root {
  --pedscreve-green: #2E7D32;
  --pedscreve-green-dark: #1B5E20;
  --pedscreve-shadow: 0 8px 24px rgba(46, 125, 50, 0.28);
}

/* -------------------------------------------------------------------------
   Botão "Instalar App"
   ---------------------------------------------------------------------- */

#pedscreve-install-btn {
	
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 14px 22px;
  border: none;
  border-radius: 999px;

  /* Mesmo gradiente utilizado no site */
  background: linear-gradient(
  135deg,
  #5DC6C3,
  #59A6D9
);

  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;

  box-shadow:
    0 10px 30px rgba(89, 166, 217, 0.28),
    0 4px 12px rgba(93, 198, 195, 0.22);

  opacity: 0;
  transform: translateY(16px) scale(0.95);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

#pedscreve-install-btn[hidden] {
  display: none;
}

#pedscreve-install-btn.pedscreve-install-btn--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#pedscreve-install-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.05);

  box-shadow:
    0 16px 38px rgba(89, 166, 217, 0.35),
    0 8px 18px rgba(93, 198, 195, 0.28);
}

#pedscreve-install-btn:active {
  transform: translateY(0) scale(0.97);
}

#pedscreve-install-btn .pedscreve-install-btn__icon {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 480px) {
  #pedscreve-install-btn {
    right: 16px;
    bottom: 16px;

    padding: 12px 18px;
    gap: 8px;

    font-size: 14px;
  }

  #pedscreve-install-btn .pedscreve-install-btn__icon {
    font-size: 17px;
  }
}

/* -------------------------------------------------------------------------
   Modal de instrução iOS
   ---------------------------------------------------------------------- */

.pedscreve-ios-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  background: rgba(0, 0, 0, 0.5);
  animation: pedscreve-fade-in 0.25s ease;
}

@keyframes pedscreve-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pedscreve-ios-modal {
  position: relative;
  width: 100%;
  max-width: 420px;

  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 28px 24px calc(24px + env(safe-area-inset-bottom));

  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
  animation: pedscreve-slide-up 0.3s ease;
}

@media (min-width: 600px) {
  .pedscreve-ios-modal-overlay {
    align-items: center;
  }
  .pedscreve-ios-modal {
    border-radius: 20px;
  }
}

@keyframes pedscreve-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.pedscreve-ios-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #9e9e9e;
  cursor: pointer;
}

.pedscreve-ios-modal__title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  padding-right: 24px;
}

.pedscreve-ios-modal__subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: #666;
}

.pedscreve-ios-modal__steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pedscreve-ios-modal__step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: #333;
}

.pedscreve-ios-modal__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(46, 125, 50, 0.1);
}

.pedscreve-ios-modal__cta {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--pedscreve-green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.pedscreve-ios-modal__cta:hover {
  background: var(--pedscreve-green-dark);
}

/* -------------------------------------------------------------------------
   Toast "Nova versão disponível"
   ---------------------------------------------------------------------- */

.pedscreve-update-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10001;
  transform: translateX(-50%) translateY(0);

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 14px 18px;
  border-radius: 12px;

  background: #1a1a1a;
  color: #fff;
  font-size: 14px;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: pedscreve-toast-in 0.3s ease;
  max-width: calc(100vw - 32px);
}

@keyframes pedscreve-toast-in {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.pedscreve-update-toast__text {
  white-space: nowrap;
}

.pedscreve-update-toast__btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--pedscreve-green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.pedscreve-update-toast__btn:hover {
  background: var(--pedscreve-green-dark);
}
