/* Klima Teknik Servis V47: Tek kaydırma yüzeyi, sabit mesaj alanı. En son yüklenen sayfa stili. */
html.hk42-page-locked,html.hk42-page-locked body {overflow:hidden!important;overscroll-behavior:none!important;height:100%!important;}
.hk42-chat .hk42-dialog{
  position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  height:min(730px,calc(100dvh - 24px))!important;max-height:calc(100dvh - 24px)!important;
  width:min(1000px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;
  min-height:0!important;overflow:hidden!important;
  border-radius:25px;background:#fff;isolation:isolate;
}
.hk42-chat .hk42-head{grid-row:1;min-height:0!important;}
.hk42-chat .hk42-stepper{grid-row:2;}
.hk42-chat .hk42-body{
 grid-row:2;min-width:0!important;min-height:0!important;overflow:hidden!important;
 display:flex!important;flex-direction:column!important;padding:0!important;
 overscroll-behavior:contain;scrollbar-width:none!important;
}
/* İlk üç form adımı kendi yüzeyinde kayabilir; dış modal asla kaymaz. */
.hk42-chat .hk42-body[data-unused]{display:flex}
.hk42-chat .hk42-categories,.hk42-chat .hk42-topics,.hk42-chat .hk42-identity{
  flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;
  padding:22px 28px;scrollbar-width:none;-ms-overflow-style:none;
}
.hk42-chat .hk42-categories::-webkit-scrollbar,.hk42-chat .hk42-topics::-webkit-scrollbar,.hk42-chat .hk42-identity::-webkit-scrollbar{display:none}
.hk42-chat .hk42-dialog[data-view="setup"] .hk42-stepper{display:flex!important}
/* Setup görünümünde adım ilerlemesi grid satırı olarak ayrı, içerik altta. */
.hk42-chat .hk42-dialog[data-view="setup"]{grid-template-rows:auto auto minmax(0,1fr) auto!important;}
.hk42-chat .hk42-dialog[data-view="setup"] .hk42-body{grid-row:3;}
.hk42-chat .hk42-dialog[data-view="setup"] .hk42-foot{grid-row:4;}
.hk42-chat .hk42-dialog[data-view="conversation"]{grid-template-rows:auto minmax(0,1fr) auto!important;}
.hk42-chat .hk42-dialog[data-view="conversation"] .hk42-stepper{display:none!important;}
.hk42-chat .hk42-dialog[data-view="conversation"] .hk42-body{grid-row:2;}
.hk42-chat .hk42-foot{grid-row:3;flex:none!important;padding:9px 18px!important;}
.hk42-chat .hk42-conversation{
  flex:1 1 auto!important;min-height:0!important;min-width:0!important;max-height:100%!important;
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;padding:15px 24px 12px!important;margin:0!important;animation:none!important;
  gap:0!important;
}
.hk42-chat .hk42-conversation-heading{grid-row:1;min-height:0;flex:none!important;margin:0 0 10px!important;padding:12px 17px!important;}
.hk42-chat .hk42-messages{
  grid-row:2;min-height:0!important;max-height:none!important;height:auto!important;
  flex:none!important;overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior-y:contain;scrollbar-width:thin!important;
  scrollbar-color:#93b8d7 #eff6fc!important;
  padding:12px 12px 14px!important;scroll-padding-bottom:15px;
  background:linear-gradient(180deg,rgba(246,250,255,.4),rgba(255,255,255,.8));
  border-radius:12px;
}
.hk42-chat .hk42-messages::-webkit-scrollbar{width:8px}
.hk42-chat .hk42-messages::-webkit-scrollbar-track{background:#eff6fc;border-radius:99px}
.hk42-chat .hk42-messages::-webkit-scrollbar-thumb{background:#93b8d7;border-radius:99px;border:2px solid #eff6fc}
.hk42-chat .hk42-messages::-webkit-scrollbar-thumb:hover{background:#3986be}
.hk42-chat .hk42-message-form{
  grid-row:3;flex:none!important;min-height:76px!important;max-height:120px!important;
  display:flex!important;position:relative!important;z-index:2!important;
  align-items:stretch!important;gap:12px!important;
  margin:0!important;padding:12px 0 0!important;
  border-top:1px solid #d7e8f6;background:#fff!important;
}
.hk42-chat .hk42-message-form textarea{resize:none!important;min-height:55px!important;max-height:85px!important;height:56px!important;overflow-y:auto!important;line-height:1.4}
.hk42-chat .hk42-message-form button{min-width:118px!important;display:flex!important;align-items:center;justify-content:center;white-space:nowrap!important;}
.hk42-chat .hk42-notice:not([hidden]){margin:0!important;padding:6px 14px!important;max-height:56px;overflow:auto;flex:none;}
.hk44-actions{display:flex;align-items:center;gap:8px;flex:none}
.hk44-actions button{min-height:39px}
.hk44-refresh{background:#e7f3fd;border:1px solid #c9e1f5;border-radius:9px;font-weight:800;color:#1065a0;padding:8px 12px;cursor:pointer}
.hk44-refresh:disabled{opacity:.45;cursor:wait}
.hk44-version{font-size:9px;letter-spacing:.1em;font-weight:800;font-style:normal;color:#d4f2ff;border:1px solid #79beea;border-radius:5px;padding:2px 5px;vertical-align:middle}
@media(max-width:690px){
 .hk42-chat .hk42-dialog{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;left:0!important;top:0!important;transform:none!important;border-radius:0!important;}
 .hk42-chat .hk42-categories,.hk42-chat .hk42-topics,.hk42-chat .hk42-identity{padding:16px 13px!important;}
 .hk42-chat .hk42-conversation{padding:10px 12px 8px!important;}
 .hk42-chat .hk42-conversation-heading{padding:10px!important;margin-bottom:7px!important;gap:8px!important;}
 .hk42-chat .hk42-messages{padding:8px!important;}
 .hk42-chat .hk42-message-form{gap:7px!important;min-height:67px!important;padding-top:9px!important;}
 .hk42-chat .hk42-message-form button{min-width:80px!important;padding:8px 10px!important;}
 .hk42-chat .hk42-foot{padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;}
 .hk44-refresh span{display:none}
 .hk44-refresh{padding:8px 11px}
}
@media(max-height:560px){
 .hk42-chat .hk42-head{padding:7px 12px!important;min-height:0!important}
 .hk42-chat .hk42-conversation{padding-top:7px!important;padding-bottom:5px!important}
 .hk42-chat .hk42-conversation-heading{padding:5px 9px!important;margin-bottom:4px!important}
 .hk42-chat .hk42-message-form{min-height:55px!important;padding-top:5px!important}
 .hk42-chat .hk42-message-form textarea{height:45px!important;min-height:45px!important}
 .hk42-chat .hk42-foot{padding:4px 9px!important}
}
/* dialog's explicit display:grid must not override the HTML hidden attribute */
.hk42-chat .hk42-dialog[hidden]{display:none!important}
.hk42-chat .hk42-conversation-heading .hk44-actions{display:flex;flex-direction:row;align-items:center;gap:8px}
@media(max-width:450px){.hk42-chat .hk44-actions{gap:5px!important}.hk42-chat .hk44-actions button{font-size:11px;padding:8px 9px!important}}

/* V45 kritik düzeltme: !important display:grid ile hidden attribute çakışmasın. */
.hk42-chat .hk42-body > .hk42-view[hidden],
.hk42-chat .hk42-conversation[hidden],
.hk42-chat .hk42-categories[hidden],
.hk42-chat .hk42-topics[hidden],
.hk42-chat .hk42-identity[hidden]{display:none!important;visibility:hidden!important;}
.hk42-chat .hk42-reset:disabled{opacity:.55;cursor:wait}

/* V47 oturum yönetimi */
.hk42-chat .hk47-logout{border:1px solid #cfe2f2;background:#f3f8fd;color:#225b82;border-radius:9px;font-size:12px;font-weight:800;padding:8px 11px;min-height:39px;cursor:pointer;white-space:nowrap;}
.hk42-chat .hk47-logout:hover,.hk42-chat .hk47-logout-inline:hover{background:#e1f1fd}
.hk42-chat .hk47-logout:disabled{opacity:.6;cursor:wait}
.hk42-chat .hk47-session-line{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 10px;color:#1d679c;font-size:13px;flex-wrap:wrap}
.hk42-chat .hk47-logout-inline{border:1px solid #cfe2f2;background:#f3f8fd;border-radius:10px;padding:9px 12px;color:#205f88;font-weight:750;cursor:pointer}
.hk42-chat .hk47-session-line [hidden]{display:none!important}
.hk42-chat .hk47-auto-message{padding:18px;border-radius:12px;color:#176395;font-weight:750;background:#edf6ff;text-align:center}
.hk42-chat .hk42-identity.hk47-auto-start .hk42-contact{display:none!important}
.hk42-chat .hk42-identity.hk47-auto-start .hk42-back{display:none!important}
.hk42-chat .hk42-conversation-heading .hk44-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:690px){
 .hk42-chat .hk47-logout{min-height:33px;font-size:10px;padding:5px 7px}
 .hk42-chat .hk44-actions button{min-height:33px}
 .hk42-chat .hk42-conversation-heading{align-items:flex-start}
}
@media(max-width:450px){
 .hk42-chat .hk47-logout{font-size:10px!important;padding:7px 6px!important}
 .hk42-chat .hk44-actions{gap:3px!important;max-width:64%}
 .hk42-chat .hk44-actions button{font-size:10px!important;min-width:0}
}
