/*
   Ziyaretci danismani (sohbet penceresi).

   Bu dosya yalnizca danisman acikken yuklenir; kapali bir ozelligin
   stili indirilmemelidir.

   Tailwind derlenemiyor (sunucuda node yok), bu yuzden burasi elle
   yazilir ve app.css'in yaydigi ozel ozellikleri kullanir. Katmansiz
   CSS, Tailwind'in @layer utilities kurallarini yener; ozgulluk
   hesabina girmeye gerek kalmaz.

   ---------------------------------------------------------------
   YERLESIM NOTU -- neden "dok" degiskeni var

   Onceden sohbet dugmesi de, yukari-cik dugmesi de right:1rem ve
   bottom:1rem idi. Ikisi ust uste biniyordu: masaustunde 110x66'lik
   sohbet dugmesi 44x44'luk yukari-cik dugmesini tamamen ortuyordu
   (z-40 > z-35). Mobilde ise sohbet dugmesinin 56 pikseli alt aksiyon
   cubugunun uzerine tasiyordu.

   Cozum tek tek kaydirmak degil, ortak bir taban belirlemek:
   --dock-bottom sag alt kosedeki yiginin zeminidir. Alt cubuk varken
   zemin yukari cikar, yigindaki her sey onunla birlikte tasinir.
   Boylece ileride yeni bir yuzen dugme eklenirse de hizalanir.
   --------------------------------------------------------------- */

:root {
    --dock-bottom: 1rem;
    --dock-gap: 0.625rem;
    --chat-launcher: 3.5rem;
    --chat-ink: #1c1917;
    --chat-radius: 1.125rem;
    /* Yazma alaninin buyuyebilecegi en fazla yukseklik. */
    --chat-input-max: 10rem;
}

/* Mobilde alt aksiyon cubugu (3.5rem + 1px cizgi) zemini yukari iter. */
@media (max-width: 1023px) {
    :root {
        --dock-bottom: calc(3.5rem + 1px + env(safe-area-inset-bottom) + 0.75rem);
    }
}

/* Kucuk ekranda pencere zaten kisa: yazma alani yariyi kaplamasin. */
@media (max-width: 640px) {
    :root { --chat-input-max: 7.5rem; }
}

/*
   Yukari-cik dugmesi yiginda sohbet dugmesinin ustunde durur.
   ui.css'te mobil icin ayri bir bottom degeri vardi; bu dosya sonra
   yuklendigi icin her iki kirilimda da buradaki deger gecerli olur.
*/
.to-top,
body.has-advisor .to-top {
    bottom: calc(var(--dock-bottom) + var(--chat-launcher) + var(--dock-gap));
}

@media (max-width: 1023px) {
    .to-top,
    body.has-advisor .to-top {
        bottom: calc(var(--dock-bottom) + var(--chat-launcher) + var(--dock-gap));
    }
}

/* Danisman kapaliyken yigin zemine iner. */
body:not(.has-advisor) .to-top,
body:not(.has-advisor) .to-top:hover {
    bottom: var(--dock-bottom);
}

/* ----------------------------------------------------------- Kok */

.chat {
    position: fixed;
    right: 1rem;
    bottom: var(--dock-bottom);
    z-index: 40;
}

/* Surukleme sirasinda konum JS tarafindan yazilir. */
.chat[data-dragged="true"] {
    right: auto;
    bottom: auto;
}

/* ------------------------------------------------------- Dugme */

.chat-launcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--chat-launcher);
    height: var(--chat-launcher);
    border: 0;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--color-bronze-500), var(--color-bronze-700));
    color: #fff;
    box-shadow: 0 6px 20px rgb(28 25 23 / 0.28), 0 2px 6px rgb(28 25 23 / 0.16);
    cursor: pointer;
    touch-action: none;
    transition: transform 0.18s var(--ease-out-quint), box-shadow 0.18s var(--ease-out-quint);
}

.chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgb(28 25 23 / 0.32), 0 3px 8px rgb(28 25 23 / 0.18);
}

.chat-launcher:active {
    transform: scale(0.96);
}

.chat-launcher:focus-visible {
    outline: 2px solid var(--color-bronze-700);
    outline-offset: 3px;
}

.chat-launcher svg {
    width: 1.5rem;
    height: 1.5rem;
    pointer-events: none;
}

