@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* ============================================
   GLOBAL & BASE & MAIN LAYOUT (core.css)
   ============================================ */
:root {
  --popup-max-w: 1280px;
  --popup-inset-x: 24px;
  --popup-inset-y: 56px;
  --history-w: 280px;
  --gap: 0px;

  --bg: #ffffff;
  --panel: #ffffff;
  --txt: #202124;
  --muted: #4a4a4a;
  --brand: #1d3e2f;
  --border: #e5e7eb;

  --z-modal: 2147483647;
  --z-loader: 2147483646;

  --header-h: 72px;
}

html,
body {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: -webkit-fill-available !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
  margin: 0 !important;
  padding: 0 !important;
  -webkit-text-size-adjust: 100%;
  font-family: "Manrope", sans-serif;
  background: #ffffff !important;
}

/* Kalıntılar temizlendi: finly-chat-mount -> app-chat-mount, fc-shell -> app-shell */
#app-chat-mount,
#app-shell {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  display: flex;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

#app-chat-mount :is(#appLoader, #loginModal, #app-shell, #accountModal, #logoutModal) {
  display: none;
}

#app-chat-mount.is-auth #loginModal,
#app-chat-mount.is-chat #app-shell {
  display: flex;
}

#app-chat-mount.is-chat :is(#accountModal, #logoutModal) {
  display: none;
}

#app-chat-mount.is-loading #appLoader {
  display: grid;
}

#loginModal.auth-pending {
  pointer-events: none;
}

#loginModal.auth-pending .login-box {
  opacity: 0.65;
  filter: grayscale(0.2);
}

#iconView {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 75px;
  height: 75px;
  text-align: center;
  cursor: pointer;
  z-index: 9999;
  display: none !important;
}

#iconView img {
  width: 75px;
  height: 75px;
  border-radius: 10px;
}

#popupContainer {
  position: relative !important;
  flex: 0 0 80%;
  width: 80% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #ffffff !important;
  border: none;
  box-shadow: none;
}

/* Kalıntı temizlendi: fc-chatPromoRight -> app-chatPromoRight */
#app-chatPromoRight {
  flex: 0 0 20%;
  width: 20%;
  height: 100%;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

#app-chatPromoRight img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Kalıntı temizlendi: fc-chatMain -> app-chatMain */
#app-chatMain {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#popupContainer.history-closed #popupPanel {
  display: none;
}

#popupContainer.history-closed #chatContentArea {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
}

#popupBody {
  flex: 1 1 auto;
  height: calc(100% - var(--header-h));
  display: flex;
  box-sizing: border-box;
  background: #ffffff !important;
  position: relative;
  overflow: hidden;
}

/* --- GLOBAL MOBILE --- */
@media (max-width: 820px) {

  body,
  html {
    background-color: #f0f4f9 !important;
  }

  #app-chatPromoRight {
    display: none !important;
  }

  #popupContainer,
  #app-chatMain {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #ffffff !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #popupBody {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100% - 60px) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    display: flex !important;
  }
}