/**
 * Premium in-phone hub preview — ties to Wipper editorial (dark hero + cream site chrome)
 */

.phone-screen:has(.ip-hub-premium) {
  padding: 0 !important;
  background: #0a0c10 !important;
  overflow: hidden;
}

.ip-hub-premium {
  --ip-ink: #f4f2ee;
  --ip-muted: rgba(244, 242, 238, 0.55);
  --ip-surface: rgba(255, 255, 255, 0.06);
  --ip-border: rgba(255, 255, 255, 0.1);
  --ip-wipper: #e85a28;
  --ip-teal: #0d5c63;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  color: var(--ip-ink);
  font-family: var(--font);
  background: #0f1419;
  position: relative;
  overflow: hidden;
}

.ip-hub-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, var(--ip-brand-glow, rgba(94, 184, 176, 0.25)), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(13, 92, 99, 0.35), transparent 50%);
  z-index: 0;
}

.ip-hub-premium > * {
  position: relative;
  z-index: 1;
}

.ip-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ip-muted);
}

.ip-status-dots {
  display: flex;
  gap: 4px;
}

.ip-status-dots span {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.ip-hub-premium .ip-header {
  border: none;
  padding: 8px 14px 12px;
  align-items: flex-start;
}

.ip-hub-premium .ip-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
  object-fit: contain;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ip-hub-premium .ip-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 18px;
}

.ip-hub-premium .ip-header strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ip-ink);
  line-height: 1.15;
}

.ip-hub-premium .ip-sub {
  font-size: 10px;
  color: var(--ip-muted);
  margin-top: 2px;
}

.ip-hub-premium .ip-vertical-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ip-brand, var(--ip-teal));
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--ip-border);
}

.ip-hero-premium {
  margin: 0 12px 12px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  min-height: 148px;
  background: linear-gradient(145deg, var(--ip-brand-deep, #0d5c63) 0%, var(--ip-brand, #5eb8b0) 55%, #1a2830 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.ip-hero-premium.has-photo {
  background-size: cover;
  background-position: center;
}

.ip-hero-premium .ip-hero-overlay {
  background: linear-gradient(180deg, rgba(15, 20, 25, 0.15) 0%, rgba(15, 20, 25, 0.88) 100%) !important;
}

.ip-hero-premium .ip-hero-copy {
  padding: 18px 16px 16px;
}

.ip-hero-premium .ip-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 6px;
}

.ip-hero-premium .ip-hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ip-wipper);
  box-shadow: 0 0 8px var(--ip-wipper);
}

.ip-hero-premium .ip-hero-copy h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.ip-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 12px 12px;
}

.ip-stat {
  text-align: center;
  padding: 10px 6px;
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.ip-stat strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ip-ink);
  line-height: 1.2;
}

.ip-stat span {
  font-size: 9px;
  color: var(--ip-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ip-hub-premium .ip-cta-main {
  margin: 0 12px 12px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--ip-cta, var(--ip-brand)) !important;
  color: var(--ip-cta-text, #fff) !important;
  box-shadow:
    0 4px 20px var(--ip-cta-glow, rgba(232, 90, 40, 0.35)),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.ip-hub-premium .ip-cta-main:active {
  transform: scale(0.98);
}

.ip-actions-premium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 12px 10px;
}

.ip-hub-premium .ip-action {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 10px;
  text-align: left;
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  border-radius: 14px;
  color: var(--ip-ink);
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: background 200ms ease, border-color 200ms ease;
}

.ip-hub-premium .ip-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.ip-action-glyph {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--ip-brand, #5eb8b0), var(--ip-brand-deep, #0d5c63));
  color: #fff;
}

.ip-action-glyph svg {
  width: 16px;
  height: 16px;
}

.ip-trust-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 12px 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ip-trust-strip::-webkit-scrollbar {
  display: none;
}

.ip-trust-chip {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ip-border);
  color: var(--ip-muted);
  white-space: nowrap;
}

.ip-trust-chip em {
  color: var(--ip-brand, #5eb8b0);
  font-style: normal;
}

.ip-hub-premium .ip-tabs {
  margin-top: auto;
  padding: 10px 12px 14px;
  border-top: 1px solid var(--ip-border);
  background: rgba(0, 0, 0, 0.25);
  gap: 6px;
}

.ip-hub-premium .ip-tab {
  font-size: 10px;
  font-weight: 700;
  padding: 10px 4px;
  border-radius: 10px;
  color: var(--ip-muted);
  transition: background 200ms ease, color 200ms ease;
}

.ip-hub-premium .ip-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ip-ink);
  box-shadow: inset 0 0 0 1px var(--ip-border);
}

