/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== GLOBAL: Mobil‑first (LIGHT MODE DEFAULT) ========== */
html, body {
  background: #ffffff; 
  color: #444444;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

#contact-text {
  color: #444444 !important;
  -webkit-touch-callout: none;
  -webkit-user-select: text;
  user-select: text;
}


.logo {
  width: 50px;
  opacity: 0.8;
  display: none;
}

p {
  font-size: 14px;
}
h1 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #444444;
}

/* ========== WRAPPER & HEADER ========== */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  background: #ffffff;
}

.chat-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* Logo ortalanır */
  height: 48px;
  padding: 0 16px;

}

/* Soldaki butonlar kapsayıcısı */
.header-left {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;  /* Butonlar arası boşluk isterseniz */
}

/* .icon-button mevcut tanımınızı koruyabilirsiniz, 
   sadece position: absolute kalktı. infoBtn vs. spesifik satırlar gerekmiyor. */
.icon-button {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button img {
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

#infoBtn {
  position: absolute;
  left: 16px;
}

/* ========== CHAT MESSAGES ========== */
.chat-container {
  min-height: 0; /* Flex child overflow önler */
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px;
  background: #ffffff;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #cccccc transparent;
  -webkit-overflow-scrolling: touch;
}
.chat-container::-webkit-scrollbar {
  width: 2px !important;
}
.chat-container::-webkit-scrollbar-thumb {
  background: #cccccc !important;
  border-radius: 3px;
}



.message {
  display: inline-block;
  width: auto;
  max-width: 90%;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: 13px;
}

/* USER & BOT MESSAGES (Light) */
.user-message {
  background: #f4f4f4;
  color: #444444;
  align-self: flex-end;
  margin-left: auto;
  margin-right: 0;
  border-bottom-right-radius: 0;
}

.bot-message {
  background: #f4f4f4;
  color: #444444;
  align-self: flex-start;
  margin-right: auto;
  border-bottom-left-radius: 0;
}

/* "Yükleniyor" animasyonu */
.bot-message.loading {
  background-color: transparent !important;
}
.message .dot-loader {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border-radius: 50%;
  background: #666666;
  animation: dotBlink 1.2s infinite ease-in-out;
}
.message .dot-loader::before,
.message .dot-loader::after {
  content: "";
  position: absolute;
  top: 0;
  width: 10px; 
  height: 10px;
  border-radius: 50%;
  background: #666666;
}
.message .dot-loader::before {
  left: -16px;
  animation: dotBlink 1.2s infinite ease-in-out .15s;
}
.message .dot-loader::after {
  left: 16px;
  animation: dotBlink 1.2s infinite ease-in-out .3s;
}
@keyframes dotBlink {
  0%,100% { opacity: .3; transform: scale(.8); }
  50%     { opacity: 1; transform: scale(1);  }
}

/* ========== INPUT BOX (Footer) ========== */
.input-box {
  display: flex;
  align-items: center;
  column-gap: 8px;
  height: 48px;
  background: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 10px;
  margin: 10px;
  margin-bottom: 10px;
  font-size: 16px;
}
#userInput {
  flex: 1;
  resize: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  background: transparent;
  border: none;
  outline: none;
  color: #444444;
  resize: none;
  font-size: 16px;
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
  line-height: 48px;
}
#userInput::placeholder {
  color: #bbbbbb;
  font-size: 14px;
}
#userInput::-webkit-scrollbar {
  height: 6px;
}
#userInput::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

/* Gönder butonu */
.send-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 4px;
  opacity: 0.7;
}
.send-button img {
  width: 24px;
  height: 24px;
}

/* ========== MODAL (Popup) GENEL ========== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  z-index: 10000;
  width: 100%;
}
.hidden {
  display: none;
}
.modal-content {
  background: transparent;
  padding: 40px 24px;
  border-radius: 12px;
  text-align: center;
  color: #444444;
  position: relative;
  width: 320px;
  height: 380px; /* SABİT Yükseklik */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: none;
}
.modal-content img {
  opacity: 0.7;
}

