/* CES Event Planner — Wizard Form Styles (mobile-first) */

:root {
    --cesep-primary: #17B14B;
    --cesep-primary-dark: #12903d;
    --cesep-bg: #fafaf8;
    --cesep-border: #e5e7eb;
    --cesep-text: #1f2937;
    --cesep-muted: #6b7280;
    --cesep-error: #dc2626;
    --cesep-radius: 12px;
}

.ces-ep-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 260px 16px 80px;
    color: var(--cesep-text);
}
@media (max-width: 849px) { .ces-ep-wrap { padding-top: 200px; padding-bottom: 60px; } }

/* Public-Page Wrappers (lead-result, event-idea ready+processing, lead-error)
   brauchen Top-Offset gegen den sticky Flatsome-Header. .ces-ep-wrap hat's schon,
   landing.php nutzt .ces-ep-wrap und ist damit auch abgedeckt. */
.ces-lp-result-wrap,
.ces-idea-page,
.ces-idea-processing {
    padding-top: 260px;
}
@media (max-width: 849px) {
    .ces-lp-result-wrap,
    .ces-idea-page,
    .ces-idea-processing {
        padding-top: 200px;
    }
}

.ces-ep-intro {
    text-align: center;
    margin-bottom: 24px;
}

.ces-ep-intro h2 {
    font-size: 1.75rem;
    margin: 0 0 8px;
}

.ces-ep-intro p {
    color: var(--cesep-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Progress Bar */
.ces-ep-progress {
    position: relative;
    background: var(--cesep-border);
    height: 6px;
    border-radius: 3px;
    margin-bottom: 32px;
}
.ces-ep-progress-bar {
    background: var(--cesep-primary);
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.ces-ep-progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--cesep-muted);
    margin-top: 8px;
}

/* Steps */
.ces-ep-step {
    display: none;
    animation: cesep-fadein 0.25s ease;
}
.ces-ep-step-active {
    display: block;
}
@keyframes cesep-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ces-ep-step h3 {
    font-size: 1.4rem;
    margin: 0 0 20px;
    text-align: center;
}

/* Grids */
.ces-ep-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}
.ces-ep-grid-event-types {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.ces-ep-grid-visual {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.ces-ep-grid-colors {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

/* Options */
.ces-ep-option {
    display: block;
    cursor: pointer;
    position: relative;
    border: 2px solid var(--cesep-border);
    border-radius: var(--cesep-radius);
    overflow: hidden;
    transition: all 0.15s ease;
    background: #fff;
}
.ces-ep-option:hover {
    border-color: var(--cesep-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.ces-ep-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.ces-ep-option input[type="radio"]:checked ~ * {
    /* visual change handled below */
}
.ces-ep-option:has(input:checked) {
    border-color: var(--cesep-primary);
    background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(23, 177, 75, 0.2);
}

/* Simple option (text-only) */
.ces-ep-option-simple {
    padding: 16px;
    text-align: center;
}
.ces-ep-option-simple .ces-ep-option-label {
    font-weight: 500;
}

/* Visual option (with image) */
.ces-ep-option-visual .ces-ep-option-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f3f4f6;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ces-ep-option-fallback {
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.ces-ep-option-visual .ces-ep-option-label {
    display: block;
    padding: 10px 12px;
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
}

/* Color option */
.ces-ep-option-color {
    padding: 12px;
    text-align: center;
}
.ces-ep-color-swatches {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-bottom: 8px;
}
.ces-ep-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--cesep-border);
}
.ces-ep-option-color .ces-ep-option-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Fields */
.ces-ep-field {
    margin-bottom: 20px;
}
.ces-ep-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.ces-ep-field input[type="date"],
.ces-ep-field input[type="number"],
.ces-ep-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--cesep-border);
    border-radius: var(--cesep-radius);
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}
.ces-ep-field input:focus,
.ces-ep-field textarea:focus {
    outline: none;
    border-color: var(--cesep-primary);
}
.ces-ep-field small {
    display: block;
    margin-top: 6px;
    color: var(--cesep-muted);
}

/* Quick picks (chips) */
.ces-ep-quick-picks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.ces-ep-chip {
    background: #fff;
    border: 2px solid var(--cesep-border);
    padding: 8px 16px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.ces-ep-chip:hover {
    border-color: var(--cesep-primary);
    color: var(--cesep-primary);
}

/* Summary */
.ces-ep-summary {
    background: var(--cesep-bg);
    border-radius: var(--cesep-radius);
    padding: 16px;
    margin-bottom: 20px;
}
.ces-ep-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--cesep-border);
}
.ces-ep-summary-row:last-child {
    border-bottom: none;
}
.ces-ep-summary-label {
    color: var(--cesep-muted);
}
.ces-ep-summary-value {
    font-weight: 500;
}

.ces-ep-disclaimer {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 0 var(--cesep-radius) var(--cesep-radius) 0;
    font-size: 0.9rem;
    color: var(--cesep-muted);
}

/* Navigation buttons */
.ces-ep-nav {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--cesep-border);
}
.ces-ep-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--cesep-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}
.ces-ep-btn-back {
    background: #fff;
    border: 2px solid var(--cesep-border);
    color: var(--cesep-text);
}
.ces-ep-btn-back:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ces-ep-btn-next,
.ces-ep-btn-submit {
    background: var(--cesep-primary);
    color: #fff;
    flex: 1;
    max-width: 200px;
    margin-left: auto;
}
.ces-ep-btn-next:hover,
.ces-ep-btn-submit:hover {
    background: var(--cesep-primary-dark);
}

