/* Ortak PWA bağlantı ve güncelleme bildirimleri */
@font-face {
  font-family: "Tahmisci Poppins";
  src: url("/assets/fonts/poppins-regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Tahmisci Poppins";
  src: url("/assets/fonts/poppins-semibold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600;
}

@font-face {
  font-family: "Tahmisci Poppins";
  src: url("/assets/fonts/poppins-bold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

html[data-pwa-app] body {
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.pwa-notice {
  position: fixed;
  z-index: 100000;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  width: min(560px, calc(100vw - 28px));
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(90, 47, 29, 0.24);
  border-radius: 14px;
  background: #fffaf3;
  color: #2c1609;
  box-shadow: 0 14px 36px rgba(61, 31, 16, 0.2);
  font-family: "Tahmisci Poppins", Poppins, Inter, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  transform: translateX(-50%);
}

.pwa-notice--offline {
  border-color: rgba(185, 80, 45, 0.38);
  background: #fff2e7;
}

.pwa-notice--install {
  border-color: rgba(85, 107, 47, .32);
  background: #f6f3e8;
}

.pwa-notice--push-intro {
  border-color: rgba(90, 47, 29, .3);
  background: #fff8ee;
}

.pwa-notice__copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.pwa-notice__copy strong {
  font-size: 13px;
  font-weight: 700;
}

.pwa-notice__copy span {
  color: #806b5b;
}

.pwa-notice__action,
.pwa-notice__secondary,
.pwa-notice__close {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pwa-notice__action {
  flex: 0 0 auto;
  padding: 0 14px;
  background: #5a2f1d;
  color: #fffaf3;
}

.pwa-notice__secondary {
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid rgba(90, 47, 29, .2);
  background: #fffaf3;
  color: #5a2f1d;
}

.pwa-notice__close {
  flex: 0 0 40px;
  padding: 0;
  background: transparent;
  color: #5a2f1d;
  font-size: 24px;
  line-height: 1;
}

.pwa-notice__action:hover,
.pwa-notice__secondary:hover,
.pwa-notice__close:hover {
  box-shadow: 0 6px 16px rgba(61, 31, 16, 0.16);
}

.pwa-notice__action:focus-visible,
.pwa-notice__secondary:focus-visible,
.pwa-notice__close:focus-visible {
  outline: 3px solid rgba(185, 80, 45, 0.38);
  outline-offset: 2px;
}

.pwa-notice__action:disabled,
.pwa-notice__secondary:disabled {
  cursor: wait;
  opacity: 0.64;
}

[data-pwa-offline-page] {
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 18px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: #fbf6ee;
  color: #2c1609;
  font-family: "Tahmisci Poppins", Poppins, Inter, system-ui, sans-serif;
}

.pwa-offline-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid rgba(90, 47, 29, 0.18);
  border-radius: 18px;
  background: #fffaf3;
  box-shadow: 0 16px 38px rgba(61, 31, 16, 0.12);
  text-align: center;
}

.pwa-offline-card img {
  width: 92px;
  height: 92px;
  border-radius: 20px;
}

.pwa-offline-card h1 {
  margin: 18px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 8vw, 38px);
}

.pwa-offline-card p {
  margin: 0;
  color: #806b5b;
  font-size: 14px;
  line-height: 1.6;
}

.pwa-offline-card a {
  min-height: 42px;
  margin-top: 20px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: #5a2f1d;
  color: #fffaf3;
  font: 700 13px "Tahmisci Poppins", Poppins, Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 560px) {
  .pwa-notice {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .pwa-notice__copy {
    flex-basis: calc(100% - 52px);
  }

  .pwa-notice__action {
    flex: 1 1 100%;
  }

  .pwa-notice__secondary {
    flex: 1 1 100%;
  }
}

@media (display-mode: standalone) {
  html[data-pwa-app="personel"] .personel-dashboard,
  html[data-pwa-app="yonetici"] .admin-shell {
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
  }

  html[data-pwa-app="personel"] .personel-sidebar,
  html[data-pwa-app="yonetici"] .sidebar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-notice,
  .pwa-notice * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
