/*
 * Raporix - PWA Bilesenleri Stili
 *
 * Synrok temasinin ustune binen ekleme katmandir; mevcut stilleri override etmez.
 * Ana renk: #723da6 (Synrok brand mor).
 *
 * Bilesenler:
 *   .raporix-install-card    Profil sayfasinda "Uygulamayi Yukle" karti
 *   #raporix-install-btn     Install butonu
 *   #raporix-ios-rehber      iOS Safari icin "Ana Ekrana Ekle" rehber modal
 *   .raporix-pwa-gizli       JS tarafindan eklenince elemani gizler (standalone modda)
 */

/* JS standalone tespitinde install UI'yi kaldirir */
.raporix-pwa-gizli {
  display: none !important;
}

/* Install kartinin ikonu — mor brand zemin */
.raporix-install-card .raporix-install-ikon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(114, 61, 166, 0.18);
  color: #723da6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Install butonu — outline mor */
#raporix-install-btn {
  background: #723da6;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.05s ease;
}
#raporix-install-btn:hover {
  background: #5e3289;
}
#raporix-install-btn:active {
  transform: scale(0.97);
}
#raporix-install-btn:disabled {
  background: #b39bd0;
  cursor: not-allowed;
}

/* iOS rehber modal — Bootstrap'in modal/offcanvas'ina alternatif sade bottom-sheet */
#raporix-ios-rehber {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1080;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#raporix-ios-rehber.acik {
  display: flex;
}
#raporix-ios-rehber .ios-rehber-icerik {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 18px 18px 0 0;
  padding: 22px 22px 28px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
  animation: raporix-ios-yukari 0.22s ease;
}
@keyframes raporix-ios-yukari {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
#raporix-ios-rehber .ios-rehber-baslik {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
#raporix-ios-rehber .ios-rehber-baslik .ikon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(114, 61, 166, 0.15);
  color: #723da6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
#raporix-ios-rehber .ios-rehber-baslik h5 {
  margin: 0;
  font-weight: 700;
  color: #1a1f36;
}
#raporix-ios-rehber .ios-rehber-baslik small {
  color: #6c757d;
  font-size: 12.5px;
}
#raporix-ios-rehber ol {
  padding-left: 22px;
  margin: 0 0 18px;
  color: #1a1f36;
  font-size: 14.5px;
  line-height: 1.6;
}
#raporix-ios-rehber ol li {
  margin-bottom: 6px;
}
#raporix-ios-rehber ol li b {
  color: #723da6;
}
#raporix-ios-rehber .ios-paylas-ikon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  vertical-align: middle;
  margin: 0 3px;
}
#raporix-ios-rehber .ios-rehber-not {
  background: #f6f3fb;
  border-left: 3px solid #723da6;
  padding: 10px 12px;
  border-radius: 6px;
  color: #4a3b6a;
  font-size: 13px;
  margin-bottom: 16px;
}
#raporix-ios-rehber .ios-rehber-kapat {
  width: 100%;
  background: #f1f3f5;
  border: none;
  color: #1a1f36;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
}
#raporix-ios-rehber .ios-rehber-kapat:hover {
  background: #e9ecef;
}

/* Dark mode uyumu — Synrok dark-theme.css'i ile cakismasin diye scoped */
html.dark-theme #raporix-ios-rehber .ios-rehber-icerik {
  background: #1f2330;
  color: #e9ecef;
}
html.dark-theme #raporix-ios-rehber .ios-rehber-baslik h5 {
  color: #ffffff;
}
html.dark-theme #raporix-ios-rehber ol {
  color: #e9ecef;
}
html.dark-theme #raporix-ios-rehber .ios-rehber-not {
  background: #2a2540;
  color: #d8c7f0;
}
html.dark-theme #raporix-ios-rehber .ios-rehber-kapat {
  background: #2a2f3e;
  color: #e9ecef;
}

/* ==== Update Toast (Faz 8.B) — yeni SW kuruldugunda kullaniciya bildir ==== */
#raporix-update-toast {
  position: fixed;
  right: 16px;
  bottom: 80px; /* bottom-nav uzeri */
  z-index: 1090;
  max-width: 360px;
  width: calc(100% - 32px);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
}
#raporix-update-toast.acik {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#raporix-update-toast .update-toast-icerik {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(114, 61, 166, 0.12);
  padding: 12px 14px;
  border: 1px solid rgba(114, 61, 166, 0.18);
}
#raporix-update-toast .update-ikon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(114, 61, 166, 0.15);
  color: #723da6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
#raporix-update-toast .update-metin {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
#raporix-update-toast .update-metin strong {
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
}
#raporix-update-toast .update-metin small {
  font-size: 12px;
  color: #6c757d;
  margin-top: 2px;
}
#raporix-update-toast .update-aksiyon {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#raporix-update-toast #raporix-update-yenile {
  background: #723da6;
  color: #ffffff;
  border: none;
  border-radius: 9px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}
#raporix-update-toast #raporix-update-yenile:hover {
  background: #5e3289;
}
#raporix-update-toast #raporix-update-kapat {
  background: transparent;
  border: none;
  color: #6c757d;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#raporix-update-toast #raporix-update-kapat:hover {
  background: #f1f3f5;
  color: #1a1f36;
}

html.dark-theme #raporix-update-toast .update-toast-icerik {
  background: #1f2330;
  border-color: rgba(138, 82, 192, 0.4);
}
html.dark-theme #raporix-update-toast .update-metin strong { color: #ffffff; }
html.dark-theme #raporix-update-toast .update-metin small  { color: #adb5bd; }
html.dark-theme #raporix-update-toast #raporix-update-kapat { color: #adb5bd; }
html.dark-theme #raporix-update-toast #raporix-update-kapat:hover {
  background: #2a2f3e;
  color: #ffffff;
}