/* Error */
.ces-ep-error {
    background: #fef2f2;
    border-left: 4px solid var(--cesep-error);
    color: var(--cesep-error);
    padding: 12px 16px;
    border-radius: 0 var(--cesep-radius) var(--cesep-radius) 0;
    margin-bottom: 20px;
}

/* Result page */
.ces-ep-result-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 260px 16px 80px;
}
@media (max-width: 849px) { .ces-ep-result-wrap { padding-top: 200px; padding-bottom: 60px; } }
.ces-ep-status {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: var(--cesep-radius);
    border: 1px solid var(--cesep-border);
    margin-bottom: 24px;
}
.ces-ep-status h2 {
    margin: 0 0 12px;
}
.ces-ep-status-processing {
    background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
}
.ces-ep-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--cesep-border);
    border-top-color: var(--cesep-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: cesep-spin 1s linear infinite;
}
@keyframes cesep-spin {
    to { transform: rotate(360deg); }
}
.ces-ep-meta {
    color: var(--cesep-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}
.ces-ep-hero-image img {
    width: 100%;
    border-radius: var(--cesep-radius);
    margin-bottom: 20px;
}

/* Plans List */
.ces-ep-plans {
    list-style: none;
    padding: 0;
}
.ces-ep-plan-item {
    margin-bottom: 10px;
}
.ces-ep-plan-item a {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--cesep-border);
    border-radius: var(--cesep-radius);
    text-decoration: none;
    color: var(--cesep-text);
    align-items: center;
}
.ces-ep-plan-item a:hover {
    border-color: var(--cesep-primary);
}
.ces-ep-status-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--cesep-bg);
}
.ces-ep-status-ready .ces-ep-status-badge { background: #d1fae5; color: #065f46; }
.ces-ep-status-pending .ces-ep-status-badge,
.ces-ep-status-processing .ces-ep-status-badge { background: #fef3c7; color: #92400e; }
.ces-ep-status-failed .ces-ep-status-badge { background: #fee2e2; color: #991b1b; }

.ces-ep-summary-box {
    background: var(--cesep-bg);
    padding: 24px;
    border-radius: var(--cesep-radius);
    margin-top: 24px;
}
.ces-ep-summary-box h3 {
    margin: 0 0 20px;
    font-size: 1.15rem;
    color: var(--cesep-text);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 600;
}
.ces-ep-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.ces-ep-fact {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ces-ep-fact-wide { grid-column: 1 / -1; }
.ces-ep-fact-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}
.ces-ep-fact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cesep-muted);
    margin-bottom: 2px;
}
.ces-ep-fact-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--cesep-text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ces-ep-fact-value small {
    font-weight: 400;
    color: var(--cesep-muted);
    font-size: 0.9rem;
}
.ces-ep-fact-swatches {
    display: inline-flex;
    gap: 3px;
}
.ces-ep-fact-swatches .ces-ep-swatch {
    width: 18px;
    height: 18px;
    box-shadow: 0 0 0 1px var(--cesep-border);
}

/* Result — Concept + Items */
.ces-ep-concept {
    background: linear-gradient(135deg, #f0fdf4 0%, #fffbeb 100%);
    border-radius: var(--cesep-radius);
    padding: 20px;
    margin-bottom: 24px;
    font-size: 1.05rem;
    line-height: 1.5;
    font-style: italic;
}
.ces-ep-items-section {
    background: #fff;
    border: 1px solid var(--cesep-border);
    border-radius: var(--cesep-radius);
    padding: 20px;
    margin-bottom: 24px;
}
.ces-ep-items-section h3 { margin-top: 0; }
.ces-ep-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.ces-ep-items-table th,
.ces-ep-items-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--cesep-border);
    text-align: left;
}
.ces-ep-items-table th { font-size: 0.85rem; color: var(--cesep-muted); font-weight: 500; }
.ces-ep-thumb { width: 56px; }
.ces-ep-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.ces-ep-reason { font-size: 0.85rem; color: var(--cesep-muted); margin-top: 4px; }
.ces-ep-qty { text-align: center; font-weight: 600; }
.ces-ep-price { text-align: right; white-space: nowrap; }
.ces-ep-total {
    margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--cesep-border);
    text-align: right; font-size: 1.05rem;
}
.ces-ep-hint { font-size: 0.9rem; color: var(--cesep-muted); margin-top: 0; }