.chat-launcher-close { display: none; }
.chat[data-open="true"] .chat-launcher-open { display: none; }
.chat[data-open="true"] .chat-launcher-close { display: block; }

/* Surukleniyorken imlec ve golge degisir: tutuldugu hissedilsin. */
.chat[data-dragging="true"] .chat-launcher {
    cursor: grabbing;
    transform: scale(1.06);
    box-shadow: 0 14px 34px rgb(28 25 23 / 0.36);
    transition: none;
}

/* Okunmamis isareti */
.chat-launcher-dot {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 0.625rem;
    height: 0.625rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #d64545;
}

.chat-launcher-dot[hidden] { display: none; }

/* Masaustunde uzerine gelince ad yazisi acilir. */
.chat-launcher-label {
    position: absolute;
    right: calc(100% + 0.625rem);
    white-space: nowrap;
    border-radius: var(--radius-sm);
    background: var(--chat-ink);
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    color: #fff;
    opacity: 0;
    transform: translateX(0.25rem);
    pointer-events: none;
    transition: opacity 0.16s, transform 0.16s;
}

.chat-launcher:hover .chat-launcher-label,
.chat-launcher:focus-visible .chat-launcher-label {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 767px) {
    .chat-launcher-label { display: none; }
}

/* Sol kenara yapistiginda yazi sagda acilir. */
.chat[data-side="left"] .chat-launcher-label {
    right: auto;
    left: calc(100% + 0.625rem);
    transform: translateX(-0.25rem);
}

/* Ilk karsilama balonu */
.chat-nudge {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.625rem);
    width: 16rem;
    max-width: calc(100vw - 2rem);
    border: 1px solid var(--color-stone-200);
    border-radius: var(--chat-radius);
    background: #fff;
    padding: 0.75rem 2rem 0.75rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--color-stone-700);
    box-shadow: var(--shadow-card);
    animation: chat-nudge-in 0.32s var(--ease-out-quint) both;
}

.chat-nudge[hidden] { display: none; }

.chat[data-side="left"] .chat-nudge { right: auto; left: 0; }

.chat-nudge-close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-stone-400);
    cursor: pointer;
}

.chat-nudge-close:hover { color: var(--color-stone-700); }
.chat-nudge-close svg { width: 0.875rem; height: 0.875rem; }

@keyframes chat-nudge-in {
    from { opacity: 0; transform: translateY(0.5rem) scale(0.96); }
    to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------ Pencere */

.chat-panel {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--dock-bottom) + var(--chat-launcher) + var(--dock-gap));
    display: flex;
    width: 23.5rem;
    max-width: calc(100vw - 2rem);
    height: min(34rem, calc(100vh - var(--dock-bottom) - var(--chat-launcher) - 3rem));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-stone-200);
    border-radius: var(--chat-radius);
    background: #fff;
    box-shadow: 0 18px 48px rgb(28 25 23 / 0.20), 0 4px 12px rgb(28 25 23 / 0.10);
    animation: chat-panel-in 0.24s var(--ease-out-quint) both;
}

.chat-panel[hidden] { display: none; }

@keyframes chat-panel-in {
    from { opacity: 0; transform: translateY(0.75rem) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* Pencere surukleniyorken konum JS tarafindan yazilir. */
.chat-panel[data-dragged="true"] {
    right: auto;
    bottom: auto;
    animation: none;
}

/* Tam ekran */
.chat-panel[data-full="true"] {
    right: auto;
    bottom: auto;
    top: 1.5rem;
    left: 1.5rem;
    width: calc(100vw - 3rem);
    height: calc(100vh - 3rem);
    max-width: none;
    border-radius: var(--radius-lg);
}

/*
   Mobilde her zaman tam ekran yaprak: kucuk ekranda yuzen pencere
   hem kaydirilamiyor hem de klavye acilinca girdiyi ortuyordu.
   100dvh, adres cubugu gizlenip acilirken yuksekligin zipla-
   masini onler.
*/
@media (max-width: 640px) {
    .chat-panel,
    .chat-panel[data-dragged="true"],
    .chat-panel[data-full="true"] {
        inset: 0;
        top: 0;
        left: 0;
        width: 100%;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }
}

/* ------------------------------------------------------- Baslik */

.chat-head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: 1px solid var(--color-stone-200);
    background: var(--color-stone-50);
    padding: 0.625rem 0.75rem;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.chat-head:active { cursor: grabbing; }

@media (max-width: 640px) {
    .chat-head {
        cursor: default;
        touch-action: auto;
        padding-top: max(0.625rem, env(safe-area-inset-top));
    }
}

.chat-avatar {
    display: flex;
    width: 2.125rem;
    height: 2.125rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--color-bronze-500), var(--color-bronze-700));
    color: #fff;
}

