#nigchat-widget{position:fixed;right:18px;bottom:18px;z-index:999999;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;}
#nigchat-toggle{display:flex;align-items:center;gap:10px;border:none;border-radius:999px;padding:12px 14px;cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.16);background:#111827;color:#fff;position:relative}
#nigchat-toggle .nigchat-dot{width:10px;height:10px;border-radius:999px;background:#22c55e;display:inline-block}
#nigchat-panel{width:340px;max-width:calc(100vw - 36px);height:520px;max-height:calc(100vh - 110px);background:#fff;border-radius:18px;box-shadow:0 18px 55px rgba(0,0,0,.22);overflow:hidden;display:none;margin-bottom:10px}
.nigchat-open #nigchat-panel{display:block}
.nigchat-header{display:flex;justify-content:space-between;align-items:flex-start;padding:14px 14px 10px;background:#0b1220;color:#fff}
.nigchat-title{font-weight:700}
.nigchat-sub{font-size:12px;opacity:.8;margin-top:2px}
#nigchat-close{border:none;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer;padding:0 6px}
.nigchat-messages{padding:12px;height:340px;overflow:auto;background:#f7f7fb}
.nigchat-form,.nigchat-preform{padding:12px;border-top:1px solid #eee;background:#fff}
.nigchat-preform input{width:100%;margin-bottom:8px;border:1px solid #e5e7eb;border-radius:12px;padding:10px}
#nigchat-start{width:100%;border:none;border-radius:12px;padding:10px;background:#111827;color:#fff;cursor:pointer}
.nigchat-small{font-size:11px;opacity:.65;margin-top:8px}
#nigchat-text{width:100%;border:1px solid #e5e7eb;border-radius:12px;padding:10px;resize:none}
#nigchat-send{margin-top:8px;width:100%;border:none;border-radius:12px;padding:10px;background:#111827;color:#fff;cursor:pointer}
.nigchat-bubble{margin:8px 0;display:flex;gap:10px}
.nigchat-bubble.admin{justify-content:flex-end}
.nigchat-bubble .box{max-width:78%;border:1px solid #e5e7eb;border-radius:14px;padding:10px;background:#fff}
.nigchat-bubble.admin .box{background:#e9f1ff}
.nigchat-bubble .meta{font-size:11px;opacity:.65;margin-bottom:6px}

.nigchat-bubble .nigchat-avatar{
  width:26px;
  height:26px;
  border-radius:999px;
  flex:0 0 26px;
  background:#e5e7eb;
  align-self:flex-start;
}
.nigchat-bubble.admin .nigchat-avatar{
  background:#111827;
}
.nigchat-theme-tema-2 .nigchat-bubble.admin .nigchat-avatar{
  background:#f5b51b;
}
.nigchat-theme-tema-3 .nigchat-bubble.admin .nigchat-avatar{
  background:#f4511e;
}
.nigchat-theme-tema-4 .nigchat-bubble.admin .nigchat-avatar{
  background:#16a34a;
}

.nigchat-typing{
  font-size:11px;
  color:#6b7280;
  padding:0 12px 6px 12px;
  font-style:italic;
}




/* Offline actions */
.nigchat-offline-actions{
  padding: 10px 12px;
  border-top: 1px solid rgba(0,0,0,.08);
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}
.nigchat-offline-actions .nigchat-wa,
.nigchat-offline-actions .nigchat-offline-btn{
  flex:1;
  text-align:center;
  padding:10px 12px;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  color:#111827;
  text-decoration:none;
}
.nigchat-offline-actions .nigchat-wa:hover,
.nigchat-offline-actions .nigchat-offline-btn:hover{
  filter:brightness(.98);
}

/* Modal */
.nigchat-modal{ position:fixed; inset:0; z-index:999999; display:none; }
.nigchat-modal .nigchat-modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.45); }
.nigchat-modal .nigchat-modal-card{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(520px, calc(100% - 24px));
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 14px 40px rgba(0,0,0,.25);
}
.nigchat-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.nigchat-modal-title{ font-weight:700; }
.nigchat-modal-close{
  width:32px; height:32px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
#nigchat-offline-form{ padding:14px; display:flex; flex-direction:column; gap:10px; }
#nigchat-offline-form input,
#nigchat-offline-form textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.12);
  border-radius:10px;
  padding:10px 12px;
  font:inherit;
}
#nigchat-offline-form textarea{ resize:vertical; }
.nigchat-modal-submit{
  padding:10px 12px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  font-weight:700;
}


/* FIX14 – "Sohbeti Başlat" butonu kısa ekranlarda aşağıda kalmasın
   Paneli flex kolona çevir: mesaj alanı esnesin, form alanı görünür kalsın.
*/
.nigchat-open #nigchat-panel{ display:flex !important; }
#nigchat-panel{ flex-direction:column !important; }

/* Sabit mesaj yüksekliğini kaldırıp esnet */
#nigchat-panel .nigchat-messages{
  flex:1 1 auto !important;
  height:auto !important;
  min-height:0 !important;
}

/* Alt bölümler her zaman görünür kalsın */
#nigchat-panel .nigchat-preform,
#nigchat-panel .nigchat-form,
#nigchat-panel .nigchat-offline-actions{
  flex:0 0 auto !important;
}

/* Çok kısa ekranlarda biraz sıkıştır */
@media (max-height: 720px){
  #nigchat-panel{ height:480px; }
  #nigchat-panel .nigchat-messages{ padding:10px; }
  #nigchat-panel .nigchat-preform,
  #nigchat-panel .nigchat-form{ padding:10px; }
}

/* FIX15 – sessiz uyarı: okunmamış mesaj rozeti */
#nigchat-toggle.nigchat-unread::after{
  content:'';
  position:absolute;
  top:-4px;
  right:-4px;
  width:12px;
  height:12px;
  border-radius:999px;
  background:#ef4444;
  box-shadow:0 0 0 2px #ffffff;
}

/* FIX15 – admin online: canlı pulse animasyon */
#nigchat-toggle.nigchat-online .nigchat-dot{
  position:relative;
}
#nigchat-toggle.nigchat-online .nigchat-dot::after{
  content:'';
  position:absolute;
  left:50%;
  top:50%;
  width:10px;
  height:10px;
  margin-left:-5px;
  margin-top:-5px;
  border-radius:999px;
  background:rgba(34,197,94,0.35);
  animation:nigchat-pulse 1.1s infinite;
}
@keyframes nigchat-pulse{
  0%{ transform:scale(1); opacity:.8; }
  70%{ transform:scale(2.2); opacity:0; }
  100%{ transform:scale(2.2); opacity:0; }
}


