/* Media, xəritə və yeni modul komponentləri (styles.css-ə əlavə). */

/* ---------- Şəkil / video idarəsi ---------- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.media-slot {
  position: relative; overflow: hidden; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 6px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.media-slot:hover:not(.filled):not(:disabled) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.media-slot.filled { padding: 0; border-style: solid; border-color: var(--line); cursor: default; background: #000; }
.media-slot.busy { opacity: .7; cursor: progress; }
.media-slot img, .media-slot video, .vthumb, .vthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb { position: relative; background: #000; }
.media-play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .55); }
.media-del {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 50%; color: #fff; background: rgba(15, 23, 42, .72); cursor: pointer;
}
.media-del:hover { background: var(--danger); }
.media-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .18); }
.media-prog i { display: block; width: 0; height: 100%; background: var(--brand); transition: width .15s; }

/* ---------- Müştəri tərəfi: önbaxış və qalereya ---------- */
.media-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.media-strip .thumb {
  position: relative; flex: none; width: 76px; height: 76px; padding: 0; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; border-radius: 14px; background: #000;
}
.media-strip .thumb img, .media-strip .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-strip .thumb.on { border-color: var(--brand); }
.gallery-view { display: grid; place-items: center; min-height: 220px; max-height: 60vh; overflow: hidden; border-radius: 18px; background: #000; }
.gallery-view img, .gallery-view video { max-width: 100%; max-height: 60vh; display: block; }
.svc-thumb { width: 54px; height: 54px; flex: none; object-fit: cover; border-radius: 15px; }

/* ---------- Xəritə ---------- */
.map-pick { height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--primary-soft); z-index: 0; }
.loc-details summary { cursor: pointer; padding: 4px 0; color: var(--primary); font-weight: 700; font-size: 14px; }
.loc-details[open] summary { margin-bottom: 4px; }
.map-frame { display: block; width: 100%; height: 220px; border: 0; border-radius: 16px; background: var(--primary-soft); }

/* ---------- Xidmət kartı (media ilə) ---------- */
.svc-card { display: block; padding: 14px; }
.svc-card .svc-main { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }

/* ---------- PWA: "Mobil tətbiq" düyməsi, quraşdırma bannerı, pəncərə ---------- */
/* Düymə: Qeydly_mobil.png şəklinin telefonlar olan kvadrat hissəsi. */
.app-cta {
  --s: 42px;
  position: relative; flex: none; width: var(--s); height: var(--s); padding: 0; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: 13px;
  background: var(--surface); box-shadow: 0 6px 14px rgba(91, 80, 230, .22);
  animation: appWiggle 4.5s ease-in-out infinite; transform-origin: 50% 60%;
}
.app-cta .pic {
  position: absolute; inset: 0; border-radius: 11.5px;
  background: url(../img/Qeydly_mobil.png) no-repeat;
  background-size: calc(var(--s) * 1.816) auto;
  background-position: calc(var(--s) * -0.635) calc(var(--s) * -0.027);
}
.app-cta::after {
  content: ''; position: absolute; inset: -2px; border-radius: 15px; pointer-events: none;
  border: 2px solid var(--brand); opacity: 0; animation: appPulse 2.2s ease-out infinite;
}
.app-cta:active { transform: scale(.94); }
@keyframes appPulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes appWiggle {
  0%, 76%, 100% { transform: none; }
  80% { transform: rotate(-10deg) scale(1.06); }
  84% { transform: rotate(9deg) scale(1.06); }
  88% { transform: rotate(-6deg); }
  92% { transform: rotate(4deg); }
}
@media (min-width: 960px) { .app-cta.m-only { display: none; } }

.install-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; pointer-events: none;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0;
  transform: translateY(-130%); opacity: 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s;
}
.install-banner.in { transform: none; opacity: 1; }
.ib-card {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  max-width: 520px; margin: 0 auto; padding: 10px 8px 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.ib-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; object-fit: cover; }
.ib-close { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.ib-close:hover { background: var(--primary-soft); color: var(--ink); }

.app-hero { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: how; }
.how li { display: flex; align-items: flex-start; gap: 12px; counter-increment: how; }
.how li::before {
  content: counter(how); flex: none; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800;
}
.how li span { padding-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .app-cta, .app-cta::after { animation: none; }
  .install-banner { transition: none; }
}