.chat-avatar svg { width: 1.125rem; height: 1.125rem; }

.chat-head-text { min-width: 0; flex: 1; }

.chat-title {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-stone-900);
    line-height: 1.3;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    font-size: 0.75rem;
    color: var(--color-stone-600);
}

.chat-status::before {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 999px;
    background: #3f9142;
}

.chat-head-actions { display: flex; gap: 0.125rem; }

.chat-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--color-stone-500);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.chat-icon-btn:hover { background: var(--color-stone-200); color: var(--color-stone-900); }
.chat-icon-btn:focus-visible { outline: 2px solid var(--color-bronze-700); outline-offset: 1px; }
.chat-icon-btn svg { width: 1rem; height: 1rem; }

/* Tam ekran dugmesi kucuk ekranda anlamsiz: pencere zaten tam ekran. */
@media (max-width: 640px) {
    [data-chat-full] { display: none; }
}

/* --------------------------------------------------------- Akis */

.chat-log {
    flex: 1;
    /* Esnek ogenin varsayilan en kucuk boyu icerigidir; bu olmadan
       akis kisalmaz ve pencereden tasarak kaydirilamaz hale gelir. */
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.875rem 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background:
        radial-gradient(60rem 30rem at 100% 0, var(--color-bronze-50) 0%, transparent 60%),
        #fff;
}

.chat-msg { display: flex; gap: 0.5rem; max-width: 100%; }
.chat-msg[data-role="user"] { justify-content: flex-end; }

.chat-msg-avatar {
    display: flex;
    width: 1.75rem;
    height: 1.75rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--color-bronze-500), var(--color-bronze-700));
    color: #fff;
}

.chat-msg-avatar svg { width: 0.875rem; height: 0.875rem; }

.chat-msg-body { min-width: 0; max-width: 85%; }

.chat-bubble {
    border-radius: 0.875rem;
    padding: 0.5625rem 0.75rem;
    font-size: 0.8438rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.chat-msg[data-role="assistant"] .chat-bubble {
    border: 1px solid var(--color-stone-200);
    border-bottom-left-radius: 0.25rem;
    background: #fff;
    color: var(--color-stone-800);
}

.chat-msg[data-role="user"] .chat-bubble {
    border-bottom-right-radius: 0.25rem;
    background: var(--color-stone-900);
    color: #fff;
}

.chat-bubble p { margin: 0; }
.chat-bubble p + p { margin-top: 0.5rem; }

.chat-bubble ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
    list-style: disc;
}

.chat-bubble li + li { margin-top: 0.25rem; }

.chat-bubble strong { font-weight: var(--font-weight-semibold); }

.chat-msg[data-role="error"] .chat-bubble {
    border: 1px solid #f0d5d2;
    background: #fdf5f4;
    color: #8a2f26;
}

.chat-time {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
    color: var(--color-stone-500);
}

.chat-msg[data-role="user"] .chat-time { text-align: right; }

/* Yaziyor gostergesi */
.chat-typing { display: flex; gap: 0.1875rem; padding: 0.25rem 0; }

.chat-typing span {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--color-stone-400);
    animation: chat-blink 1.1s infinite ease-in-out;
}

.chat-typing span:nth-child(2) { animation-delay: 0.16s; }
.chat-typing span:nth-child(3) { animation-delay: 0.32s; }

@keyframes chat-blink {
    0%, 80%, 100% { opacity: 0.28; transform: translateY(0); }
    40%           { opacity: 1;    transform: translateY(-0.1875rem); }
}

/* ------------------------------------------------- Mesaj araclari */