.ip-hub-premium .ip-panel {
  gap: 0;
}

.ip-hub-premium .ip-toolbar {
  color: var(--ip-ink);
  border-color: var(--ip-border);
  padding: 12px 14px;
}

.ip-hub-premium .ip-back {
  color: var(--ip-ink);
}

.ip-hub-premium .ip-services li,
.ip-hub-premium .ip-proof-item {
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  color: var(--ip-ink);
}

.ip-hub-premium .ip-proof-item.muted {
  color: var(--ip-muted);
}

.ip-hub-premium .ip-contact-copy {
  color: var(--ip-muted);
  padding: 0 14px;
}

.ip-hub-premium .ip-primary {
  margin: 0 12px 12px;
  background: var(--ip-cta, var(--ip-brand)) !important;
  color: var(--ip-cta-text, #fff) !important;
}

.ip-hub-premium .ip-flow-body {
  margin: 0 12px;
  background: var(--ip-surface);
  border: 1px solid var(--ip-border);
  color: var(--ip-ink);
}

.ip-hub-premium .ip-flow-sub {
  color: var(--ip-muted);
}

.ip-hub-premium .ip-step {
  border-color: var(--ip-border);
  color: var(--ip-ink);
}

.ip-wipper-mark {
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  padding-bottom: 6px;
}

/* Light-brand hub — site surface as canvas, premium density retained */
.phone-screen:has(.ip-hub-light) {
  background: var(--ip-bg, #f4f2ee) !important;
}

.ip-hub-light {
  background: var(--ip-bg, #f4f2ee);
  color: var(--ip-ink, #141418);
}

.ip-hub-light::before {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, var(--ip-brand-glow, rgba(94, 184, 176, 0.18)), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(13, 92, 99, 0.12), transparent 50%);
}

.ip-hub-light .ip-status {
  color: var(--ip-muted);
}

.ip-hub-light .ip-status-dots span {
  background: rgba(20, 20, 24, 0.15);
}

.ip-hub-light .ip-header strong {
  color: var(--ip-ink);
}

.ip-hub-light .ip-sub {
  color: var(--ip-muted);
}

.ip-hub-light .ip-vertical-badge {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--ip-border);
}

.ip-hub-light .ip-stat {
  background: var(--ip-surface);
  border-color: var(--ip-border);
}

.ip-hub-light .ip-stat strong {
  color: var(--ip-ink);
}

.ip-hub-light .ip-action {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--ip-border);
  color: var(--ip-ink);
}

.ip-hub-light .ip-trust-chip {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--ip-border);
  color: var(--ip-ink);
}

.ip-hub-light .ip-tabs {
  background: rgba(255, 255, 255, 0.55);
  border-top-color: var(--ip-border);
}

.ip-hub-light .ip-tab {
  color: var(--ip-muted);
}

.ip-hub-light .ip-tab.active {
  color: var(--ip-brand, var(--ip-ink));
  background: rgba(255, 255, 255, 0.85);
}

.ip-hub-light .ip-toolbar,
.ip-hub-light .ip-contact-copy,
.ip-hub-light .ip-flow-sub {
  color: var(--ip-ink);
}

.ip-hub-light .ip-services li,
.ip-hub-light .ip-proof-item,
.ip-hub-light .ip-flow-body {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--ip-border);
  color: var(--ip-ink);
}

.ip-hub-light .ip-wipper-mark {
  color: var(--ip-muted);
}

