/* WhatsApp müşteri desteği widget */
.wa-widget {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    /* Above site-header (50) / mega / flash; below cart (9998) & cookie (99990) */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    font-family: Inter, system-ui, sans-serif;
}

/* Kapalıyken yalnızca FAB tıklanır; mobilde tam genişlik kapsayıcı alttaki öğeleri kapatmasın */
.wa-widget:not(.is-open) {
    pointer-events: none;
}

.wa-widget:not(.is-open) .wa-widget__fab {
    pointer-events: auto;
}

body.site-header-menu-open .wa-widget:not(.is-open) {
    visibility: hidden;
}

@media (min-width: 640px) {
    .wa-widget {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

.wa-widget__panel {
    width: min(22rem, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wa-widget.is-open .wa-widget__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.wa-widget__panel[hidden] {
    display: none;
}

.wa-widget.is-open .wa-widget__panel[hidden] {
    display: flex;
}

.wa-widget__card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    border: 1px solid #e8eef5;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(32rem, calc(100dvh - 7rem));
}

.wa-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #0d5f47 0%, #0a4a38 100%);
    color: #fff;
    flex-shrink: 0;
}

.wa-widget__header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.wa-widget__header-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-widget__header-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.wa-widget__header-avatar {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.wa-widget__header-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wa-widget__header-text {
    min-width: 0;
}

.wa-widget__header-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.wa-widget__header-status {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    opacity: 0.92;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.3;
}

.wa-widget__online-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
    flex-shrink: 0;
}

.wa-widget__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.wa-widget__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.wa-widget__close svg {
    width: 1.125rem;
    height: 1.125rem;
}

.wa-widget__body {
    background: #f7f4ef;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.wa-widget__messages {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-height: 7.5rem;
    max-height: 14rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.wa-widget__messages::-webkit-scrollbar {
    display: none;
}

.wa-widget__messages.is-active {
    max-height: 16rem;
}

.wa-widget__bubble {
    align-self: flex-start;
    max-width: 92%;
    background: #fff;
    border-radius: 0.875rem;
    border-bottom-left-radius: 0.25rem;
    padding: 0.75rem 0.875rem 1.5rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.wa-widget__bubble p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
    white-space: pre-line;
}

.wa-widget__link {
    color: #0b6bcb;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wa-widget__link:hover {
    color: #084a8c;
}

.wa-widget__bubble--user {
    align-self: flex-end;
    background: #dcf8c6;
    border-bottom-left-radius: 0.875rem;
    border-bottom-right-radius: 0.25rem;
}

.wa-widget__bubble-time {
    position: absolute;
    right: 0.625rem;
    bottom: 0.375rem;
    font-size: 0.625rem;
    color: #94a3b8;
    font-style: normal;
}

.wa-widget__quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
    flex-shrink: 0;
    transition: opacity 0.2s ease, max-height 0.25s ease, padding 0.25s ease;
    max-height: 12rem;
    overflow: hidden;
}

.wa-widget__body.is-chat-started .wa-widget__quick {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    visibility: hidden;
}

.wa-widget__typing {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 0.875rem;
    background: #fff;
    border-radius: 0.875rem;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.wa-widget__typing span {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #94a3b8;
    animation: wa-typing 1.2s infinite ease-in-out;
}

.wa-widget__typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-widget__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes wa-typing {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.wa-widget__quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.25rem;
    padding: 0.5rem 0.375rem;
    border: 1px solid #e8eef5;
    border-radius: 0.75rem;
    background: #fff;
    color: #334155;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.wa-widget__quick-btn:hover,
.wa-widget__quick-btn.is-active {
    border-color: #25D366;
    color: #0d5f47;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.12);
}

.wa-widget__quick-icon {
    font-size: 1.125rem;
    line-height: 1;
}

.wa-widget__composer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border-top: 1px solid #eef2f7;
    flex-shrink: 0;
}

.wa-widget__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: #f1f5f9;
    border-radius: 9999px;
    padding: 0.7rem 1rem;
    font-size: 0.8125rem;
    color: #334155;
    outline: none;
}

.wa-widget__input::placeholder {
    color: #94a3b8;
}

.wa-widget__input:focus {
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
}

.wa-widget__send {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: #25D366;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.wa-widget__send:hover {
    background: #1daa52;
}

.wa-widget__send svg {
    width: 1.125rem;
    height: 1.125rem;
}

.wa-widget__cta {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.25rem;
    border: none;
    border-radius: 9999px;
    background: #25D366;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    transition: background 0.15s, transform 0.15s;
}

.wa-widget__cta:hover {
    background: #1daa52;
    transform: translateY(-1px);
}

.wa-widget__cta svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.wa-widget__fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: #25D366;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.42), 0 0 0 6px rgba(37, 211, 102, 0.14);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.wa-widget__fab:hover {
    background: #1daa52;
    transform: translateY(-1px);
}

.wa-widget__fab-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    line-height: 0;
}

