/* ============================================================
   RİZE YAŞAM — Destek merkezi ve canlı destek (4.46)
   Üye: panel/destek/ (merkez + sohbet). Yönetim: admin/destek/ (aynı sohbet bileşeni, .ds-yonetim).
   Sitenin Teras değişkenleri (ry.css) ile; açık ve koyu temada, uygulamanın WebView'ında da.
   ============================================================ */
.ds { --ds-r: 18px; --ds-yesil: #1f7a3a; --ds-yesil-z: color-mix(in srgb, #1f7a3a 12%, transparent); max-width: 1080px; margin: 0 auto; padding: 0 0 2rem; }
.ds h1, .ds h2, .ds h3 { color: var(--ry-murekkep); letter-spacing: -.01em; }
.ds-gizli { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Üst bölüm ─────────────────────────────────────────────── */
.ds-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 1.6rem 1.5rem 1.4rem; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, #0e2a1c, #1f5132 60%, #2f7a4b); color: #fff; }
.ds-hero::after { content: ""; position: absolute; inset: 0; background: var(--ry-teras) center / 900px auto; opacity: .7; pointer-events: none; }
.ds-hero > * { position: relative; z-index: 1; }
.ds-kicker { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c2dc5c; }
.ds .ds-hero h1 { color: #fff; font-size: clamp(1.45rem, 4.6vw, 2.1rem); font-weight: 800; margin: .45rem 0 .4rem; }
.ds-hero p { color: rgba(255,255,255,.86); max-width: 640px; margin: 0 0 1rem; line-height: 1.55; }
.ds-durum, .ds-canli-serit { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; line-height: 1.35; }
.ds-durum { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .45rem .9rem .45rem .7rem; color: rgba(255,255,255,.92); }
.ds-durum b { color: #fff; }
.ds-nokta { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #9aa69f; box-shadow: 0 0 0 3px rgba(154,166,159,.25); }
.acik > .ds-nokta { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.28); animation: dsNabiz 1.8s ease-in-out infinite; }
@keyframes dsNabiz { 50% { box-shadow: 0 0 0 6px rgba(61,220,132,.08); } }
@media (prefers-reduced-motion: reduce) { .acik > .ds-nokta { animation: none; } }

/* ── Kartlar ───────────────────────────────────────────────── */
.ds-izgara { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ds-izgara { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } }
.ds-sol { display: grid; gap: 1rem; }
.ds-kart { background: var(--ry-yuzey); border: 1px solid var(--ry-cizgi); border-radius: var(--ds-r); padding: 1.1rem; box-shadow: var(--ry-golge-1); }
.ds-kart h2 { font-size: 1.08rem; font-weight: 800; margin: 0; }
.ds-kart-bas { display: flex; gap: .8rem; align-items: center; margin-bottom: .85rem; }
.ds-kart-bas p { margin: .1rem 0 0; color: var(--ry-soluk); font-size: .88rem; }
.ds-ik { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--ds-yesil-z); color: var(--ds-yesil); font-size: 1.05rem; }
.ds-ik-2 { background: color-mix(in srgb, #2f6fdb 12%, transparent); color: #2f6fdb; }
[data-tema="karanlik"] .ds { --ds-yesil: #6cc08b; }
[data-tema="karanlik"] .ds-ik-2 { color: #8fb3ff; }

.ds textarea, .ds input[type=text], .ds input:not([type]) { width: 100%; border: 1.5px solid var(--ry-cizgi); border-radius: 14px; background: var(--ry-yuzey-2); color: var(--ry-metin);
  padding: .75rem .9rem; font: inherit; font-size: 16px; line-height: 1.45; resize: none; transition: border-color .15s, box-shadow .15s; }
.ds textarea:focus, .ds input:focus { outline: none; border-color: var(--ds-yesil); box-shadow: 0 0 0 3px var(--ds-yesil-z); background: var(--ry-yuzey); }
.ds-baslat { display: grid; gap: .7rem; }
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: 0 1.2rem; border: 0; border-radius: 12px;
  background: #1f5132; color: #fff; font-weight: 800; font-size: .95rem; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s; }
.ds-btn:hover { background: #17402a; color: #fff; }
.ds-btn:active { transform: scale(.98); }
.ds-btn[disabled] { opacity: .6; cursor: default; }
.ds-btn-cizgi { background: transparent; color: var(--ry-murekkep); border: 1.5px solid var(--ry-cizgi); }
.ds-btn-cizgi:hover { background: var(--ry-yuzey-2); color: var(--ry-murekkep); }
.ds-btn-kucuk { min-height: 38px; padding: 0 .8rem; font-size: .85rem; border-radius: 10px; }
[data-tema="karanlik"] .ds-btn:not(.ds-btn-cizgi) { background: #6cc08b; color: #0b1510; }
/* 4.48: bağlantı olan düğmeler (misafirde "Giriş yap") sitenin `body.ry a` rengini alıp zeminle aynı renkte kalıyordu */
body.ry a.ds-btn, body.ry a.ds-btn:hover, body.ry a.ds-btn:focus, body.ry a.ds-btn:visited { color: #fff; text-decoration: none; }
body.ry a.ds-btn.ds-btn-cizgi, body.ry a.ds-btn.ds-btn-cizgi:hover, body.ry a.ds-btn.ds-btn-cizgi:visited { color: var(--ry-murekkep); }
[data-tema="karanlik"] body.ry a.ds-btn:not(.ds-btn-cizgi) { color: #0b1510; }

.ds-talep-form summary { list-style: none; display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.ds-talep-form summary::-webkit-details-marker { display: none; }
.ds-talep-form summary b { display: block; font-size: 1.02rem; color: var(--ry-murekkep); }
.ds-talep-form summary small { display: block; color: var(--ry-soluk); font-size: .85rem; }
.ds-ok { margin-left: auto; color: var(--ry-soluk); transition: transform .2s; }
.ds-talep-form[open] .ds-ok { transform: rotate(180deg); }
.ds-talep-form form { display: grid; gap: .85rem; margin-top: 1rem; }
.ds-kategoriler { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.ds-kategoriler legend { font-weight: 800; font-size: .88rem; color: var(--ry-murekkep); margin-bottom: .45rem; }
.ds-kat input { position: absolute; opacity: 0; }
.ds-kat span { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .85rem; border-radius: 999px; border: 1.5px solid var(--ry-cizgi); font-size: .86rem; font-weight: 700; color: var(--ry-metin); cursor: pointer; }
.ds-kat span i { color: var(--ry-soluk); }
.ds-kat input:checked + span { border-color: var(--ds-yesil); background: var(--ds-yesil-z); color: var(--ds-yesil); }
.ds-kat input:checked + span i { color: var(--ds-yesil); }
.ds-kat input:focus-visible + span { box-shadow: 0 0 0 3px var(--ds-yesil-z); }
.ds-alan { display: grid; gap: .35rem; margin: 0; }
.ds-alan > span { font-weight: 800; font-size: .88rem; color: var(--ry-murekkep); }

/* ── Taleplerim ────────────────────────────────────────────── */
.ds-liste-bas { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.ds-sayi { font-size: .78rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; background: var(--ry-yuzey-2); color: var(--ry-soluk); }
.ds-talepler { list-style: none; margin: 0 -.5rem; padding: 0; }
.ds-talep { display: flex; align-items: center; gap: .75rem; padding: .7rem .5rem; border-radius: 14px; text-decoration: none; color: inherit; }
.ds-talep:hover { background: var(--ry-yuzey-2); }
.ds-talep-ik { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ry-yuzey-2); color: var(--ry-soluk); }
.ds-talep-orta { flex: 1; min-width: 0; }
.ds-talep-orta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .95rem; line-height: 1.3; color: var(--ry-murekkep); overflow: hidden; overflow-wrap: anywhere; }
.ds-talep-orta small { display: block; color: var(--ry-soluk); font-size: .8rem; margin-top: .1rem; }
.ds-talep.yeni b { font-weight: 800; }
.ds-cip { flex: 0 0 auto; font-size: .74rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.ds-cip.bekliyor { background: color-mix(in srgb, #b7791f 15%, transparent); color: #9a6212; }
.ds-cip.yanit { background: var(--ds-yesil-z); color: var(--ds-yesil); }
.ds-cip.kapali { background: var(--ry-yuzey-2); color: var(--ry-soluk); }
[data-tema="karanlik"] .ds-cip.bekliyor { color: #e2b45a; }
.ds-rozet { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #e5484d; color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }
.ds-bos { text-align: center; color: var(--ry-soluk); padding: 1.4rem .5rem; }
.ds-bos i { font-size: 1.8rem; opacity: .6; }
.ds-bos p { margin: .5rem 0 0; }
.ds-yardim { border-top: 1px solid var(--ry-cizgi); margin-top: .8rem; padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ds-yardim h3 { width: 100%; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ry-soluk); margin: 0 0 .2rem; }
.ds-yardim a { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; padding: .4rem .7rem; border-radius: 10px; background: var(--ry-yuzey-2); color: var(--ry-metin); text-decoration: none; }
.ds-yardim a i { color: var(--ds-yesil); }
.ds-giris { text-align: center; padding: 2rem 1.2rem; }
.ds-giris > i { font-size: 2rem; color: var(--ds-yesil); }
.ds-giris h2 { margin: .6rem 0 .3rem; font-size: 1.2rem; }
.ds-giris p { color: var(--ry-soluk); margin: 0 auto .9rem; max-width: 460px; }
.ds-dugmeler { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.ds-not { font-size: .88rem; margin-top: 1rem !important; }
.ds-uyari { display: flex; gap: .55rem; align-items: center; padding: .75rem .95rem; border-radius: 14px; margin-bottom: 1rem; background: color-mix(in srgb, #9e2f1b 10%, transparent); color: #9e2f1b; font-weight: 700; font-size: .92rem; }
[data-tema="karanlik"] .ds-uyari { color: #f19a86; }

/* ── Sohbet ────────────────────────────────────────────────── */
.ds-sohbet-sayfa { max-width: 760px; display: flex; flex-direction: column; min-height: calc(100vh - var(--ry-ust-h, 64px) - 2rem); padding-bottom: 0; }
.ds-sohbet-bas { display: flex; align-items: center; gap: .7rem; padding: .2rem 0 .7rem; }
.ds-geri { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ry-yuzey-2); color: var(--ry-murekkep); text-decoration: none; }
.ds-sohbet-baslik { flex: 1; min-width: 0; }
.ds-sohbet-baslik h1 { font-size: 1.05rem; line-height: 1.3; font-weight: 800; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ds-sohbet-baslik p { margin: .15rem 0 0; color: var(--ry-soluk); font-size: .8rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.ds-bas-eylem { margin: 0; flex: 0 0 auto; }
.ds-canli-serit { display: flex; padding: .55rem .85rem; border-radius: 12px; background: var(--ry-yuzey-2); color: var(--ry-soluk); font-size: .84rem; margin-bottom: .6rem; }
.ds-canli-serit b { color: var(--ry-murekkep); }
.ds-canli-serit.acik { background: color-mix(in srgb, #3ddc84 12%, var(--ry-yuzey)); }
.ds-mesajlar { flex: 1; display: flex; flex-direction: column; gap: .35rem; padding: .6rem .1rem 1rem; }
.ds-gun { text-align: center; margin: .7rem 0 .3rem; }
.ds-gun span { font-size: .74rem; font-weight: 800; color: var(--ry-soluk); background: var(--ry-yuzey-2); padding: .2rem .65rem; border-radius: 999px; }
.ds-msj { display: flex; flex-direction: column; max-width: min(82%, 520px); }
.ds-msj.ben { align-self: flex-end; align-items: flex-end; }
.ds-msj.onlar { align-self: flex-start; align-items: flex-start; }
.ds-msj-ad { font-size: .74rem; font-weight: 800; color: var(--ds-yesil); margin: .25rem .7rem .15rem; }
.ds-balon { padding: .6rem .85rem; border-radius: 18px; font-size: .96rem; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.ds-msj.ben .ds-balon { background: #1f5132; color: #fff; border-bottom-right-radius: 6px; }
.ds-msj.onlar .ds-balon { background: var(--ry-yuzey); border: 1px solid var(--ry-cizgi); color: var(--ry-metin); border-bottom-left-radius: 6px; }
[data-tema="karanlik"] .ds-msj.ben .ds-balon { background: #2c6b45; }
.ds-msj.gonderiliyor .ds-balon { opacity: .65; }
.ds-msj.hata .ds-balon { background: #9e2f1b; }
.ds-saat { font-size: .7rem; color: var(--ry-cok-soluk); margin: .15rem .5rem 0; }
.ds-msj.hata .ds-saat { color: #9e2f1b; font-weight: 700; }
.ds-sistem { text-align: center; margin: .4rem 0; }
.ds-sistem span { display: inline-block; font-size: .8rem; color: var(--ry-soluk); background: var(--ry-yuzey-2); padding: .4rem .8rem; border-radius: 12px; max-width: 92%; line-height: 1.4; }
.ds-sistem.ds-bilgi span { background: var(--ds-yesil-z); color: var(--ds-yesil); font-weight: 700; }
.ds-yaz { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: flex-end; gap: .5rem; padding: .7rem 1rem calc(.6rem + env(safe-area-inset-bottom, 0px));
  margin: auto -1rem 0; background: linear-gradient(to top, var(--ry-bg) 82%, transparent); }
.ds-yaz textarea { max-height: 160px; border-radius: 22px; padding: .7rem 1rem; }
.ds-gonder { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #1f5132; color: #fff; display: grid; place-items: center; font-size: 1.05rem; cursor: pointer; }
.ds-gonder[disabled] { opacity: .5; }
[data-tema="karanlik"] .ds-gonder { background: #6cc08b; color: #0b1510; }
@media (max-width: 1023px) {
  /* sitenin telefondaki alt gezinmesi yazma kutusunu örtmesin */
  body.ry .ds-yaz { bottom: var(--ry-mobil-alt, 0px); padding-bottom: .6rem; }
  /* alt gezinmenin ortadaki "+" düğmesi kadar boşluk: altından mesajlar görünmesin */
  body.ry .ds-yaz::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: calc(var(--ry-altnav-fab, 0px) + 2px); background: var(--ry-bg); }
  .ds-hero { border-radius: 20px; padding: 1.3rem 1.1rem 1.15rem; }
}
/* Uygulamanın WebView'ı: sitenin üst/alt çubukları yok; sohbet ekranı tam yükseklik */
html.ry-uygulama .ds-yaz { bottom: 0 !important; padding-bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)) !important; }
html.ry-uygulama .ds-yaz::after { display: none; }
html.ry-uygulama .ds-sohbet-sayfa { min-height: calc(100vh - 1.5rem); }

/* ── Yönetim paneli ────────────────────────────────────────── */
.ds-yonetim { max-width: none; }
.ds-y-ust { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.ds-y-filtre { display: flex; flex-wrap: wrap; gap: .4rem; }
.ds-y-filtre a { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1.5px solid var(--ry-cizgi); font-size: .85rem; font-weight: 800; color: var(--ry-metin); text-decoration: none; }
.ds-y-filtre a.secili { background: #1f5132; border-color: #1f5132; color: #fff; }
.ds-y-filtre a span { font-size: .72rem; padding: 0 .4rem; border-radius: 999px; background: var(--ry-yuzey-2); color: var(--ry-soluk); }
.ds-y-filtre a.secili span { background: rgba(255,255,255,.2); color: #fff; }
.ds-y-canli { margin-left: auto; display: inline-flex; align-items: center; gap: .55rem; font-size: .85rem; }
.ds-y-izgara { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .ds-y-izgara { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.ds-y-tablo { width: 100%; border-collapse: collapse; }
.ds-y-tablo td { padding: .65rem .5rem; border-top: 1px solid var(--ry-cizgi); vertical-align: middle; }
.ds-y-tablo tr.yeni td { background: color-mix(in srgb, #e5484d 5%, transparent); }
.ds-y-tablo a.ds-y-konu { font-weight: 800; color: var(--ry-murekkep); text-decoration: none; }
.ds-y-tablo small { color: var(--ry-soluk); }
.ds-y-kisi dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; margin: .6rem 0 0; font-size: .88rem; }
.ds-y-kisi dt { color: var(--ry-soluk); font-weight: 700; }
.ds-y-kisi dd { margin: 0; overflow-wrap: anywhere; }
.ds-y-hazir { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; }
.ds-y-hazir button { border: 1px solid var(--ry-cizgi); background: var(--ry-yuzey); color: var(--ry-metin); border-radius: 999px; padding: .3rem .7rem; font-size: .8rem; font-weight: 700; cursor: pointer; }
.ds-yonetim .ds-sohbet-sayfa { max-width: none; min-height: 0; }
.ds-yonetim .ds-mesajlar { max-height: 62vh; overflow-y: auto; background: var(--ry-yuzey-2); border-radius: 16px; padding: .8rem; }
.ds-yonetim .ds-yaz { position: static; background: none; margin: 0; padding: .6rem 0 0; }
.ds-yonetim .ds-yaz::after { display: none; }