/* Compare + preview chrome */
.preview-compare {
  background:
    linear-gradient(135deg, var(--surface-warm) 0%, var(--surface) 50%, var(--accent-light) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.preview-compare .compare-arrow {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 32px;
}

.compare-site .compare-thumb {
  background: linear-gradient(160deg, #0f1419 0%, #1a2830 100%);
  min-height: 200px;
}

.compare-site .compare-thumb img {
  object-fit: contain;
  padding: 20px;
  max-height: 180px;
}

.compare-hub .phone-frame {
  box-shadow:
    0 24px 48px rgba(15, 20, 25, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.preview-phone-side .phone-mockup.live {
  width: 280px;
}

.preview-phone-side .phone-frame {
  padding: 10px;
  background: linear-gradient(165deg, #1a1a1e 0%, #0a0a0b 100%);
}

.preview-result {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.preview-phone-side::after {
  content: 'Live preview — tap tabs & actions';
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-tertiary);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

.compare-phone .phone-screen:has(.ip-hub-premium) {
  min-height: 400px;
}

/* Site-fidelity light hub — mirrors source site (e.g. powder blue + rust logo) */
.phone-screen:has(.ip-hub-fidelity) {
  padding: 0 !important;
  background: var(--ip-surface, #acd2e0) !important;
  overflow: hidden;
}

.ip-hub-fidelity {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  background: var(--ip-surface, #acd2e0);
  color: var(--ip-accent, #b8400d);
  font-family: var(--font);
}

.ip-hub-fidelity .ip-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.ip-fidelity-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
}

.ip-fidelity-bird {
  width: 28px;
  height: 20px;
  opacity: 0.85;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath fill='%23000' d='M4 14c6-8 14-10 22-8 2 6-2 12-10 14-4-2-8-4-12-6z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath fill='%23000' d='M4 14c6-8 14-10 22-8 2 6-2 12-10 14-4-2-8-4-12-6z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.ip-fidelity-menu {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.ip-fidelity-hero {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 16px 10px;
  min-height: 0;
}

.ip-fidelity-hero-photo {
  width: 100%;
  height: 72px;
  margin-bottom: 8px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.ip-fidelity-logo {
  width: min(82%, 200px);
  max-height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.08));
}

.ip-fidelity-logo-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
}

.ip-fidelity-tagline {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.4;
  opacity: 0.9;
  max-width: 92%;
}

.ip-fidelity-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.ip-fidelity-col {
  text-align: center;
  padding: 6px 2px;
  min-width: 0;
}

.ip-fidelity-col-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.ip-fidelity-col p {
  font-size: 8px;
  line-height: 1.35;
  color: var(--ip-accent);
  opacity: 0.85;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ip-fidelity-hub-card {
  margin: 0 10px 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  box-sizing: border-box;
  width: calc(100% - 20px);
  max-width: 100%;
  overflow: hidden;
}

.ip-hub-fidelity .ip-cta-main {
  width: 100%;
  margin: 0 0 8px;
  padding: 11px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ip-cta-text, #fff) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.ip-fidelity-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.ip-fidelity-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  min-width: 0;
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid;
  background: rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
}

.ip-fidelity-action-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-fidelity-action-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ip-fidelity-action-icon svg {
  width: 13px;
  height: 13px;
}

.ip-hub-fidelity .ip-tabs {
  margin-top: auto;
  padding: 8px 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.25);
}

.ip-hub-fidelity .ip-tab {
  font-size: 10px;
  font-weight: 700;
  color: var(--ip-accent);
  opacity: 0.55;
  padding: 8px 4px;
  border-radius: 8px;
}

.ip-hub-fidelity .ip-tab.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.5);
}

.ip-hub-fidelity .ip-services li,
.ip-hub-fidelity .ip-proof-item,
.ip-hub-fidelity .ip-flow-body {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ip-accent);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.ip-hub-fidelity .ip-toolbar,
.ip-hub-fidelity .ip-contact-copy {
  color: var(--ip-accent);
  padding: 0 14px;
}

.compare-site .compare-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-site .compare-thumb img {
  padding: 24px;
  max-height: 160px;
}

.compare-phone .phone-screen:has(.ip-hub-fidelity) {
  min-height: 400px;
}
