/* ══════════════════════════════════════════════════════════════════
   Redesign-Preview  (Phase 2)
   Rendert aus echten, extrahierten Inhalten + FLUX-Bildwelt ein
   poliertes, lesbares "so-könnte-es-aussehen"-Mockup im Chat.
   Akzentfarbe kommt pro Marke über --rp-accent.
   ══════════════════════════════════════════════════════════════════ */
.rp-frame {
    --rp-accent: #2A343D;
    --rp-radius: 14px;
    font-family: 'Inter', 'Inter Fallback', sans-serif;
    width: 100%;
    border-radius: var(--rp-radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 50px rgba(42,52,61,0.20), 0 2px 8px rgba(42,52,61,0.10);
    border: 1px solid rgba(42,52,61,0.08);
    color: #1a1f24;
}

/* Browser-Chrome — signalisiert "echte Website" */
.rp-chrome {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    background: #f1f3f5;
    border-bottom: 1px solid rgba(42,52,61,0.08);
}
.rp-dot { width: 9px; height: 9px; border-radius: 50%; background: #cfd6dc; flex-shrink: 0; }
.rp-dot:nth-child(1) { background: #ff5f57; }
.rp-dot:nth-child(2) { background: #febc2e; }
.rp-dot:nth-child(3) { background: #28c840; }
.rp-urlbar {
    margin-left: 8px; flex: 1;
    background: #fff; border: 1px solid rgba(42,52,61,0.10);
    border-radius: 999px; padding: 4px 12px;
    font-size: 10.5px; color: #64748b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Nav ── */
.rp-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    background: #fff;
}
.rp-brand { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: #1a1f24; }
.rp-nav-links { display: flex; gap: 16px; }
.rp-nav-links span { font-size: 11px; color: #64748b; font-weight: 500; }
.rp-nav-cta {
    font-size: 11px; font-weight: 600; color: #fff;
    background: var(--rp-accent); padding: 6px 13px; border-radius: 999px;
}

/* ── Hero ── */
.rp-hero { position: relative; min-height: 260px; display: flex; align-items: flex-end; overflow: hidden; }
.rp-hero-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.rp-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,19,23,0.15) 0%, rgba(15,19,23,0.55) 55%, rgba(15,19,23,0.86) 100%);
}
.rp-hero-content { position: relative; z-index: 1; padding: 22px 20px 24px; max-width: 92%; }
.rp-eyebrow {
    text-transform: uppercase; letter-spacing: 0.22em; font-size: 9.5px; font-weight: 700;
    color: #fff; opacity: 0.85; margin: 0 0 8px;
}
.rp-headline {
    font-family: 'Roboto', 'Roboto Fallback', sans-serif;
    font-weight: 900; letter-spacing: -0.02em; line-height: 1.05;
    font-size: clamp(1.5rem, 6vw, 2.3rem); color: #fff; margin: 0 0 10px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.rp-sub { font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,0.9); margin: 0 0 16px; max-width: 30rem; }
.rp-cta {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--rp-accent); color: #fff; border: none;
    font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700;
    padding: 10px 18px; border-radius: 999px; cursor: default;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.rp-cta svg { width: 13px; height: 13px; }

/* ── Features ── */
.rp-features {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    padding: 18px 18px 22px; background: #f8fafc;
}
.rp-card {
    background: #fff; border: 1px solid rgba(42,52,61,0.07);
    border-radius: 12px; padding: 13px 13px 15px;
    box-shadow: 0 1px 2px rgba(42,52,61,0.04);
}
.rp-card-ic {
    width: 26px; height: 26px; border-radius: 8px; margin-bottom: 9px;
    background: color-mix(in srgb, var(--rp-accent) 14%, #fff);
    display: flex; align-items: center; justify-content: center;
}
.rp-card-ic::before {
    content: ''; width: 11px; height: 11px; border-radius: 3px;
    background: var(--rp-accent); opacity: 0.85;
}
.rp-card h3 { font-size: 12px; font-weight: 700; color: #1a1f24; margin: 0 0 5px; letter-spacing: -0.01em; }
.rp-card p { font-size: 10.5px; line-height: 1.5; color: #64748b; margin: 0; }

/* ── Ton-Varianten (subtile Anpassung) ── */
.rp-frame[data-tone="elegant"] { --rp-radius: 18px; }
.rp-frame[data-tone="elegant"] .rp-headline { font-family: 'Playfair Display','Playfair Fallback',serif; font-weight: 700; font-style: italic; }
.rp-frame[data-tone="minimal"] .rp-hero-overlay { background: linear-gradient(180deg, rgba(15,19,23,0.05), rgba(15,19,23,0.7)); }
.rp-frame[data-tone="bold"]    .rp-headline { font-size: clamp(1.7rem, 7vw, 2.6rem); }
.rp-frame[data-tone="playful"] { --rp-radius: 20px; }
.rp-frame[data-tone="playful"] .rp-card { border-radius: 16px; }

/* Mobil: Features untereinander */
@media (max-width: 460px) {
    .rp-features { grid-template-columns: 1fr; }
    .rp-nav-links { display: none; }
}

/* Label über dem Mockup */
.rp-caption {
    display: flex; align-items: center; gap: 7px;
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
    color: #675c8e; margin: 2px 0 9px;
}
.rp-caption .rp-badge {
    background: rgba(103,92,142,0.12); color: #675c8e;
    padding: 2px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════════════
   Audit-Integration: Redesign-Sektion im Live-Audit-Panel
   ══════════════════════════════════════════════════════════════════ */
.ch-rd {
    margin-top: 4px; padding: 18px 16px 20px;
    border-top: 1px solid rgba(42,52,61,0.08);
    font-family: 'Inter', 'Inter Fallback', sans-serif;
}
.ch-rd[hidden] { display: none; }
.ch-rd-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 13px; flex-wrap: wrap;
}
.ch-rd-title {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 13.5px; font-weight: 700; color: #1a1f24; letter-spacing: -0.01em;
}
.ch-rd-badge {
    background: linear-gradient(135deg, #675c8e, #574d78); color: #fff;
    font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em;
    padding: 3px 8px; border-radius: 999px;
}
/* Vorher/Nachher-Toggle */
.ch-rd-toggle {
    display: inline-flex; background: #eef1f4; border-radius: 999px; padding: 3px;
}
.ch-rd-toggle[hidden] { display: none; }
.ch-rd-tab {
    border: none; background: transparent; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; color: #64748b;
    padding: 5px 13px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.ch-rd-tab.is-active { background: #fff; color: #1a1f24; box-shadow: 0 1px 3px rgba(42,52,61,0.12); }

/* Ladezustand */
.ch-rd-loading {
    display: flex; align-items: center; gap: 11px;
    padding: 22px 16px; border-radius: 14px;
    background: linear-gradient(110deg, #f8fafc, #f1f3f5);
    border: 1px solid rgba(42,52,61,0.06);
}
.ch-rd-loading[hidden] { display: none; }
.ch-rd-spinner {
    width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
    border: 2.5px solid rgba(103,92,142,0.22); border-top-color: #675c8e;
    animation: chRdSpin 0.8s linear infinite;
}
@keyframes chRdSpin { to { transform: rotate(360deg); } }
.ch-rd-loading-text { font-size: 12.5px; color: #475569; font-weight: 500; }

/* Stage: Vorher/Nachher übereinander, nur .is-active sichtbar */
.ch-rd-stage { position: relative; }
.ch-rd-stage[hidden] { display: none; }
.ch-rd-view { display: none; animation: chRdFade 0.35s cubic-bezier(0.16,1,0.3,1); }
.ch-rd-view.is-active { display: block; }
@keyframes chRdFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ch-rd-before-img {
    display: block; width: 100%; height: auto;
    border-radius: 14px; border: 1px solid rgba(42,52,61,0.10);
    box-shadow: 0 8px 24px rgba(42,52,61,0.10);
}

/* Fehlerzustand */
.ch-rd-error {
    padding: 14px 16px; border-radius: 12px; font-size: 12px; line-height: 1.5;
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
}
.ch-rd-error[hidden] { display: none; }

/* CTA */
.ch-rd-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 14px; padding: 13px 15px; border-radius: 14px; flex-wrap: wrap;
    background: linear-gradient(135deg, #f6f3fb, #eef1f4);
    border: 1px solid rgba(103,92,142,0.16);
}
.ch-rd-cta[hidden] { display: none; }
.ch-rd-cta-text { font-size: 12.5px; font-weight: 600; color: #1a1f24; }
.ch-rd-cta-btn {
    background: #2A343D; color: #fff; border: none; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 700;
    padding: 9px 16px; border-radius: 999px;
    transition: background 0.18s, transform 0.18s;
}
.ch-rd-cta-btn:hover { background: #3d4f5c; transform: translateY(-1px); }
.ch-rd-cta-btn:active { transform: translateY(0) scale(0.97); }

/* ── Redesign als Chat-Nachricht (im Gesprächsverlauf) ── */
.ch-bubble.ch-rd-msg {
    max-width: 100% !important; width: 100%;
    padding: 12px 12px 14px;
}
.ch-rd-msg-intro {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
    color: #1a1f24; margin: 0 0 11px;
}
.ch-rd-msg .ch-rd-toggle { margin: 0 0 10px; }
.ch-rd-msg-stage { position: relative; }
.ch-rd-msg-cta { margin-top: 13px; width: 100%; justify-content: center; }
.ch-rd-msg .ch-rd-loading { margin: 2px 0; }

/* Echtes Logo der Kundenseite in der Redesign-Nav */
.rp-logo { height: 24px; width: auto; max-width: 150px; object-fit: contain; display: block; }
