/* Hyper PWA - iOS Install Prompt Styling */

:root {
  --hypwa-ios-bg: rgba(255, 255, 255, 0.95);
  --hypwa-ios-text: #1f2937;
  --hypwa-ios-subtext: #4b5563;
  --hypwa-ios-border: rgba(229, 231, 235, 0.5);
  --hypwa-ios-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --hypwa-ios-accent: #007aff; /* Apple Blue */
}

@media (prefers-color-scheme: dark) {
  :root {
    --hypwa-ios-bg: rgba(28, 28, 30, 0.95);
    --hypwa-ios-text: #f9fafb;
    --hypwa-ios-subtext: #9ca3af;
    --hypwa-ios-border: rgba(63, 63, 70, 0.5);
    --hypwa-ios-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  }
}

.hypwa-ios-prompt-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hypwa-ios-prompt-card {
  width: 100%;
  max-width: 420px;
  background: var(--hypwa-ios-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--hypwa-ios-border);
  border-radius: 16px;
  box-shadow: var(--hypwa-ios-shadow);
  padding: 16px;
  pointer-events: auto;
  box-sizing: border-box;
  animation: hypwa-slide-up 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

@keyframes hypwa-slide-up {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hypwa-ios-prompt-card.hypwa-dismissed {
  animation: hypwa-slide-down 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hypwa-slide-down {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(120%);
    opacity: 0;
  }
}

.hypwa-ios-prompt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 24px;
}

.hypwa-ios-prompt-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

.hypwa-ios-prompt-title-block h4 {
  margin: 0 0 2px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--hypwa-ios-text);
  line-height: 1.2;
}

.hypwa-ios-prompt-title-block p {
  margin: 0;
  font-size: 12px;
  color: var(--hypwa-ios-subtext);
}

.hypwa-ios-prompt-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--hypwa-ios-subtext);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: background-color 0.2s;
}

.hypwa-ios-prompt-close:hover {
  background-color: rgba(120, 120, 128, 0.1);
}

.hypwa-ios-prompt-body {
  border-top: 1px solid var(--hypwa-ios-border);
  padding-top: 12px;
}

.hypwa-ios-prompt-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--hypwa-ios-text);
  line-height: 1.4;
  margin-bottom: 10px;
}

.hypwa-ios-prompt-step:last-child {
  margin-bottom: 0;
}

.hypwa-ios-prompt-step-number {
  background: var(--hypwa-ios-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.hypwa-ios-prompt-step-text {
  flex-grow: 1;
}

.hypwa-ios-prompt-icon-inline {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
}

.hypwa-ios-prompt-icon-inline svg {
  width: 18px;
  height: 18px;
  fill: var(--hypwa-ios-accent);
}

/* Arrow indicator pointing to Safari share button (only on mobile portrait) */
.hypwa-ios-prompt-card::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: var(--hypwa-ios-bg) transparent;
  display: block;
  width: 0;
}
