/* Public site PWA install prompt — compact, dismissible, non-intrusive */
.diako-pwa-bar {
  position: fixed;
  z-index: 10080;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  color: #f8fafc;
  direction: rtl;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
}

.diako-pwa-bar.is-visible {
  display: flex;
}

.diako-pwa-bar__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.diako-pwa-bar__title {
  margin: 0;
  font-size: clamp(0.78rem, 2.8vw, 0.88rem);
  font-weight: 700;
  line-height: 1.3;
}

.diako-pwa-bar__text {
  margin: 2px 0 0;
  font-size: clamp(0.68rem, 2.4vw, 0.75rem);
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.diako-pwa-bar__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.diako-pwa-bar__btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 7px 11px;
  min-height: 34px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.diako-pwa-bar__btn--install {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #0f172a;
}

.diako-pwa-bar__btn--dismiss {
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  padding: 7px 8px;
}

@media (max-width: 380px) {
  .diako-pwa-bar {
    padding: 7px 8px;
    gap: 6px;
  }

  .diako-pwa-bar__text {
    display: none;
  }

  .diako-pwa-bar__btn {
    padding: 6px 9px;
    min-height: 32px;
    font-size: 0.74rem;
  }
}

@media (min-width: 769px) {
  .diako-pwa-bar {
    left: auto;
    right: 20px;
    width: min(340px, calc(100vw - 40px));
    padding: 10px 12px;
  }

  .diako-pwa-bar__text {
    display: block;
    -webkit-line-clamp: unset;
  }
}

@media (display-mode: standalone) {
  .diako-pwa-bar {
    display: none !important;
  }
}

/* ── Add-to-Home-Screen guide sheet ── */
.diako-pwa-guide {
  position: fixed;
  inset: 0;
  z-index: 10090;
  direction: rtl;
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
}

.diako-pwa-guide__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.diako-pwa-guide__card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  color: #0f172a;
  border-radius: 20px 20px 0 0;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.diako-pwa-guide.is-open .diako-pwa-guide__card {
  transform: translateY(0);
  opacity: 1;
}

.diako-pwa-guide__grip {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #e2e8f0;
}

.diako-pwa-guide__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.diako-pwa-guide__lead {
  margin: 6px 0 12px;
  font-size: 0.85rem;
  color: #475569;
}

.diako-pwa-guide__steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.diako-pwa-guide__step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.7;
}

.diako-pwa-guide__step b {
  color: #ea580c;
  font-weight: 800;
}

.diako-pwa-guide__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #0f172a;
  color: #fdba74;
}

.diako-pwa-guide__icon svg {
  width: 20px;
  height: 20px;
}

.diako-pwa-guide__btn {
  appearance: none;
  border: 0;
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.diako-pwa-guide__btn--secondary {
  margin-top: 8px;
  background: transparent;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 700;
}

@media (min-width: 640px) {
  .diako-pwa-guide__card {
    left: 50%;
    right: auto;
    bottom: 50%;
    width: min(420px, calc(100vw - 32px));
    transform: translate(50%, calc(50% + 16px));
    border-radius: 20px;
  }

  .diako-pwa-guide.is-open .diako-pwa-guide__card {
    transform: translate(50%, 50%);
  }

  .diako-pwa-guide__grip {
    display: none;
  }
}
