/* NikahNoor PWA — shell, splash, install banner
   <link rel="stylesheet" href="/pwa.css?v=4">
*/

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

a, button, [role="button"], label, select, summary, input[type="submit"] {
  touch-action: manipulation;
}

img {
  -webkit-user-drag: none;
}

@media (max-width: 860px) {
  input, select, textarea {
    font-size: 16px;
  }
}

/* Standalone (installed) app */
@media (display-mode: standalone) {
  body {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* ---------- Splash ---------- */
.nn-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #120c0e;
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.nn-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nn-splash__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.nn-splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 8, 10, 0.88) 0%,
    rgba(12, 8, 10, 0.45) 45%,
    rgba(12, 8, 10, 0.55) 100%
  );
  pointer-events: none;
}

.nn-splash__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  max-width: 280px;
}

.nn-splash__mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.1rem;
  border-radius: 24px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.nn-splash__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nn-splash__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

.nn-splash__title em {
  font-style: italic;
  color: #F4A8BB;
}

.nn-splash__sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.25rem;
  line-height: 1.4;
  font-family: system-ui, -apple-system, sans-serif;
}

.nn-splash__bar {
  width: 120px;
  height: 3px;
  margin: 0 auto;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.nn-splash__bar > i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, #E8577A, #F4A8BB);
  animation: nnSplashLoad 1.1s ease-in-out infinite;
}

@keyframes nnSplashLoad {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Install banner ---------- */
.nn-install {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483646 !important;
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  background: #1a1416 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}

.nn-install.is-on {
  display: flex !important;
}

.nn-install__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
}

.nn-install__txt {
  flex: 1;
  min-width: 0;
}

.nn-install__txt b {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 2px;
  line-height: 1.25;
}

.nn-install__txt span {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65) !important;
  line-height: 1.3;
}

.nn-install__btn {
  border: 0;
  border-radius: 99px;
  background: #E8577A !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.55rem 1rem;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.nn-install__btn:hover {
  background: #C03459 !important;
}

.nn-install__x {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
  flex-shrink: 0;
}

.nn-install__x:hover {
  color: #fff;
}