/* QR-SOFT conversion — sticky CTA, WhatsApp FAB, FOMO */

:root {
    --qrs-conv-z-sticky: 100090; /* AI chat root 100080 — sticky kapatılabilir kalsın */
    --qrs-conv-z-wa: 100030;
    --qrs-conv-primary: #fd6905;
    --qrs-conv-wa: #25d366;
    --qrs-conv-sticky-h: 5.75rem;
}

body.qrs-conv-sticky-visible {
    padding-bottom: calc(var(--qrs-conv-sticky-h) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
    body.qrs-conv-sticky-visible {
        padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    }
}

.qrs-conv-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--qrs-conv-z-sticky);
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease, visibility 0.24s;
    pointer-events: none;
}

.qrs-conv-sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.qrs-conv-sticky__inner {
    margin: 0 auto;
    max-width: 72rem;
    padding: 0.5rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fff 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -12px 40px -16px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(10px);
}

.qrs-conv-sticky__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.4rem;
}

.qrs-conv-sticky__fomo {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    min-width: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.qrs-conv-sticky__fomo--muted {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.qrs-conv-sticky__fomo-dot {
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: qrs-conv-pulse 2.2s ease infinite;
}

@keyframes qrs-conv-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.qrs-conv-sticky__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding-right: 0.15rem;
}

.qrs-conv-sticky__primary {
    flex: 1 1 auto;
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    background: var(--qrs-conv-primary);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px -10px rgba(253, 105, 5, 0.65);
    transition: background 0.15s ease, transform 0.15s ease;
}

.qrs-conv-sticky__primary:hover {
    background: #e85f04;
    color: #fff;
}

.qrs-conv-sticky__ghost {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.qrs-conv-sticky__ghost:hover {
    border-color: rgba(253, 105, 5, 0.35);
    background: #fff8f3;
    color: #0f172a;
}

.qrs-conv-sticky__wa {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    border-radius: 0.65rem;
    background: var(--qrs-conv-wa);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
}

.qrs-conv-sticky__wa:hover {
    background: #1ebe57;
    color: #fff;
}

.qrs-conv-sticky__close {
    flex: 0 0 auto;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.qrs-conv-sticky__close:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.qrs-conv-sticky__close-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

@media (max-width: 479px) {
    .qrs-conv-sticky__ghost--hide-sm {
        display: none;
    }
}

/* WhatsApp FAB — sol alt (AI chat sağda) */
.qrs-conv-wa-fab {
    position: fixed;
    left: max(0.85rem, env(safe-area-inset-left, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: var(--qrs-conv-z-wa);
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--qrs-conv-wa);
    color: #fff;
    box-shadow: 0 12px 28px -8px rgba(37, 211, 102, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, bottom 0.28s ease;
    text-decoration: none;
}

.qrs-conv-wa-fab svg {
    width: 1.65rem;
    height: 1.65rem;
    fill: currentColor;
}

.qrs-conv-wa-fab:hover {
    transform: scale(1.06);
    color: #fff;
    box-shadow: 0 14px 32px -8px rgba(37, 211, 102, 0.65);
}

@media (min-width: 640px) {
    .qrs-conv-wa-fab {
        bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Sticky görünürken WA FAB yukarı kay */
body.qrs-conv-sticky-visible .qrs-conv-wa-fab {
    bottom: calc(var(--qrs-conv-sticky-h) + 0.65rem + env(safe-area-inset-bottom, 0px));
}
