/* RZ PWA Plus — Frontend styles
 * Brand: #d6336c primary · #831843 deep · #fdf2f8 soft · Georgia serif headlines
 */

/* ─── Hamburger menu install item ──────────────────────── */
.menu-item.rzpwa-menu-install > a {
  position: relative;
  font-weight: 600 !important;
  color: #d6336c !important;
}

.menu-item.rzpwa-menu-install > a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #d6336c;
  border-radius: 50%;
  opacity: 0.6;
}

/* ─── Generic install button (shortcode + promo + banner) ── */
.rzpwa-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border: 0;
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.rzpwa-button-primary {
  background: linear-gradient(135deg, #d6336c 0%, #831843 100%);
  color: #ffffff;
  box-shadow: 0 8px 22px -8px rgba(214, 51, 108, 0.55);
}

.rzpwa-button-primary:hover,
.rzpwa-button-primary:focus {
  background: linear-gradient(135deg, #e94989 0%, #9b1c50 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -8px rgba(214, 51, 108, 0.7);
  color: #ffffff;
  outline: none;
}

.rzpwa-button-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 18px;
  font-size: 13.5px;
}

.rzpwa-button-ghost:hover {
  color: #ffffff;
}

/* ─── Promo block (shortcode [rzpwa_promo]) ──────────── */
.rzpwa-promo {
  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 56px;
  margin: 32px auto;
  max-width: 920px;
  background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 60%, #fce7f3 100%);
  border: 1px solid #fbcfe8;
  border-radius: 20px;
  box-shadow:
    0 24px 60px -24px rgba(214, 51, 108, 0.15),
    0 8px 16px -8px rgba(131, 24, 67, 0.08);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rzpwa-promo::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(214, 51, 108, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.rzpwa-promo-phone {
  position: relative;
  width: 200px;
  height: 380px;
  margin: 0 auto;
  background: #18181b;
  border-radius: 36px;
  padding: 8px;
  box-shadow:
    0 30px 50px -20px rgba(24, 24, 27, 0.4),
    0 12px 24px -8px rgba(131, 24, 67, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.rzpwa-promo-phone::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #18181b;
  border-radius: 12px;
  z-index: 2;
}

.rzpwa-promo-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.rzpwa-promo-app-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #d6336c 0%, #831843 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 12px 28px -8px rgba(214, 51, 108, 0.5);
  position: relative;
}

.rzpwa-promo-app-icon::after {
  content: "";
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
}

.rzpwa-promo-app-label {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  color: #831843;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.rzpwa-promo-content {
  position: relative;
  z-index: 1;
}

.rzpwa-promo-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #831843;
  background: rgba(214, 51, 108, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.rzpwa-promo-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: #18181b;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}

.rzpwa-promo-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: #52525b;
  margin: 0 0 24px;
  max-width: 420px;
}

.rzpwa-promo-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .rzpwa-promo {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 28px;
    gap: 32px;
  }
  .rzpwa-promo-phone { width: 160px; height: 320px; }
  .rzpwa-promo-app-icon { width: 64px; height: 64px; font-size: 38px; border-radius: 18px; }
  .rzpwa-promo-title { font-size: 24px; }
  .rzpwa-promo-actions { justify-content: center; }
  .rzpwa-promo-subtitle { margin-left: auto; margin-right: auto; }
}

/* ─── Install banner (post-purchase, on configured paths) ── */
.rzpwa-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(140%);
  width: calc(100% - 24px);
  max-width: 460px;
  background: #18181b;
  color: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 9998;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  opacity: 0;
}

.rzpwa-banner.rzpwa-banner-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.rzpwa-banner-inner {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  padding: 18px 18px 16px;
  align-items: center;
}

.rzpwa-banner-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #d6336c 0%, #831843 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  position: relative;
  flex-shrink: 0;
}

.rzpwa-banner-icon::after {
  content: "";
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
}

.rzpwa-banner-content {
  min-width: 0;
}

.rzpwa-banner-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fbcfe8;
  margin: 0 0 4px;
}

.rzpwa-banner-title {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 4px;
  color: #ffffff;
}

.rzpwa-banner-subtitle {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.rzpwa-banner-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.rzpwa-banner-actions .rzpwa-button {
  flex: 1;
  padding: 11px 18px;
  font-size: 13.5px;
}

.rzpwa-banner-actions .rzpwa-button-primary {
  flex: 2;
}

/* ─── Manual hint overlay (Safari fallback) ──────────── */
.rzpwa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rzpwa-overlay.rzpwa-overlay-active {
  opacity: 1;
}

.rzpwa-overlay-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rzpwa-overlay.rzpwa-overlay-active .rzpwa-overlay-card {
  transform: translateY(0);
}

@media (min-width: 600px) {
  .rzpwa-overlay {
    align-items: center;
  }
}

.rzpwa-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f4f4f5;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #71717a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.rzpwa-overlay-close:hover {
  background: #e4e4e7;
  color: #18181b;
}

.rzpwa-overlay-title {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #18181b;
  margin: 0 28px 20px 0;
  line-height: 1.3;
}

.rzpwa-hint-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rzpwa-hint-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #fdf2f8;
  border-radius: 10px;
  font-size: 14px;
  color: #18181b;
  line-height: 1.5;
}

.rzpwa-hint-step-num {
  width: 28px;
  height: 28px;
  background: #d6336c;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* ─── Visibility helpers ──────────────────────────────── */
[hidden] {
  display: none !important;
}

/* ═════════════════════════════════════════════════════════════
   RZ Header Plus integrácia (.rzpwa-rzhp-install)
   Desktop link sa skryje na mobile, mobile link sa skryje na desktop.
   RZHP používa breakpoint 980px pre mobile drawer.
   ═════════════════════════════════════════════════════════════ */

/* Desktop install link v RZHP menu — viditeľný iba na desktope */
.rzhp-menu-item.rzpwa-rzhp-install > a {
  font-weight: 600 !important;
  color: #d6336c !important;
}

.rzhp-menu-item.rzpwa-rzhp-install > a::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #d6336c;
  border-radius: 50%;
  margin-right: 6px;
  opacity: 0.7;
  vertical-align: middle;
}

/* Mobile drawer link — RZHP renderuje plain <li> (bez .rzhp-menu-item).
   Ten je vnútri .rzhp-mobile-menu, takže sa zobrazí iba keď je drawer otvorený. */
.rzhp-mobile-menu .rzpwa-rzhp-install > a {
  font-weight: 600 !important;
  color: #d6336c !important;
}

/* Pre istotu — duplicitné install items SKRY (defensive CSS).
   Ak by sa náhodou link pridal 2× kvôli race condition,
   zobrazí sa iba prvý. */
.rzhp-menu .rzpwa-rzhp-install ~ .rzpwa-rzhp-install,
.rzhp-mobile-menu .rzpwa-rzhp-install ~ .rzpwa-rzhp-install,
.menu-item.rzpwa-menu-install ~ .rzpwa-menu-install,
.menu-item.rzpwa-menu-install + .menu-item.rzpwa-rzhp-install,
.rzhp-menu-item.rzpwa-rzhp-install + .menu-item.rzpwa-menu-install {
  display: none !important;
}
