/* ============ BOTAO FLUTUANTE ============ */
.pwa-install-button {
  align-items: center;
  background: linear-gradient(135deg, #00b7b8 0%, #2178b8 100%);
  border: 0;
  border-radius: 999px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  display: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  line-height: 1;
  min-height: 54px;
  padding: 0 18px;
  position: fixed;
  right: 16px;
  text-transform: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  z-index: 12000;
}

.pwa-install-button.is-visible {
  display: inline-flex;
}

.pwa-install-button:hover,
.pwa-install-button:focus {
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  color: #fff;
  outline: 0;
  transform: translateY(-2px);
}

.pwa-install-button__icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

/* ============ DICA (TOAST) ============ */
.pwa-install-hint {
  background: #1f2933;
  border-radius: 8px;
  bottom: calc(82px + env(safe-area-inset-bottom));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  color: #fff;
  display: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-width: 300px;
  padding: 12px 14px;
  position: fixed;
  right: 16px;
  z-index: 12000;
}

.pwa-install-hint.is-visible {
  display: block;
}

.pwa-install-hint strong {
  color: #fff;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.pwa-install-hint em {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  font-style: normal;
  padding: 1px 5px;
}

/* ============ MODAL iOS ============ */
.pwa-ios-modal {
  align-items: center;
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 13000;
}

.pwa-ios-modal.is-visible {
  display: flex;
}

.pwa-ios-modal__backdrop {
  background: rgba(15, 23, 42, 0.72);
  inset: 0;
  position: absolute;
}

.pwa-ios-modal__dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  max-width: 420px;
  overflow-y: auto;
  padding: 24px 22px 22px;
  position: relative;
  width: calc(100% - 32px);
  z-index: 1;
}

.pwa-ios-modal__close {
  background: transparent;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font-size: 28px;
  height: 36px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 8px;
  width: 36px;
}

.pwa-ios-modal__close:hover {
  color: #111827;
}

.pwa-ios-modal__header {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.pwa-ios-modal__icon {
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
  height: 60px;
  width: 60px;
}

.pwa-ios-modal__title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 4px;
}

.pwa-ios-modal__subtitle {
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.pwa-ios-modal__steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.pwa-ios-modal__step {
  align-items: flex-start;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
}

.pwa-ios-modal__step-num {
  align-items: center;
  background: linear-gradient(135deg, #00b7b8 0%, #2178b8 100%);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.pwa-ios-modal__step-text {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
}

.pwa-ios-modal__step-text strong {
  color: #0f172a;
  font-weight: 700;
}

.pwa-ios-modal__share-icon,
.pwa-ios-modal__plus-icon {
  align-items: center;
  background: #e0f2fe;
  border-radius: 6px;
  color: #0369a1;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin: 0 2px;
  padding: 2px;
  vertical-align: middle;
  width: 24px;
}

.pwa-ios-modal__note {
  background: #fef3c7;
  border-radius: 8px;
  color: #78350f;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 18px;
  padding: 10px 12px;
}

.pwa-ios-modal__ok {
  background: linear-gradient(135deg, #00b7b8 0%, #2178b8 100%);
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 16px;
  width: 100%;
}

.pwa-ios-modal__ok:hover,
.pwa-ios-modal__ok:focus {
  box-shadow: 0 8px 18px rgba(33, 120, 184, 0.32);
  outline: 0;
}

body.pwa-modal-open {
  overflow: hidden;
}

/* ============ MOBILE ============ */
@media (max-width: 575px) {
  .pwa-install-button {
    bottom: calc(14px + env(safe-area-inset-bottom));
    min-height: 52px;
    padding: 0;
    right: 14px;
    width: 52px;
  }

  .pwa-install-button__label {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .pwa-install-button__icon {
    background: transparent;
    height: auto;
    width: auto;
  }

  .pwa-install-hint {
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 14px;
    max-width: none;
    right: 14px;
  }
}