.close-btn {
  position: absolute;
  top: -40px;
  left: 34px;
  font-size: 2.5rem;
  line-height: 1;
  background: none;
  border: none;
  color: #444444;
  cursor: pointer;
  opacity: 1;
  width: 36px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.close-btn:focus {
  position: absolute;
  top: -30px;
  left: 34px;
  font-size: 2.5rem;
  line-height: 1;
  background: none;
  border: none;
  color: #444444;
  cursor: pointer;
  opacity: 1;
  width: 36px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.close-btn:active {
  position: absolute;
  top: -30px;
  left: 34px;
  font-size: 2.5rem;
  line-height: 1;
  background: none;
  border: none;
  color: #444444;
  cursor: pointer;
  opacity: 1;
  width: 36px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}





/* ========== Yeni Sohbet, Hata bildir, vs. ========== */
.new-chat-content,
.report-content,
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center; 
  text-align: center;
  position: relative;
  width: 320px;
  padding: 40px;
}
.new-chat-header-icon,
.report-header-icon,
.contact-header-icon {
  width: 56px;
  height: auto;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* ========== TEXTAREA (Hata bildir) ========== */
.report-textarea {
  width: 90%;
  margin-bottom: 6px;
  margin-top: 20px;
  border: 1px solid #444;
  background: #ffffff;
  color: #444444;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  font-family: Arial, sans-serif;
  resize: none;
}

/* ========== BUTONLAR ========== */
.modal-actions,
.modal-actions2 {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  width: 100%;
}


.modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 12px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: 240px;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn:focus{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 12px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: 240px;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-btn:active{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 12px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: 240px;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn2 {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 14px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: auto;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn2:active {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 14px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: auto;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-btn2:focus {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 14px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: auto;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-btn:hover{
  opacity: 0.8;
}
.btn-left-icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: middle;
}
.btn-right-icon {
  width: 22px;
  height: 22px;
  margin-left: auto;
  opacity: 0.7;
}
.btn-right-icon:hover {
  opacity: 1;
}

/* Voice button */
.voice-button {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 4px;
  opacity: 0.7;
}
.voice-button img {
  width: 28px;
  height: 28px;
}
.voice-button:hover {
  opacity: 1;
}

/* ========== Switch (Koyu mod) ========== */
.modal-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff1c;
  border: 1px solid #444;
  color: #444444;
  padding: 14px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: 240px;
}
.modal-switch .btn-dark-icon {
  width: 18px;
  height: 18px;
  margin-right: 10px;
}
.switch-label {
  flex: 1;
  font-size: 13px;
  text-align: left;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.switch input {
  display: none;
}
.slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 34px;
  transition: .2s;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;

}
.slider:focus {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 34px;
  transition: .2s;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;

}

.slider:active {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 34px;
  transition: .2s;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;

}
.slider:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px; 
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
input:checked + .slider {
  background: #666;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* ========== Gizlilik + İletişim ========== */
.privacy-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 4px;
}
.privacy-header-icon {
  width: 56px;
  height: auto;
  margin: 16px 0;
}
.privacy-scroll {
  width: 100%;
  max-height: 180px; 
  overflow-y: auto;
  border: 1px solid #444;
  border-radius: 8px;
  background: #ffffff;
  color: #444444;
  margin-bottom: 16px;
  padding: 12px;
  text-align: left;
  font-size: 12px;
}

/* Scrollbar stili */
.privacy-scroll {
  scrollbar-width: thin;             /* Firefox ince çubuk */
  scrollbar-color: #666 #ddd;        /* thumb track */
}
.privacy-scroll::-webkit-scrollbar {
  width: 8px;
}
.privacy-scroll::-webkit-scrollbar-track {
  background: #e0e0e0;
  border-radius: 8px;
}
.privacy-scroll::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 8px;
}
.privacy-scroll::-webkit-scrollbar-thumb:hover {
  background: #777;
}

.contact-content .contact-header-icon {
  width: 56px;
  height: auto;
  margin: 16px 0;
}

/* Versiyon */
.version {
  font-size: 11px !important;
  margin-top: 30px;
  opacity: 0.4;
  text-decoration: none;
  color: black;
}

/* ========== PC (>=641px) ========== */
@media (min-width: 640px) {
  .chat-wrapper {
    max-width: 640px;
    margin: 0 auto;
  }
  .modal-content {
    width: 320px;
  }
}

/* =========================================
   =          K O Y U  M O D E            =
   ========================================= */

.dark-mode html,
.dark-mode body {
  background: #121212;
  color: #E0E0E0;
}

.dark-mode #contact-text {
  color: #E0E0E0 !important;
}

.dark-mode .chat-wrapper {
  background: #121212;
  color: #E0E0E0;
}

.dark-mode .version{

  color: #E0E0E0;
}
.dark-mode .chat-container {
  background: #121212;
  color: #E0E0E0;
}
.dark-mode .chat-container::-webkit-scrollbar-thumb {
  background: #3c3c3c;
}

.dark-mode .chat-header {
  border-bottom: 1px solid #444444 ; 
}

.dark-mode .modal {
  background:#121212;
}

.dark-mode .user-message {
  background: #2A2A2A;
  color: #E0E0E0;
}
.dark-mode .bot-message {
  background: #2A2A2A;
  color: #E0E0E0;
}
.dark-mode .bot-message.loading {
  background-color: transparent !important;
}

.dark-mode .input-box {
  background: #1E1E1E;
  border: 1px solid #444;
}
.dark-mode #userInput {
  background: #1E1E1E;
  color: #E0E0E0;
}
.dark-mode #userInput::placeholder {
  color: #aaa;
}

/* Modal arka plan */
.dark-mode .modal-content {
  color: #E0E0E0;
}
.dark-mode .close-btn {
  color: #E0E0E0;
}

.dark-mode h1 {
 color: #E0E0E0
}

.dark-mode .report-textarea {
  background-color: transparent;
  color: #E0E0E0
}

.dark-mode .modal-btn,
.dark-mode .modal-btn2 {
  background: #1818185d;
  color: #E0E0E0;
  border: 1px solid #666;
}

.dark-mode .privacy-scroll {
  background: #1818185d;
  color: #E0E0E0;
  border: 1px solid #666;
}

/* Switch bar */
.dark-mode .modal-switch {
  background: #1818185d;
  border: 1px solid #666;
  color: #E0E0E0;
}
.dark-mode .slider {
  background: #555; 
}
.dark-mode .slider:before {
  background: #e0e0e0; 
}
.dark-mode input:checked + .slider {
  background: #444444; 
}
.dark-mode input:checked + .slider:before {
  background: #ffffff;
}

/* İkonları ters çevir (beyaza döner) */
.dark-mode img {
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}

