﻿/* ============================================
   FUNNEL MODALS â€“ Global Styles (funnel.css)
   Stefan Kübrich GmbH & Co. KG
   Psychologisch optimierte Multi-Step-Berater
   ============================================ */

/* ”€”€ Modal Overlay ”€”€ */
.funnel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 15, 22, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.funnel-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ”€”€ Modal Box ”€”€ */
.funnel-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 680px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
    position: relative;
    transform: translateY(22px) scale(0.96);
    transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: #e8e8e8 transparent;
}

.funnel-overlay.is-open .funnel-modal {
    transform: translateY(0) scale(1);
}

/* ”€”€ Close Button ”€”€ */
.funnel-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    transition: background 0.18s, color 0.18s;
    z-index: 5;
    flex-shrink: 0;
}

.funnel-close:hover { background: #e2e8f0; color: #2c3e50; }

/* ”€”€ Progress Wrap ”€”€ */
.funnel-progress-wrap {
    padding: 1.75rem 2rem 0;
}

.funnel-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.funnel-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b7b8d;
}

.funnel-progress-track {
    height: 5px;
    background: #eaecef;
    border-radius: 100px;
    overflow: hidden;
}

.funnel-progress-bar {
    height: 100%;
    background: var(--accent-red, #9D191B);
    border-radius: 100px;
    transition: width 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20%;
}

/* ”€”€ Step: Visibility ”€”€ */
.funnel-step            { display: none; }
.funnel-step.is-active  { display: block; }

/* ”€”€ Step Body ”€”€ */
.funnel-body {
    padding: 1.5rem 2rem;
}

.funnel-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
    padding-right: 2rem;
}

/* ”€”€ Multi-select hint ”€”€ */
.funnel-multi-hint {
    font-size: 0.78rem;
    color: #6b7b8d;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ”€”€ Options Grid ”€”€ */
.funnel-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.funnel-options[data-cols="1"] { grid-template-columns: 1fr; }
.funnel-options[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }

/* ”€”€ Option Card ”€”€ */
.funnel-option {
    border: 2px solid #e2e8f0;
    border-radius: 11px;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #ffffff;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.funnel-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-red, #9D191B);
    opacity: 0;
    transition: opacity 0.18s;
}

.funnel-option:hover {
    border-color: var(--accent-red, #9D191B);
    background: rgba(157, 25, 27, 0.03);
    transform: translateY(-1px);
}

.funnel-option.is-selected {
    border-color: var(--accent-red, #9D191B);
    background: rgba(157, 25, 27, 0.05);
    box-shadow: 0 0 0 3px rgba(157, 25, 27, 0.14);
}

.funnel-option-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.funnel-option-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.funnel-option.is-selected .funnel-option-label {
    color: var(--accent-red, #9D191B);
}

/* Multi-choice checkmark */
.funnel-option-check {
    margin-left: auto;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, background 0.18s;
    position: relative;
    z-index: 1;
}

.funnel-option.is-selected .funnel-option-check {
    background: var(--accent-red, #9D191B);
    border-color: var(--accent-red, #9D191B);
}

.funnel-option-check svg { display: none; }
.funnel-option.is-selected .funnel-option-check svg { display: block; }

/* ”€”€ Navigation ”€”€ */
.funnel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem 1.75rem;
    border-top: 1px solid #f2f2f2;
    gap: 1rem;
}

.funnel-btn-back {
    background: none;
    border: 2px solid #d8dee6;
    border-radius: 9px;
    padding: 0.72rem 1.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #6b7b8d;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
    font-family: inherit;
    flex-shrink: 0;
}

.funnel-btn-back:hover { border-color: #9D191B; color: #9D191B; }
.funnel-btn-back.is-hidden { visibility: hidden; pointer-events: none; }

.funnel-btn-next {
    background: var(--accent-red, #9D191B);
    border: none;
    border-radius: 9px;
    padding: 0.72rem 2rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
    font-family: inherit;
    margin-left: auto;
    box-shadow: 0 4px 14px rgba(157, 25, 27, 0.3);
}

.funnel-btn-next:hover { background: #7e1415; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(157, 25, 27, 0.4); }
.funnel-btn-next:disabled { background: #c5c5c5; box-shadow: none; transform: none; cursor: not-allowed; }
.funnel-btn-next.is-hidden { display: none; }

/* ”€”€ Contact Step ”€”€ */
.funnel-contact-intro {
    background: linear-gradient(135deg, rgba(157, 25, 27, 0.07) 0%, rgba(157, 25, 27, 0.02) 100%);
    border: 1px solid rgba(157, 25, 27, 0.18);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.funnel-contact-intro-top {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.55rem;
    line-height: 1.4;
}

.funnel-contact-intro-fomo {
    font-size: 0.87rem;
    color: #6b7b8d;
    line-height: 1.65;
}

/* ”€”€ Form ”€”€ */
.funnel-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.funnel-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.funnel-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.funnel-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #6b7b8d;
}

.funnel-input,
.funnel-field textarea {
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    padding: 0.72rem 1rem;
    font-size: 0.93rem;
    font-family: inherit;
    color: #2c3e50;
    background: #ffffff;
    transition: border-color 0.18s, box-shadow 0.18s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.funnel-input:focus,
.funnel-field textarea:focus {
    border-color: var(--accent-red, #9D191B);
    box-shadow: 0 0 0 3px rgba(157, 25, 27, 0.12);
}

.funnel-input.is-invalid,
.funnel-field textarea.is-invalid {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.04);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.funnel-field textarea {
    resize: vertical;
    min-height: 85px;
}

.funnel-submit {
    background: var(--accent-red, #9D191B);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    margin-top: 0.25rem;
    transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
    box-shadow: 0 4px 16px rgba(157, 25, 27, 0.3);
    line-height: 1.4;
}

.funnel-submit:hover {
    background: #7e1415;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(157, 25, 27, 0.4);
}

.funnel-friction {
    text-align: center;
    font-size: 0.76rem;
    color: #8896a0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

/* ”€”€ Success State ”€”€ */
.funnel-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem 3.5rem;
}

.funnel-success.is-visible { display: block; }

.funnel-success-icon {
    width: 76px;
    height: 76px;
    background: rgba(157, 25, 27, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
}

.funnel-success h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}

.funnel-success p {
    font-size: 0.95rem;
    color: #6b7b8d;
    line-height: 1.75;
    max-width: 420px;
    margin: 0 auto;
}

/* ”€”€ Responsive ”€”€ */
@media (max-width: 640px) {
    .funnel-modal        { border-radius: 14px; max-height: 96vh; }
    .funnel-progress-wrap { padding: 1.25rem 1.25rem 0; }
    .funnel-body         { padding: 1.25rem 1.25rem; }
    .funnel-nav          { padding: 1rem 1.25rem 1.5rem; }
    .funnel-options      { grid-template-columns: 1fr; }
    .funnel-options[data-cols="3"] { grid-template-columns: 1fr; }
    .funnel-form-row     { grid-template-columns: 1fr; }
    .funnel-step-title   { font-size: 1.1rem; padding-right: 1.5rem; }
}