.chat-tools {
    display: flex;
    gap: 0.125rem;
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.chat-msg:hover .chat-tools,
.chat-msg:focus-within .chat-tools { opacity: 1; }

/* Dokunmatikte hover yok: hep gorunur. */
@media (hover: none) {
    .chat-tools { opacity: 1; }
}

.chat-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--color-stone-500);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.chat-tool:hover { background: var(--color-stone-100); color: var(--color-stone-800); }
.chat-tool:focus-visible { outline: 2px solid var(--color-bronze-700); outline-offset: 1px; }
.chat-tool svg { width: 0.875rem; height: 0.875rem; }
.chat-tool[aria-pressed="true"] { color: var(--color-bronze-700); background: var(--color-bronze-50); }
.chat-tool[data-done="true"] { color: #2f7a33; }

/* --------------------------------------------------- Urun kartlari */

.chat-cards {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.chat-card {
    display: block;
    width: 11rem;
    flex: none;
    scroll-snap-align: start;
    overflow: hidden;
    border: 1px solid var(--color-stone-200);
    border-radius: 0.75rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.chat-card:hover {
    border-color: var(--color-bronze-300);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.chat-card:focus-visible { outline: 2px solid var(--color-bronze-700); outline-offset: 2px; }

.chat-card img {
    display: block;
    width: 100%;
    height: 6rem;
    object-fit: cover;
    background: var(--color-stone-100);
}

.chat-card-body { padding: 0.5rem 0.625rem 0.625rem; }

.chat-card-title {
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
    color: var(--color-stone-900);
}

.chat-card-text {
    margin-top: 0.1875rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--color-stone-600);
}

.chat-card-more {
    margin-top: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-bronze-700);
}

.chat-card-more svg { width: 0.75rem; height: 0.75rem; }

/* ------------------------------------------------------ Aksiyonlar */

.chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.chat-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    min-height: 1.875rem;
    border: 1px solid var(--color-stone-300);
    border-radius: 999px;
    background: #fff;
    padding: 0.25rem 0.6875rem;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-stone-800);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.chat-action:hover {
    border-color: var(--color-stone-900);
    background: var(--color-stone-900);
    color: #fff;
}

.chat-action:focus-visible { outline: 2px solid var(--color-bronze-700); outline-offset: 2px; }
.chat-action svg { width: 0.875rem; height: 0.875rem; flex: none; }

.chat-action[data-kind="whatsapp"] {
    border-color: #a9dbb2;
    background: #f0faf1;
    color: #1c5f27;
}

.chat-action[data-kind="whatsapp"]:hover { border-color: #1c5f27; background: #1c5f27; color: #fff; }

.chat-action[data-kind="phone"] {
    border-color: var(--color-bronze-300);
    background: var(--color-bronze-50);
    color: var(--color-bronze-800);
}

.chat-action[data-kind="phone"]:hover { border-color: var(--color-bronze-700); background: var(--color-bronze-700); color: #fff; }

/* Kaynaklar */
.chat-sources {
    margin-top: 0.4375rem;
    font-size: 0.6875rem;
    line-height: 1.5;
    color: var(--color-stone-600);
}

.chat-sources a {
    color: var(--color-stone-700);
    text-decoration: underline;
    text-decoration-color: var(--color-stone-300);
    text-underline-offset: 2px;
}

.chat-sources a:hover { text-decoration-color: var(--color-bronze-600); }

/* --------------------------------------------------------- Onay */

.chat-consent {
    border: 1px solid var(--color-bronze-200);
    border-radius: 0.875rem;
    background: var(--color-bronze-50);
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--color-stone-700);
}

.chat-consent[hidden] { display: none; }

.chat-consent a {
    color: var(--color-bronze-800);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.625rem;
}

.chat-consent-yes,
.chat-consent-no {
    min-height: 2rem;
    border-radius: var(--radius-sm);
    padding: 0.3125rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
}

.chat-consent-yes {
    border: 1px solid var(--color-bronze-700);
    background: var(--color-bronze-700);
    color: #fff;
}

.chat-consent-yes:hover { background: var(--color-bronze-800); border-color: var(--color-bronze-800); }

.chat-consent-no {
    border: 1px solid var(--color-stone-300);
    background: #fff;
    color: var(--color-stone-700);
}

.chat-consent-no:hover { border-color: var(--color-stone-500); color: var(--color-stone-900); }

/* ------------------------------------------------------- Yazma */

.chat-foot {
    border-top: 1px solid var(--color-stone-200);
    background: #fff;
    padding: 0.625rem 0.75rem;
    padding-bottom: max(0.625rem, env(safe-area-inset-bottom));
}

.chat-chips {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.chat-chips::-webkit-scrollbar { display: none; }
.chat-chips[hidden] { display: none; }

.chat-chip {
    flex: none;
    border: 1px solid var(--color-stone-300);
    border-radius: 999px;
    background: #fff;
    padding: 0.3125rem 0.6875rem;
    font-size: 0.75rem;
    color: var(--color-stone-700);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.chat-chip:hover { border-color: var(--color-stone-900); color: var(--color-stone-900); }

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 0.375rem;
    border: 1px solid var(--color-stone-300);
    border-radius: 1.125rem;
    background: #fff;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.chat-form:focus-within {
    border-color: var(--color-bronze-600);
    box-shadow: 0 0 0 3px var(--color-bronze-100);
}

/*
   Yazma alani icerik uzadikca asagi dogru buyur.

   Onceden sabit bir ust sinir ve varsayilan overflow vardi; tek satirlik
   metinde bile kaydirma cubugu beliriyordu. Cubuk artik yalnizca metin
   ust sinira DAYANDIGINDA cikar (JS data-scroll ile isaretler); o ana
   kadar tasma gizlidir ve alan sessizce buyur.
*/
.chat-input {
    flex: 1;
    min-width: 0;
    height: 2.125rem;
    max-height: var(--chat-input-max);
    border: 0;
    background: none;
    padding: 0.4375rem 0;
    font: inherit;
    font-size: 0.8438rem;
    line-height: 1.5;
    color: var(--color-stone-900);
    resize: none;
    overflow-y: hidden;
    transition: height 0.12s var(--ease-out-quint);
}

.chat-input[data-scroll="true"] {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-stone-300) transparent;
}

.chat-input[data-scroll="true"]::-webkit-scrollbar { width: 0.375rem; }
.chat-input[data-scroll="true"]::-webkit-scrollbar-track { background: transparent; }

.chat-input[data-scroll="true"]::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--color-stone-300);
}

