/* Kurzes Feedback — FAB-Swap + Mini-Umfrage (Preview) */

.pulse-feedback-fab {
    position: fixed;
    right: max(20px, env(safe-area-inset-right, 0px));
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px 20px 8px 8px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #ffffff;
    color: #312e81;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 16px rgba(49, 46, 129, 0.14);
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pulse-feedback-fab.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.pulse-feedback-fab.is-buzz {
    animation: pulse-feedback-buzz 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes pulse-feedback-buzz {
    0% {
        transform: scale(0.92);
    }
    15% {
        transform: scale(1.04) rotate(-2deg);
    }
    30% {
        transform: scale(1.02) rotate(2deg);
    }
    45% {
        transform: scale(1.05) rotate(-1.5deg);
    }
    60% {
        transform: scale(1.01) rotate(1deg);
    }
    75% {
        transform: scale(1.03) rotate(-0.5deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

.pulse-feedback-fab__icon-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4338ca;
}

.pulse-feedback-fab__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-right: 2px;
}

.pulse-feedback-fab__title {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.pulse-feedback-fab__sub {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.88;
    line-height: 1.2;
}

.erleben-fab.is-pulse-replaced {
    opacity: 0;
    transform: scale(0.88) translateY(8px);
    pointer-events: none;
}

.pulse-feedback-dialog__hero {
    background: linear-gradient(145deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
}

.pulse-feedback-dialog .erleben-btn--primary {
    background: #4338ca;
}

.pulse-feedback-dialog .erleben-btn--primary:hover {
    background: #3730a3;
}

.pulse-feedback-question {
    margin: 0 0 20px;
    padding: 0;
    border: none;
}

.pulse-feedback-question:last-of-type {
    margin-bottom: 8px;
}

.pulse-feedback-question__text {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
}

.pulse-feedback-yn {
    display: flex;
    gap: 10px;
}

.pulse-feedback-yn__btn {
    flex: 1;
    margin: 0;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.pulse-feedback-yn__btn:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

.pulse-feedback-yn__btn.is-selected {
    border-color: #6366f1;
    background: #eef2ff;
    color: #312e81;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.pulse-feedback-yn__btn:focus {
    outline: none;
}

.pulse-feedback-yn__btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.35);
    outline-offset: 2px;
}

.pulse-feedback-thanks {
    margin: 0;
    padding: 8px 0 4px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #4b5563;
    text-align: center;
}

.pulse-feedback-thanks strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.0625rem;
    color: #111827;
}

.pulse-feedback-form-status {
    margin: 12px 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
}

.pulse-feedback-form-status--error {
    color: #b91c1c;
}

.pulse-feedback-privacy {
    margin: 16px 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #6b7280;
    text-align: center;
}

.pulse-feedback-privacy a {
    color: #4338ca;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Dialog-Basis (site-weit, ohne hamburg-erleben.css) */
.erleben-dialog {
    width: min(100%, 440px);
    max-width: calc(100vw - 24px);
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 1.25rem;
    background: transparent;
    overflow: visible;
}

.erleben-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.erleben-dialog__panel {
    position: relative;
    max-height: min(90vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.erleben-dialog__hero {
    padding: 28px 24px 20px;
    color: #fff;
}

.erleben-dialog__kicker {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
}

.erleben-dialog__title {
    margin: 0 40px 8px 0;
    font-family: var(--font-heading, system-ui, sans-serif);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.erleben-dialog__lead {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.92;
}

.erleben-dialog__body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.erleben-dialog__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
}

.erleben-dialog__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.erleben-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.erleben-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.erleben-btn--primary {
    background: #2d5a27;
    color: #fff;
}

.erleben-btn--primary:hover {
    background: #1f4e2c;
}

.erleben-btn--ghost {
    background: #f1f5f9;
    color: #334155;
}

.erleben-btn--ghost:hover {
    background: #e2e8f0;
}

/* Über Markt-Sticky-Bar (mobile-sticky-bar z-index 200–1100) */
body:has(.mobile-sticky-bar.visible) .pulse-feedback-fab.is-visible {
    bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
}

@media (max-width: 768px) {
    .pulse-feedback-fab.is-visible {
        bottom: max(80px, calc(64px + env(safe-area-inset-bottom, 0px)));
    }
}

@media (max-width: 480px) {
    .pulse-feedback-fab {
        right: max(16px, env(safe-area-inset-right, 0px));
        padding: 6px 16px 6px 6px;
        gap: 10px;
    }

    .pulse-feedback-fab.is-visible {
        bottom: max(80px, calc(64px + env(safe-area-inset-bottom, 0px)));
    }

    body:has(.mobile-sticky-bar.visible) .pulse-feedback-fab.is-visible {
        bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
    }

    .pulse-feedback-fab__icon-wrap {
        width: 38px;
        height: 38px;
    }

    .pulse-feedback-fab__title {
        font-size: 0.875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-feedback-fab,
    .erleben-fab.is-pulse-replaced {
        transition: none;
    }

    .pulse-feedback-fab.is-buzz {
        animation: none;
    }
}
