/* ============================================================
   Trial News Europe — iOS Install Guide Styles
   ============================================================ */

/* ── Teaser Banner ── */
.ios-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--color-bg, #fff);
  border-top: 1px solid var(--color-divider, #e5e5e5);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: system-ui, -apple-system, sans-serif;
}
.ios-install-banner.ios-ib-visible {
  transform: translateY(0);
}

.ios-ib-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(200, 16, 46, 0.06);
}

.ios-ib-text {
  flex: 1;
  min-width: 0;
}
.ios-ib-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text, #111);
  line-height: 1.3;
}
.ios-ib-subtitle {
  font-size: 13px;
  color: var(--color-text-muted, #666);
  line-height: 1.4;
  margin-top: 2px;
}

.ios-ib-actions {
  display: flex;
  gap: 8px;
  flex-basis: 100%;
  margin-top: 4px;
}
.ios-ib-cta {
  flex: 1;
  background: #C8102E;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.ios-ib-cta:active { background: #a10d25; }

.ios-ib-dismiss {
  background: transparent;
  color: var(--color-text-muted, #888);
  border: 1px solid var(--color-divider, #ddd);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}


/* ── Step-by-step Guide Overlay ── */
.ios-ig-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  font-family: system-ui, -apple-system, sans-serif;
}
.ios-ig-overlay.ios-ig-visible {
  pointer-events: auto;
}

.ios-ig-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.35s;
}
.ios-ig-visible .ios-ig-backdrop {
  opacity: 1;
}

.ios-ig-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--color-bg, #fff);
  border-radius: 20px 20px 0 0;
  padding: 12px 24px 32px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ios-ig-visible .ios-ig-sheet {
  transform: translateY(0);
}

/* Dark mode */
[data-theme="dark"] .ios-ig-sheet {
  background: var(--color-bg, #1a1a1a);
}
[data-theme="dark"] .ios-install-banner {
  background: var(--color-bg, #1a1a1a);
  border-top-color: var(--color-divider, #333);
}

.ios-ig-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-divider, #ccc);
  margin: 0 auto 18px;
}

.ios-ig-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.ios-ig-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.ios-ig-app-logo {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.ios-ig-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text, #111);
}
.ios-ig-header-sub {
  font-size: 13px;
  color: var(--color-text-muted, #888);
  margin-top: 2px;
}

/* ── Steps ── */
.ios-ig-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ios-ig-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-divider, #eee);
  position: relative;
}
.ios-ig-step:last-child {
  border-bottom: none;
}

.ios-ig-step-num {
  font-size: 11px;
  font-weight: 700;
  color: #C8102E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: absolute;
  top: 6px;
  left: 0;
}
.ios-ig-step {
  padding-top: 26px;
}

.ios-ig-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(200, 16, 46, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #C8102E;
}
.ios-ig-share-icon {
  color: #007AFF; /* iOS blue for the share icon */
  background: rgba(0, 122, 255, 0.08);
}
.ios-ig-check-icon {
  color: #34C759; /* iOS green for the check */
  background: rgba(52, 199, 89, 0.08);
}

.ios-ig-step-text {
  flex: 1;
  font-size: 15px;
  color: var(--color-text, #333);
  line-height: 1.4;
}

.ios-ig-step-hint {
  flex-shrink: 0;
}
.ios-ig-arrow-down {
  font-size: 16px;
  color: var(--color-text-muted, #bbb);
  animation: ios-ig-bounce 1.5s ease-in-out infinite;
}

@keyframes ios-ig-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ── Close button ── */
.ios-ig-close-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: #C8102E;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.ios-ig-close-btn:active {
  background: #a10d25;
}

/* ── Safari bottom bar safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .ios-install-banner {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .ios-ig-sheet {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}