/* FIX16 – Widget kapalıyken yeni mesaj uyarı bandı */
#nigchat-toast{
  display:none;
  position:absolute;
  right:0;
  bottom:62px;
  max-width:260px;
  background:#111827;
  color:#fff;
  font-size:13px;
  padding:10px 12px;
  border-radius:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  pointer-events:none;
}
#nigchat-toast.nigchat-toast-show{
  display:block;
  animation:nigchat-toast-blink 1.2s infinite;
}
@keyframes nigchat-toast-blink{
  0%, 100% { opacity:1; transform:translateY(0); }
  50% { opacity:.25; transform:translateY(-1px); }
}


/* Dosya yükleme alanı */
.nigchat-upload{display:flex;align-items:center;justify-content:space-between;margin-top:6px;font-size:12px;gap:6px;}
.nigchat-upload-label{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid #e5e7eb;cursor:pointer;white-space:nowrap;}
.nigchat-upload-hint{opacity:.6;font-size:11px;}


/* Tema bazlı renkler */
.nigchat-theme-tema-1 #nigchat-toggle{background:#111827;}
.nigchat-theme-tema-1 .nigchat-header{background:#0b1220;}

.nigchat-theme-tema-2 #nigchat-toggle{background:#07132f; color:#fff; border:1px solid rgba(245,181,27,.48); box-shadow:0 10px 30px rgba(7,19,47,.24);}
.nigchat-theme-tema-2 .nigchat-header{background:linear-gradient(120deg,#07132f 0%,#102a5c 100%); border-bottom:2px solid #f5b51b;}

.nigchat-theme-tema-3 #nigchat-toggle{background:#f4511e;}
.nigchat-theme-tema-3 .nigchat-header{background:#f4511e;}

.nigchat-theme-tema-4 #nigchat-toggle{background:#15803d;}
.nigchat-theme-tema-4 .nigchat-header{background:#166534;}


/* Tema bazlı butonlar ve mesaj alanı çizgileri */
.nigchat-theme-tema-1 #nigchat-send,
.nigchat-theme-tema-1 #nigchat-start,
.nigchat-theme-tema-1 .nigchat-modal-submit,
.nigchat-theme-tema-1 .nigchat-offline-actions .nigchat-wa,
.nigchat-theme-tema-1 .nigchat-offline-actions .nigchat-offline-btn{
  background:#111827;
  color:#fff;
  border-color:#0b1220;
}

.nigchat-theme-tema-2 #nigchat-send,
.nigchat-theme-tema-2 #nigchat-start,
.nigchat-theme-tema-2 .nigchat-modal-submit,
.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-wa,
.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-offline-btn{
  background:#f5b51b;
  color:#07132f;
  border-color:#d99c10;
}

.nigchat-theme-tema-3 #nigchat-send,
.nigchat-theme-tema-3 #nigchat-start,
.nigchat-theme-tema-3 .nigchat-modal-submit,
.nigchat-theme-tema-3 .nigchat-offline-actions .nigchat-wa,
.nigchat-theme-tema-3 .nigchat-offline-actions .nigchat-offline-btn{
  background:#f4511e;
  color:#fff;
  border-color:#f4511e;
}

.nigchat-theme-tema-4 #nigchat-send,
.nigchat-theme-tema-4 #nigchat-start,
.nigchat-theme-tema-4 .nigchat-modal-submit,
.nigchat-theme-tema-4 .nigchat-offline-actions .nigchat-wa,
.nigchat-theme-tema-4 .nigchat-offline-actions .nigchat-offline-btn{
  background:#15803d;
  color:#fff;
  border-color:#166534;
}

/* Tema bazlı mesaj alanı ve input ince çizgileri */
.nigchat-theme-tema-1 #nigchat-text,
.nigchat-theme-tema-1 .nigchat-preform input{
  border-color:rgba(15,23,42,.35);
}
.nigchat-theme-tema-2 #nigchat-text,
.nigchat-theme-tema-2 .nigchat-preform input{
  border-color:rgba(7,19,47,.4);
}
.nigchat-theme-tema-3 #nigchat-text,
.nigchat-theme-tema-3 .nigchat-preform input{
  border-color: rgba(244,81,30,0.45);
}
.nigchat-theme-tema-4 #nigchat-text,
.nigchat-theme-tema-4 .nigchat-preform input{
  border-color:rgba(22,163,74,.45);
}

.nigchat-theme-tema-1 #nigchat-text:focus,
.nigchat-theme-tema-1 .nigchat-preform input:focus,
.nigchat-theme-tema-2 #nigchat-text:focus,
.nigchat-theme-tema-2 .nigchat-preform input:focus,
.nigchat-theme-tema-3 #nigchat-text:focus,
.nigchat-theme-tema-3 .nigchat-preform input:focus,
.nigchat-theme-tema-4 #nigchat-text:focus,
.nigchat-theme-tema-4 .nigchat-preform input:focus{
  outline:none;
  box-shadow:0 0 0 1px rgba(15,23,42,.1);
}

/* Offline buton yazılarını biraz daha belirgin yap */
.nigchat-offline-actions .nigchat-wa,
.nigchat-offline-actions .nigchat-offline-btn{
  font-weight:600;
}


/* Rating (sohbet kapanışı) */
.nigchat-rating{
  padding:10px 12px 12px 12px;
  border-top:1px solid #e5e7eb;
  background:#f9fafb;
  margin-top:4px;
}
.nigchat-rating-inner{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.nigchat-rating-title{
  font-size:12px;
  font-weight:500;
  color:#374151;
}
.nigchat-rating-stars{
  display:flex;
  gap:6px;
}
.nigchat-rating-stars button{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  padding:0 2px;
  color:#d1d5db;
}
.nigchat-rating-stars button.nigchat-star-active{
  color:#fbbf24;
}
#nigchat-rating-note{
  width:100%;
  min-height:46px;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:6px 8px;
  font-size:12px;
  resize:vertical;
}
.nigchat-rating-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.nigchat-rating-skip{
  border-radius:999px;
  border:1px solid #e5e7eb;
  padding:4px 10px;
  font-size:11px;
  background:#fff;
  cursor:pointer;
}
.nigchat-rating-send{
  border-radius:999px;
  border:none;
  padding:4px 14px;
  font-size:11px;
  cursor:pointer;
  background:#2563eb;
  color:#fff;
}
.nigchat-theme-tema-2 .nigchat-rating-send{
  background:#f5b51b;
  color:#07132f;
}
.nigchat-theme-tema-3 .nigchat-rating-send{
  background:#f4511e;
}
.nigchat-theme-tema-4 .nigchat-rating-send{
  background:#16a34a;
}



/* Rating trigger star next to upload */
.nigchat-rating-trigger{
  margin-left:6px;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:16px;
  line-height:1;
  padding:0 4px;
  color:#d1d5db;
}
.nigchat-rating-trigger:hover{
  color:#fbbf24;
}



/* v4.8.8 – Masaüstünde normal buton, mobilde sade ikon */
#nigchat-toggle .nigchat-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
#nigchat-toggle .nigchat-icon svg{
  display:block;
}
#nigchat-toggle .nigchat-label{
  display:inline-block;
}

@media (max-width: 768px){
  #nigchat-widget{
    right:12px !important;
    bottom:12px !important;
  }

  #nigchat-toggle{
    width:54px !important;
    height:54px !important;
    min-width:54px !important;
    padding:0 !important;
    border-radius:50% !important;
    justify-content:center !important;
    align-items:center !important;
    gap:0 !important;
  }

  #nigchat-toggle .nigchat-label,
  #nigchat-toggle .nigchat-dot{
    display:none !important;
  }

  #nigchat-toggle .nigchat-icon{
    width:22px !important;
    height:22px !important;
    color:#fff !important;
  }

  #nigchat-panel{
    margin-bottom:10px;
  }
}