.chat-input:focus { outline: none; }
.chat-input::placeholder { color: var(--color-stone-500); }

/* Yazi alani buyurken gonder ve mikrofon altta hizali kalir. */
.chat-form { align-items: flex-end; }

@media (prefers-reduced-motion: reduce) {
    .chat-input { transition: none; }
}

.chat-send,
.chat-mic {
    display: inline-flex;
    width: 2.125rem;
    height: 2.125rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.chat-mic { background: none; color: var(--color-stone-500); }
.chat-mic:hover { background: var(--color-stone-100); color: var(--color-stone-800); }
.chat-mic[hidden] { display: none; }

.chat-mic[data-listening="true"] {
    background: #fdecea;
    color: #b03528;
    animation: chat-pulse 1.2s infinite;
}

@keyframes chat-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgb(176 53 40 / 0.35); }
    50%      { box-shadow: 0 0 0 0.3125rem rgb(176 53 40 / 0); }
}

.chat-send { background: var(--color-stone-900); color: #fff; }
.chat-send:hover:not(:disabled) { background: var(--color-bronze-700); }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-send:focus-visible,
.chat-mic:focus-visible { outline: 2px solid var(--color-bronze-700); outline-offset: 2px; }
.chat-send svg, .chat-mic svg { width: 1rem; height: 1rem; }

.chat-note {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    line-height: 1.4;
    color: var(--color-stone-500);
    text-align: center;
}

.chat-error {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #8a2f26;
}

.chat-error[hidden] { display: none; }

/* Onay verilmisse duran kucuk geri alma baglantisi. KVKK acisindan
   onemli olan onayi surekli sormak degil, geri alinabilir tutmaktir. */
.chat-consent-revoke {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--color-stone-600);
    text-decoration: underline;
    text-decoration-color: var(--color-stone-300);
    text-underline-offset: 2px;
    cursor: pointer;
}

.chat-consent-revoke:hover { color: var(--color-stone-900); }
.chat-consent-revoke[hidden] { display: none; }

/* --------------------------------------------- Erisim tercihleri */

@media (prefers-reduced-motion: reduce) {
    .chat-panel,
    .chat-nudge { animation: none; }

    .chat-launcher,
    .chat-card,
    .chat-action { transition: none; }

    .chat-typing span,
    .chat-mic[data-listening="true"] { animation: none; }
}

@media print {
    .chat { display: none; }
}