.wa-widget__fab-mark svg {
    width: 1.85rem;
    height: 1.85rem;
    display: block;
}

.wa-widget__fab-copy {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding-right: 0.35rem;
    line-height: 1.05;
    text-align: left;
}

.wa-widget__fab-name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

.wa-widget__fab-channel {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.92);
}

.wa-widget__fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.wa-widget__fab-icon--wa {
    width: 1.25rem;
    height: 1.25rem;
}

.wa-widget__fab-icon--wa svg,
.wa-widget__fab svg.wa-widget__fab-icon--wa {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.wa-widget__fab-icon--close {
    display: none;
    width: 1.375rem;
    height: 1.375rem;
}

.wa-widget__fab-icon--close svg {
    width: 1.375rem;
    height: 1.375rem;
    display: block;
}

@media (min-width: 640px) {
    .wa-widget__fab {
        width: auto;
        height: auto;
        gap: 0;
        justify-content: center;
        padding: 0.72rem 1.25rem;
    }

    .wa-widget__fab-mark,
    .wa-widget__header-avatar {
        display: none;
    }

    .wa-widget__fab-copy {
        display: flex;
        padding-right: 0;
    }
}

.wa-widget.is-open .wa-widget__fab {
    width: auto;
    height: auto;
    padding: 0.8rem;
    gap: 0;
    border-radius: 9999px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}

.wa-widget.is-open .wa-widget__fab-mark,
.wa-widget.is-open .wa-widget__fab-copy {
    display: none;
}

.wa-widget.is-open .wa-widget__fab-icon--close {
    display: flex;
}

/* Mobile: ekrana kilitle, uzun cevaplar içeride kaysın — yukarı taşmasın */
@media (max-width: 639px) {
    .wa-widget {
        right: max(1rem, env(safe-area-inset-right, 0px));
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        left: max(0.65rem, env(safe-area-inset-left, 0px));
        align-items: stretch;
        gap: 0.5rem;
    }

    .wa-widget.is-open {
        top: max(0.5rem, env(safe-area-inset-top, 0px));
        bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
        height: auto;
        max-height: none;
    }

    .wa-widget__panel {
        width: 100%;
        max-width: none;
        min-height: 0;
    }

    .wa-widget.is-open .wa-widget__panel {
        flex: 1 1 auto;
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
        gap: 0.5rem;
    }

    .wa-widget.is-open .wa-widget__card {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        height: auto;
        overflow: hidden;
        border-radius: 1rem;
    }

    .wa-widget__header {
        padding: 0.75rem 0.85rem;
        flex-shrink: 0;
    }

    .wa-widget__header-icon {
        width: 2.15rem;
        height: 2.15rem;
    }

    .wa-widget__header-avatar {
        width: 2.45rem;
        height: 2.45rem;
    }

    .wa-widget__header-title {
        font-size: 0.9375rem;
    }

    .wa-widget__header-status {
        font-size: 0.68rem;
    }

    .wa-widget__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .wa-widget__messages,
    .wa-widget__messages.is-active {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 0.85rem;
    }

    .wa-widget__bubble {
        max-width: 94%;
        padding: 0.7rem 0.8rem 1.35rem;
        flex-shrink: 0;
    }

    .wa-widget__bubble p {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .wa-widget__quick {
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        padding: 0 0.75rem 0.75rem;
        flex-shrink: 0;
    }

    .wa-widget__quick-btn {
        min-height: 3.35rem;
        padding: 0.4rem 0.3rem;
        font-size: 0.625rem;
        border-radius: 0.65rem;
    }

    .wa-widget__composer {
        padding: 0.65rem;
        gap: 0.4rem;
        flex-shrink: 0;
    }

    .wa-widget__input {
        padding: 0.65rem 0.9rem;
        font-size: 16px; /* iOS zoom önleme */
    }

    .wa-widget__send {
        width: 2.35rem;
        height: 2.35rem;
    }

    .wa-widget__cta {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        border-radius: 0.85rem;
        flex-shrink: 0;
    }

    .wa-widget__fab {
        align-self: flex-end;
        flex-shrink: 0;
    }

    .wa-widget.is-open .wa-widget__fab {
        padding: 0.85rem;
    }
}

@media (max-width: 639px) and (max-height: 700px) {
    .wa-widget__quick-btn {
        min-height: 2.85rem;
    }
}

body.wa-widget-open {
    overscroll-behavior: none;
}

@media (max-width: 639px) {
    body.wa-widget-open {
        overflow: hidden;
        position: relative;
    }
}

/* Sol alt — telefon ile ara (WhatsApp FAB’ın karşısı) */
.call-fab {
    position: fixed;
    left: 1rem;
    /* .wa-widget ile aynı hiza; layout içi kural bu değerleri kalıcı basar (head'de bu dosyadan sonra gelir) */
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    border-radius: 9999px;
    background: #22251F;
    color: #fff;
    text-decoration: none;
    font-family: Inter, system-ui, sans-serif;
    box-shadow: 0 8px 22px rgba(34, 37, 31, 0.38), 0 0 0 6px rgba(34, 37, 31, 0.12);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.call-fab:hover {
    background: #1C1F1A;
    color: #fff;
    transform: translateY(-1px);
}

.call-fab__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.call-fab__icon .m18-icon {
    width: 1.7rem;
    height: 1.7rem;
}

.call-fab__copy {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    line-height: 1.05;
    text-align: left;
}

.call-fab__name {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}

.call-fab__number {
    margin-top: 0.12rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 640px) {
    .call-fab {
        left: 1.5rem;
        bottom: 1.5rem;
        width: auto;
        height: auto;
        gap: 0.65rem;
        padding: 0.72rem 1.15rem 0.72rem 1rem;
    }

    .call-fab__copy {
        display: flex;
    }
}

@media (max-width: 639px) {
    .call-fab {
        left: max(1rem, env(safe-area-inset-left, 0px));
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }
}

/* Mobil sayfa sonunda telif satırı FAB'ların altında kalmasın: FAB yüksekliği + alt boşluk kadar yer aç */
@media (max-width: 639px) {
    body:has(.call-fab) .site-footer-bottom,
    body:has(.wa-widget) .site-footer-bottom {
        padding-bottom: calc(max(1rem, env(safe-area-inset-bottom, 0px)) + 3.6rem + 0.75rem);
    }
}

body.site-header-menu-open .call-fab,
body.wa-widget-open .call-fab {
    visibility: hidden;
    pointer-events: none;
}

body.cart-add-modal-open .wa-widget,
body.cart-add-modal-open .call-fab {
    z-index: 40;
}

/* AI karşılama — WhatsApp FAB’ın üstünde, akışa girmeden */
.wa-ai-greet {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.7rem);
    z-index: 2;
    width: min(17.25rem, calc(100vw - 6.75rem));
    pointer-events: none;
    opacity: 0;
    transform: translateY(0.4rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.wa-ai-greet[hidden] {
    display: none !important;
}

.wa-widget:not(.is-open) .wa-ai-greet.is-visible {
    pointer-events: auto;
    opacity: 1;
    transform: none;
}

.wa-widget.is-open .wa-ai-greet,
body.site-header-menu-open .wa-ai-greet {
    display: none !important;
}

.wa-ai-greet__bubble {
    position: relative;
    border-radius: 1rem 1rem 0.35rem 1rem;
    background: #fffdf8;
    border: 1px solid rgba(34, 37, 31, 0.1);
    box-shadow:
        0 14px 32px rgba(34, 37, 31, 0.14),
        0 0 0 1px rgba(181, 122, 62, 0.08);
}

.wa-ai-greet__bubble::after {
    content: "";
    position: absolute;
    right: 1.35rem;
    bottom: -0.38rem;
    width: 0.72rem;
    height: 0.72rem;
    background: #fffdf8;
    border-right: 1px solid rgba(34, 37, 31, 0.1);
    border-bottom: 1px solid rgba(34, 37, 31, 0.1);
    transform: rotate(45deg);
}

.wa-ai-greet__open {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0.72rem 2rem 0.78rem 0.72rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: #22251F;
    font-family: Poppins, Inter, system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}

.wa-ai-greet__open:hover {
    background: rgba(250, 248, 245, 0.65);
}

.wa-ai-greet__open:focus-visible,
.wa-ai-greet__dismiss:focus-visible {
    outline: 2px solid #22251F;
    outline-offset: 2px;
}

.wa-ai-greet__mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: #22251F;
    color: #FAF8F5;
}

.wa-ai-greet__mark svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}

.wa-ai-greet__copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wa-ai-greet__title {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.wa-ai-greet__text {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    color: #5c564c;
}

.wa-ai-greet__dismiss {
    position: absolute;
    top: 0.28rem;
    right: 0.28rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6d655b;
    cursor: pointer;
}

.wa-ai-greet__dismiss:hover {
    background: rgba(34, 37, 31, 0.06);
    color: #22251F;
}

.wa-ai-greet__dismiss .m18-icon {
    width: 0.85rem;
    height: 0.85rem;
}

@media (max-width: 639px) {
    .wa-ai-greet {
        width: min(16.25rem, calc(100vw - 6.5rem));
        bottom: calc(100% + 0.55rem);
    }

    .wa-ai-greet__title {
        font-size: 0.78rem;
    }

    .wa-ai-greet__text {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wa-ai-greet {
        transition: none;
    }
}

/* ==========================================================================
   WhatsApp görünümü — İlayda sohbeti
   Renkler WhatsApp'ın kendi paletinden; yukarıdaki temel stillerin üstüne yazar.
   ========================================================================== */
.wa-widget {
    --wa-teal: #008069;
    --wa-teal-dk: #006e5a;
    --wa-green: #25D366;
    --wa-send: #00a884;
    --wa-chat-bg: #efeae2;
    --wa-in: #ffffff;
    --wa-out: #d9fdd3;
    --wa-ink: #111b21;
    --wa-meta: #667781;
    --wa-tick: #53bdeb;
    font-family: "Segoe UI", Helvetica, Arial, system-ui, sans-serif;
}

/* Başlıktaki fotoğraf masaüstünde de görünsün */
@media (min-width: 640px) {
    .wa-widget__header-avatar { display: block; }
}

/* --- Kart ve başlık --- */
.wa-widget__card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(11, 20, 26, .24);
}
.wa-widget__header {
    padding: .7rem .85rem;
    background: var(--wa-teal);
}
.wa-widget__header-avatar {
    width: 2.6rem;
    height: 2.6rem;
    border: 0;
    box-shadow: none;
    background: #dfe5e7;
}
.wa-widget__header-title { font-size: 1rem; font-weight: 600; }
.wa-widget__header-status { font-size: .74rem; opacity: .85; }
.wa-widget__online-dot { background: #6fe39c; box-shadow: none; }

/* --- Sohbet zemini: WhatsApp bej + silik desen --- */
.wa-widget__body {
    background-color: var(--wa-chat-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23d9d1c4' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round' opacity='.75'%3E%3Ccircle cx='18' cy='20' r='7'/%3E%3Cpath d='M15 20h6M18 17v6'/%3E%3Cpath d='M70 12c6 0 10 4 10 9s-4 9-10 9-10-4-10-9 4-9 10-9zM66 21h8'/%3E%3Cpath d='M100 40l8 8M108 40l-8 8'/%3E%3Cpath d='M30 70c4-6 12-6 16 0'/%3E%3Ccircle cx='34' cy='64' r='1.2'/%3E%3Ccircle cx='42' cy='64' r='1.2'/%3E%3Cpath d='M80 80l6-10 6 10z'/%3E%3Cpath d='M10 100h14M17 93v14'/%3E%3Cpath d='M58 104c3-4 9-4 12 0s9 4 12 0'/%3E%3Ccircle cx='104' cy='100' r='5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
}
.wa-widget__messages { gap: .3rem; padding: .85rem .9rem; }
/* Gün etiketi */
.wa-widget__messages::before {
    content: "BUGÜN";
    align-self: center;
    margin-bottom: .35rem;
    padding: .28rem .6rem;
    border-radius: 7px;
    background: #fff;
    color: var(--wa-meta);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .04em;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}

/* --- Baloncuklar --- */
.wa-widget__bubble,
.wa-widget__typing {
    max-width: 85%;
    padding: .4rem .55rem .45rem .6rem;
    border-radius: 0 7.5px 7.5px 7.5px;
    background: var(--wa-in);
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.wa-widget__bubble::before,
.wa-widget__typing::before {
    content: "";
    position: absolute;
    top: 0;
    left: -7px;
    width: 8px;
    height: 13px;
    background: var(--wa-in);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.wa-widget__typing { position: relative; padding: .7rem .85rem; }
.wa-widget__bubble--user {
    border-radius: 7.5px 0 7.5px 7.5px;
    background: var(--wa-out);
}
.wa-widget__bubble--user::before {
    left: auto;
    right: -7px;
    background: var(--wa-out);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.wa-widget__bubble p {
    color: var(--wa-ink);
    font-size: .875rem;
    line-height: 1.42;
}
/* Saat için satır sonunda yer aç (WhatsApp'taki gibi metnin yanına oturur) */
.wa-widget__bubble p::after {
    content: "";
    display: inline-block;
    width: 2.6rem;
}
.wa-widget__bubble--user p::after { width: 3.7rem; }
.wa-widget__bubble-time {
    right: .5rem;
    bottom: .3rem;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    color: var(--wa-meta);
    font-size: .66rem;
    line-height: 1;
}
.wa-widget__ticks { color: var(--wa-tick); }

/* --- Cevaplardaki linkler: düz mavi yazı yerine WhatsApp tarzı küçük buton --- */
.wa-widget__link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin: .1rem 0;
    padding: .12rem .55rem .14rem;
    border: 1px solid rgba(0, 128, 105, .22);
    border-radius: 999px;
    background: rgba(0, 168, 132, .08);
    color: var(--wa-teal);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    vertical-align: baseline;
    transition: background-color .15s ease, border-color .15s ease;
}
.wa-widget__link:hover {
    border-color: var(--wa-teal);
    background: rgba(0, 168, 132, .16);
    color: var(--wa-teal-dk);
}
.wa-widget__link svg { flex-shrink: 0; opacity: .8; }
.wa-widget__bubble--user .wa-widget__link { background: rgba(255, 255, 255, .55); }

/* --- Hızlı cevaplar: WhatsApp buton mesajları gibi --- */
.wa-widget__quick { gap: .35rem; padding: 0 .9rem .85rem; }
.wa-widget__quick-btn {
    flex-direction: row;
    justify-content: center;
    gap: .4rem;
    min-height: 2.45rem;
    padding: .45rem .5rem;
    border: 0;
    border-radius: 7.5px;
    background: #fff;
    color: var(--wa-teal);
    font-size: .78rem;
    font-weight: 600;
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.wa-widget__quick-btn:hover,
.wa-widget__quick-btn.is-active {
    border: 0;
    background: #f5f6f6;
    color: var(--wa-teal-dk);
    box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
}
.wa-widget__quick-icon { display: inline-flex; color: var(--wa-teal); }

/* --- Yazma alanı --- */
.wa-widget__composer {
    padding: .55rem .6rem;
    border-top: 0;
    background: #f0f2f5;
}
.wa-widget__input {
    padding: .65rem .95rem;
    border-radius: 8px;
    background: #fff;
    color: var(--wa-ink);
    font-size: .875rem;
}
.wa-widget__input::placeholder { color: var(--wa-meta); }
.wa-widget__input:focus { box-shadow: none; }
.wa-widget__send { background: var(--wa-send); }
.wa-widget__send:hover { background: var(--wa-teal); }

@media (max-width: 639px) {
    .wa-widget__bubble { max-width: 88%; padding: .4rem .55rem .45rem .6rem; }
    .wa-widget__quick-btn { min-height: 2.35rem; font-size: .76rem; }
    .wa-widget__input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .wa-widget__link { transition: none; }
}