/* Interactive Qty Input */
.ces-ep-qty-input {
    width: 70px; padding: 6px 8px; border: 2px solid var(--cesep-border);
    border-radius: 6px; text-align: center; font-size: 0.95rem;
}
.ces-ep-qty-input:focus { outline: none; border-color: var(--cesep-primary); }
.ces-ep-actions-cell { width: 32px; text-align: right; }
.ces-ep-remove-btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--cesep-border);
    background: #fff; cursor: pointer; font-size: 18px; line-height: 1; color: var(--cesep-muted);
    padding: 0;
}
.ces-ep-remove-btn:hover { background: #fef2f2; color: var(--cesep-error); border-color: var(--cesep-error); }

/* CTA-Row */
.ces-ep-cta-row {
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px;
    border-top: 1px solid var(--cesep-border);
}
.ces-ep-btn-outline {
    background: #fff; border: 2px solid var(--cesep-primary); color: var(--cesep-primary);
}
.ces-ep-btn-outline:hover { background: #f0fdf4; }
.ces-ep-btn-primary { background: var(--cesep-primary); color: #fff; border: 2px solid var(--cesep-primary); }
.ces-ep-btn-primary:hover { background: var(--cesep-primary-dark); border-color: var(--cesep-primary-dark); }
.ces-ep-saved-badge {
    background: #d1fae5; color: #065f46; padding: 10px 16px; border-radius: 8px;
    font-size: 0.95rem; display: flex; align-items: center; gap: 8px;
}
.ces-ep-saved-badge a { color: #065f46; font-weight: 600; }

/* Affiliate-Cards */
.ces-ep-affiliates {
    background: #fafaf8; border-radius: var(--cesep-radius); padding: 20px;
    margin-bottom: 24px;
}
.ces-ep-affiliates h3 { margin-top: 0; }
.ces-ep-affiliate-cards {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px; margin-top: 12px;
}
.ces-ep-aff-card {
    background: #fff; border: 1px solid var(--cesep-border); border-radius: 8px;
    padding: 14px; display: flex; flex-direction: column;
}
.ces-ep-aff-title { font-weight: 600; margin-bottom: 6px; }
.ces-ep-aff-reason { font-size: 0.88rem; color: var(--cesep-muted); margin-bottom: 10px; flex: 1; }
.ces-ep-aff-link {
    color: var(--cesep-primary); text-decoration: none; font-weight: 500; font-size: 0.9rem;
    margin-top: auto;
}
.ces-ep-aff-link:hover { text-decoration: underline; }

/* Modal */
.ces-ep-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999;
    align-items: center; justify-content: center;
}
.ces-ep-modal-box {
    background: #fff; border-radius: var(--cesep-radius); padding: 24px;
    max-width: 460px; width: 90%;
}
.ces-ep-modal-box h3 { margin-top: 0; }
.ces-ep-modal-box label { display: block; margin: 16px 0; }
.ces-ep-modal-box input[type="text"] {
    width: 100%; padding: 10px 12px; border: 2px solid var(--cesep-border);
    border-radius: 6px; margin-top: 4px; box-sizing: border-box;
}
.ces-ep-modal-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Mobile */
@media (max-width: 640px) {
    .ces-ep-grid-visual { grid-template-columns: repeat(2, 1fr); }
    .ces-ep-grid-colors { grid-template-columns: repeat(2, 1fr); }
    .ces-ep-btn-next,
    .ces-ep-btn-submit { max-width: none; }
    .ces-ep-plan-item a { grid-template-columns: 1fr; }
    .ces-ep-items-table { font-size: 0.85rem; }
    .ces-ep-items-table .ces-ep-thumb { width: 40px; }
    .ces-ep-items-table .ces-ep-thumb img { width: 36px; height: 36px; }
}

/* ============================================================
   MOBILE-AUDIT FIXES (2026-04-17)
   ============================================================ */

@media (max-width: 480px) {
    /* Options-Grid explizit 2 Spalten (statt auto-fill mit minmax) */
    .ces-ep-grid-event-types {
        grid-template-columns: repeat(2, 1fr);
    }
    .ces-ep-option-simple {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    /* Navigationsbuttons: Next/Back/Submit Full-Width und gestapelt */
    .ces-ep-nav {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .ces-ep-btn-next,
    .ces-ep-btn-submit,
    .ces-ep-btn-back {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
}

/* Share-Button + Result-Row (result.php) */
.ces-ep-share-result {
    margin-top: 16px;
    padding: 14px 16px;
    background: #fafaf8;
    border-radius: 10px;
    border: 1px solid #E8DFD3;
}
.ces-ep-share-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.ces-ep-share-row input {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-family: ui-monospace, 'SF Mono', Monaco, Consolas, monospace;
    background: #fff;
    border: 1px solid #dcd4c8;
    border-radius: 6px;
    color: #2B2420;
}

/* ============================================================
   PUBLIC EVENT-IDEA PAGE (/event-ideen/<slug>/) — Share-Landingpage
   ============================================================ */
.ces-idea-page {
    max-width: 960px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 80px;
    color: var(--cesep-text);
    font-size: 1rem;
    line-height: 1.6;
}
/* .ces-idea-hero / .ces-idea-image / .ces-idea-headline / .ces-idea-lead Klassen
   wurden im Template entfernt (21.05.2026, Umbau auf .ces-lp-result-hero +
   .ces-ep-hero-image für Style-Konsistenz mit lead-result.php). Kein CSS dafür. */
.ces-idea-kicker {
    font-size: 0.85rem;
    color: var(--cesep-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
/* Hero-Wrapper auf der public idea-page (.ces-idea-hero-wrap = Spezifizierungs-
   helfer, weil .ces-lp-result-hero auch in lead-result.php verwendet wird wo
   ein anderes Layout gewünscht ist). Hier: vertikaler Stack, zentriert. */
.ces-idea-hero-wrap {
    display: block;
    text-align: center;
    margin-bottom: 32px;
}
.ces-idea-hero-wrap h1 {
    font-size: 1.9rem;
    line-height: 1.25;
    margin: 8px auto 20px;
    color: var(--cesep-text);
    max-width: 760px;
}
@media (max-width: 749px) {
    .ces-idea-hero-wrap h1 { font-size: 1.4rem; }
}
/* Hero-Image: zentriert, max 760px breit (passt zum Items-Bereich darunter) */
.ces-idea-hero-wrap .ces-ep-hero-image {
    max-width: 760px;
    margin: 0 auto 20px;
}
.ces-idea-hero-wrap .ces-ep-hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--cesep-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
}
.ces-idea-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 16px 0 0;
}
.ces-idea-facts > div {
    background: #FAF6EE;
    border: 1px solid #E8DFD3;
    border-radius: 10px;
    padding: 10px 12px;
}
.ces-idea-facts dt {
    font-size: 0.75rem;
    color: var(--cesep-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 4px;
}
.ces-idea-facts dd {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cesep-text);
}

.ces-idea-longtext {
    background: #fff;
    border-radius: var(--cesep-radius);
    padding: 28px 32px;
    margin: 0 auto 40px;
    max-width: 760px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid var(--cesep-border);
}
.ces-idea-longtext h2,
.ces-idea-longtext h3 {
    margin-top: 1.6em;
    line-height: 1.3;
}
.ces-idea-longtext h2:first-child,
.ces-idea-longtext h3:first-child { margin-top: 0; }
.ces-idea-longtext p { margin: 0 0 1em; }
.ces-idea-longtext ul,
.ces-idea-longtext ol { padding-left: 1.4em; margin: 0 0 1em; }
.ces-idea-longtext li { margin: 0.3em 0; }

/* .ces-idea-items / -items-grid / -item* / -total / -subhead Klassen wurden
   im Template entfernt (21.05.2026) — Items kommen jetzt als .ces-ep-items-table
   (Tabelle, gleich wie auf lead-result.php). Kein CSS dafür mehr. */

.ces-idea-cta {
    background: var(--cesep-text);
    color: #fff;
    border-radius: var(--cesep-radius);
    padding: 36px 28px;
    text-align: center;
    margin: 0;
}
.ces-idea-cta h2 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 1.5rem;
}
.ces-idea-cta p {
    color: #d1d5db;
    margin: 0 0 18px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}
.ces-idea-cta-btn {
    display: inline-block;
    background: var(--cesep-primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: background 0.15s ease, transform 0.15s ease;
}
.ces-idea-cta-btn:hover {
    background: var(--cesep-primary-dark);
    transform: translateY(-1px);
    color: #fff;
}
.ces-idea-cta-note {
    color: #9ca3af !important;
    font-size: 0.85rem;
    margin: 16px 0 0 !important;
}