/* v4.9.0 – Destek konuları + NİG Asistan */
.nigchat-mode-tabs{display:flex;gap:6px;padding:8px 10px;background:#fff;border-bottom:1px solid #e5e7eb;flex:0 0 auto}
.nigchat-mode-tab{flex:1;border:1px solid #dbe2ea;background:#f8fafc;color:#334155;border-radius:10px;padding:8px 7px;font-size:12px;font-weight:800;cursor:pointer}
.nigchat-mode-tab.is-active{background:#0f172a;color:#fff;border-color:#0f172a}
.nigchat-chat-view{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.nigchat-preform .nigchat-topic-label{display:block;font-size:11px;font-weight:800;color:#475569;margin:0 0 5px 2px}
.nigchat-preform select,#nigchat-offline-form select{width:100%;margin-bottom:8px;border:1px solid #e5e7eb;border-radius:12px;padding:10px;background:#fff;font:inherit;color:#111827}
#nigchat-offline-form select{margin-bottom:0}
.nigchat-offline-actions{flex-wrap:wrap}
.nigchat-offline-actions .nigchat-wa,.nigchat-offline-actions .nigchat-offline-btn{min-width:92px;padding:9px 8px;font-size:12px}

.nigchat-assistant-view{min-height:0;flex:1 1 auto;overflow:auto;background:#f8fafc;padding:12px}
.nigchat-assistant-head{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}
.nigchat-assistant-head strong{font-size:16px;color:#0f172a}
.nigchat-assistant-head span{font-size:11px;color:#64748b;line-height:1.45}
.nigchat-assistant-search-wrap{position:sticky;top:0;z-index:2;background:#f8fafc;padding-bottom:8px}
#nigchat-assistant-search{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:10px 11px;background:#fff;font:inherit;outline:none}
#nigchat-assistant-search:focus{border-color:#64748b;box-shadow:0 0 0 2px rgba(100,116,139,.12)}
.nigchat-assistant-meta{font-size:11px;color:#64748b;margin:1px 2px 9px;font-weight:700}
.nigchat-assistant-topic{background:#fff;border:1px solid #e2e8f0;border-radius:12px;margin:0 0 8px;overflow:hidden}
.nigchat-assistant-topic>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;font-size:13px;font-weight:850;color:#0f172a}
.nigchat-assistant-topic>summary::-webkit-details-marker{display:none}
.nigchat-assistant-topic>summary:after{content:'›';font-size:19px;line-height:1;color:#64748b;transform:rotate(0deg);transition:.15s}
.nigchat-assistant-topic[open]>summary:after{transform:rotate(90deg)}
.nigchat-assistant-topic>summary small{margin-left:auto;font-size:10px;color:#64748b;font-weight:700;white-space:nowrap}
.nigchat-assistant-topic-body{border-top:1px solid #eef2f7;padding:9px}
.nigchat-assistant-section-title{font-size:10px;text-transform:uppercase;letter-spacing:.05em;font-weight:900;color:#64748b;margin:8px 2px 5px}
.nigchat-assistant-item{border:1px solid #e2e8f0;border-radius:9px;background:#fff;margin:5px 0;overflow:hidden}
.nigchat-assistant-item>summary{cursor:pointer;padding:8px 9px;font-size:12px;font-weight:750;color:#1e293b}
.nigchat-assistant-tip>summary:before{content:'💡 ';}
.nigchat-assistant-answer{padding:0 9px 9px;font-size:12px;line-height:1.55;color:#475569;overflow-wrap:anywhere}
.nigchat-assistant-answer p:first-child{margin-top:2px}.nigchat-assistant-answer p:last-child{margin-bottom:0}
.nigchat-assistant-no-content,.nigchat-assistant-empty{padding:14px;text-align:center;color:#64748b;font-size:12px;background:#fff;border:1px dashed #cbd5e1;border-radius:10px}

.nigchat-theme-tema-2 .nigchat-mode-tab.is-active{background:#07132f;border-color:#f5b51b;color:#fff}
.nigchat-theme-tema-3 .nigchat-mode-tab.is-active{background:#f4511e;border-color:#f4511e}
.nigchat-theme-tema-4 .nigchat-mode-tab.is-active{background:#15803d;border-color:#15803d}
.nigchat-theme-tema-1 .nigchat-preform select,.nigchat-theme-tema-1 #nigchat-offline-form select{border-color:rgba(15,23,42,.35)}
.nigchat-theme-tema-2 .nigchat-preform select,.nigchat-theme-tema-2 #nigchat-offline-form select{border-color:rgba(7,19,47,.4)}
.nigchat-theme-tema-3 .nigchat-preform select,.nigchat-theme-tema-3 #nigchat-offline-form select{border-color:rgba(244,81,30,.45)}
.nigchat-theme-tema-4 .nigchat-preform select,.nigchat-theme-tema-4 #nigchat-offline-form select{border-color:rgba(22,163,74,.45)}

@media(max-width:480px){
  .nigchat-offline-actions .nigchat-wa,.nigchat-offline-actions .nigchat-offline-btn{flex:1 1 calc(33.333% - 7px);min-width:0;font-size:11px;padding:9px 5px}
  .nigchat-assistant-view{padding:10px}
}

/* v4.9.2 – Mobil okunabilirlik + LMS global form CSS izolasyonu */
#nigchat-widget,
#nigchat-widget *{box-sizing:border-box;}

.nigchat-unread-badge{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  border:2px solid #fff;
  box-shadow:0 5px 14px rgba(15,23,42,.24);
  font-size:11px;
  line-height:1;
  font-weight:900;
  z-index:3;
}
/* Sayısal badge varken eski boş kırmızı nokta kullanılmasın. */
#nigchat-toggle.nigchat-unread::after{display:none!important;}

@media (max-width:768px){
  #nigchat-panel{
    position:absolute!important;
    right:0!important;
    bottom:64px!important;
    width:calc(100vw - 24px)!important;
    max-width:calc(100vw - 24px)!important;
    height:min(620px, calc(100vh - 96px))!important;
    height:min(620px, calc(100dvh - 96px))!important;
    max-height:calc(100vh - 96px)!important;
    max-height:calc(100dvh - 96px)!important;
    margin:0!important;
    border-radius:18px!important;
  }

  #nigchat-panel .nigchat-header{
    padding:11px 12px 9px!important;
    flex:0 0 auto!important;
  }
  #nigchat-panel .nigchat-title{font-size:16px!important;line-height:1.25!important;}
  #nigchat-panel .nigchat-sub{font-size:11.5px!important;line-height:1.38!important;margin-top:3px!important;}
  #nigchat-close{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important;border-radius:12px!important;}

  #nigchat-panel .nigchat-mode-tabs{padding:7px 9px!important;gap:7px!important;}
  #nigchat-panel .nigchat-mode-tab{min-height:40px!important;height:40px!important;padding:0 8px!important;font-size:12px!important;}

  #nigchat-panel .nigchat-chat-view{min-height:0!important;overflow:hidden!important;}
  #nigchat-panel .nigchat-messages{
    flex:1 1 220px!important;
    min-height:96px!important;
    padding:10px!important;
    overscroll-behavior:contain;
  }
  #nigchat-panel .nigchat-bubble{margin:7px 0!important;gap:7px!important;}
  #nigchat-panel .nigchat-bubble .box{max-width:86%!important;padding:9px 10px!important;border-radius:13px!important;}
  #nigchat-panel .nigchat-bubble .meta{font-size:10px!important;margin-bottom:4px!important;}
  #nigchat-panel .nigchat-bubble .txt{font-size:14px!important;line-height:1.5!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
  #nigchat-panel .nigchat-bubble .nigchat-avatar{width:22px!important;height:22px!important;flex-basis:22px!important;}

  #nigchat-panel .nigchat-form{
    flex:0 0 auto!important;
    padding:9px 10px 10px!important;
    border-top:1px solid #e5e7eb!important;
  }
  /* NİG LMS mobil commerce'in textarea{min-height:112px!important} kuralını chat içinde ez. */
  body #nigchat-widget #nigchat-text{
    display:block!important;
    width:100%!important;
    height:70px!important;
    min-height:70px!important;
    max-height:96px!important;
    padding:9px 10px!important;
    border-radius:12px!important;
    font-size:16px!important;
    line-height:1.35!important;
    resize:none!important;
    margin:0!important;
  }
  #nigchat-panel .nigchat-upload{margin-top:7px!important;gap:6px!important;min-height:38px!important;}
  #nigchat-panel .nigchat-upload-label{
    min-height:38px!important;
    height:38px!important;
    padding:0 10px!important;
    font-size:12px!important;
    border-radius:999px!important;
  }
  #nigchat-panel .nigchat-upload-hint{font-size:10px!important;line-height:1.2!important;}
  #nigchat-panel .nigchat-rating-trigger{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    padding:0!important;
    margin-left:auto!important;
    border-radius:12px!important;
    font-size:18px!important;
  }
  body #nigchat-widget #nigchat-send{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 12px!important;
    margin-top:7px!important;
    border-radius:12px!important;
    font-size:14px!important;
    line-height:1!important;
  }

  #nigchat-toast{
    right:0!important;
    bottom:64px!important;
    max-width:min(260px, calc(100vw - 86px))!important;
    padding:9px 11px!important;
    font-size:12px!important;
    border-radius:11px!important;
  }
}

@media (max-width:480px){
  #nigchat-panel .nigchat-upload-hint{display:none!important;}
  #nigchat-panel .nigchat-upload-label{max-width:calc(100% - 50px)!important;}
}

/* LMS'nin sabit mobil alt menüsü bulunan sayfalarda sohbet düğmesini menünün üstüne al. */
@media (max-width:768px){
  body.niglms-mobile-commerce-page #nigchat-widget{bottom:78px!important;}
  body.niglms-mobile-commerce-page #nigchat-panel{
    height:min(600px, calc(100vh - 162px))!important;
    height:min(600px, calc(100dvh - 162px))!important;
    max-height:calc(100vh - 162px)!important;
    max-height:calc(100dvh - 162px)!important;
  }
}

/* v4.9.2 – NİG LMS mobil commerce genel form kurallarından tam izolasyon */
@media (max-width:768px){
  body.niglms-mobile-commerce-page #nigchat-widget form{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    background:#fff!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  body.niglms-mobile-commerce-page #nigchat-widget #nigchat-preform{
    padding:10px!important;
    border-top:1px solid #e5e7eb!important;
  }
  body.niglms-mobile-commerce-page #nigchat-widget #nigchat-form{
    padding:9px 10px 10px!important;
    border-top:1px solid #e5e7eb!important;
  }

  body.niglms-mobile-commerce-page #nigchat-widget .nigchat-preform input,
  body.niglms-mobile-commerce-page #nigchat-widget .nigchat-preform select{
    min-height:42px!important;
    height:42px!important;
    padding:8px 10px!important;
    margin:0 0 7px!important;
    border-radius:11px!important;
    font-size:14px!important;
  }

  body.niglms-mobile-commerce-page #nigchat-widget .nigchat-mode-tab{
    background:#f8fafc!important;
    color:#334155!important;
    border:1px solid #dbe2ea!important;
    box-shadow:none!important;
  }
  body.niglms-mobile-commerce-page #nigchat-widget .nigchat-mode-tab.is-active{
    background:#0f172a!important;
    color:#fff!important;
    border-color:#0f172a!important;
  }
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-2 .nigchat-mode-tab.is-active{background:#07132f!important;border-color:#f5b51b!important;color:#fff!important;}
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-3 .nigchat-mode-tab.is-active{background:#f4511e!important;border-color:#f4511e!important;}
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-4 .nigchat-mode-tab.is-active{background:#15803d!important;border-color:#15803d!important;}

  body.niglms-mobile-commerce-page #nigchat-widget #nigchat-close{
    background:transparent!important;
    color:#fff!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.niglms-mobile-commerce-page #nigchat-widget #nigchat-rating-trigger{
    background:#f8fafc!important;
    color:#f59e0b!important;
    border:1px solid #e5e7eb!important;
    box-shadow:none!important;
  }

  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-1 #nigchat-send,
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-1 #nigchat-start{background:#111827!important;color:#fff!important;}
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-2 #nigchat-send,
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-2 #nigchat-start{background:#f5b51b!important;color:#07132f!important;}
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-3 #nigchat-send,
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-3 #nigchat-start{background:#f4511e!important;color:#fff!important;}
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-4 #nigchat-send,
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-4 #nigchat-start{background:#15803d!important;color:#fff!important;}

  body.niglms-mobile-commerce-page #nigchat-offline-modal form{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    background:#fff!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
}


/* v4.9.3 – Mobilde Canlı Sohbet / harici WhatsApp CTA çakışmasını önle */
@media (max-width:768px){
  /* NİG LMS Core bazı mobil şablonlarda #nigchat-toggle'a bottom uygular.
     Launcher konumunu yalnız widget kapsayıcısı yönetsin. */
  body #nigchat-widget #nigchat-toggle{
    bottom:auto!important;
    top:auto!important;
    left:auto!important;
    right:0!important;
    transition:right .18s ease, transform .18s ease, box-shadow .18s ease!important;
  }

  /* Sayfada görünür, sabit bir harici WhatsApp düğmesi varsa sohbeti sola al.
     54–58px buton + yaklaşık 12px görsel boşluk = 72px. */
  body #nigchat-widget.nigchat-has-external-whatsapp #nigchat-toggle{
    right:72px!important;
  }
}

/* v4.9.4 – Tema-2: NİG Akademi kurumsal lacivert / altın palette
   Ana #07132F | ikincil #102A5C | vurgu #F5B51B.
   Tema-1/3/4 ve WP yönetici stillerini değiştirmez.
*/
#nigchat-widget.nigchat-theme-tema-2 .nigchat-bubble.admin .box{
  background:#fff8e8;
  border-color:rgba(245,181,27,.4);
  color:#07132f;
}
#nigchat-widget.nigchat-theme-tema-2 .nigchat-mode-tab.is-active{
  background:#07132f;
  color:#fff;
  border-color:#f5b51b;
}
#nigchat-widget.nigchat-theme-tema-2 #nigchat-start,
#nigchat-widget.nigchat-theme-tema-2 #nigchat-send,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-wa,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-offline-btn,
#nigchat-offline-modal.nigchat-theme-tema-2 .nigchat-modal-submit{
  background:#f5b51b;
  border-color:#d99c10;
  color:#07132f;
  font-weight:800;
}
#nigchat-widget.nigchat-theme-tema-2 #nigchat-start:hover,
#nigchat-widget.nigchat-theme-tema-2 #nigchat-send:hover,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-wa:hover,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-offline-actions .nigchat-offline-btn:hover,
#nigchat-offline-modal.nigchat-theme-tema-2 .nigchat-modal-submit:hover{
  background:#ffd05c;
  filter:none;
}
#nigchat-widget.nigchat-theme-tema-2 #nigchat-text:focus,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-preform input:focus,
#nigchat-widget.nigchat-theme-tema-2 .nigchat-preform select:focus,
#nigchat-widget.nigchat-theme-tema-2 #nigchat-assistant-search:focus,
#nigchat-offline-modal.nigchat-theme-tema-2 #nigchat-offline-form input:focus,
#nigchat-offline-modal.nigchat-theme-tema-2 #nigchat-offline-form textarea:focus,
#nigchat-offline-modal.nigchat-theme-tema-2 #nigchat-offline-form select:focus{
  outline:none;
  border-color:#102a5c;
  box-shadow:0 0 0 3px rgba(245,181,27,.2);
}
#nigchat-widget.nigchat-theme-tema-2 #nigchat-toast{
  background:#07132f;
  border:1px solid rgba(245,181,27,.35);
}
#nigchat-widget.nigchat-theme-tema-2 .nigchat-assistant-topic[open]{
  border-color:rgba(245,181,27,.65);
}
#nigchat-offline-modal.nigchat-theme-tema-2 .nigchat-modal-head{
  color:#07132f;
  border-bottom-color:rgba(245,181,27,.35);
}
/* LMS mobil şablonunun yüksek özgüllüklü !important buton renklerini koru. */
@media (max-width:768px){
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-2 #nigchat-send,
  body.niglms-mobile-commerce-page #nigchat-widget.nigchat-theme-tema-2 #nigchat-start{
    background:#f5b51b!important;
    border-color:#d99c10!important;
    color:#07132f!important;
  }
}
