.ahoda-chat{
  max-width:760px;
  margin:24px auto;
  border:1px solid #dcdcde;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 8px 26px rgba(0,0,0,.06);
  font-family:inherit;
}
.ahoda-header{
  padding:16px 18px;
  border-bottom:1px solid #eee;
  background:#f8f9fa;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.ahoda-header strong{display:block;font-size:17px}
.ahoda-header span{display:block;font-size:13px;color:#646970;margin-top:3px}
.ahoda-messages{
  min-height:360px;
  max-height:520px;
  overflow-y:auto;
  padding:18px;
  background:#fff;
}
.ahoda-msg{
  max-width:82%;
  padding:11px 13px;
  margin:0 0 12px;
  border-radius:12px;
  white-space:pre-wrap;
  line-height:1.45;
  font-size:15px;
}
.ahoda-assistant{background:#f0f0f1;color:#1d2327}
.ahoda-user{background:#2271b1;color:#fff;margin-left:auto}
.ahoda-thinking{opacity:.68;font-style:italic}
.ahoda-form{
  display:flex;
  gap:10px;
  padding:14px;
  border-top:1px solid #eee;
  background:#fff;
}
.ahoda-form textarea{
  flex:1;
  resize:vertical;
  min-height:48px;
  max-height:140px;
  border:1px solid #8c8f94;
  border-radius:9px;
  padding:10px 12px;
  font:inherit;
}
.ahoda-form button{
  align-self:flex-end;
  border:0;
  border-radius:9px;
  padding:12px 18px;
  cursor:pointer;
  background:#2271b1;
  color:#fff;
  font-weight:600;
}
.ahoda-form button:disabled{opacity:.55;cursor:not-allowed}
.ahoda-note{
  padding:0 14px 14px;
  font-size:12px;
  color:#646970;
}
@media(max-width:600px){
  .ahoda-chat{margin:10px 0;border-radius:10px}
  .ahoda-messages{min-height:320px}
  .ahoda-msg{max-width:92%}
}
.ahoda-new-chat{
  border:1px solid #c3c4c7;
  background:#fff;
  color:#2271b1;
  border-radius:8px;
  padding:8px 11px;
  font:inherit;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
}
.ahoda-new-chat:hover{background:#f6f7f7}


/* Floating assistant - v0.3.0 */
.ahoda-float-wrap{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:999999;
  font-family:inherit;
}
.ahoda-float-button{
  display:flex;
  align-items:center;
  gap:9px;
  border:0;
  border-radius:999px;
  padding:13px 17px;
  background:#2271b1;
  color:#fff;
  box-shadow:0 10px 30px rgba(0,0,0,.20);
  cursor:pointer;
  font:inherit;
  font-weight:700;
}
.ahoda-float-button:hover{filter:brightness(.96)}
.ahoda-float-icon{font-size:20px;line-height:1}
.ahoda-float-panel{
  position:absolute;
  right:0;
  bottom:64px;
  width:min(390px, calc(100vw - 28px));
}
.ahoda-float-panel[hidden]{display:none!important}
.ahoda-chat-floating{
  width:100%;
  max-width:none;
  margin:0;
  border-radius:16px;
  box-shadow:0 18px 55px rgba(0,0,0,.22);
}
.ahoda-chat-floating .ahoda-messages{
  min-height:330px;
  max-height:430px;
}
.ahoda-header-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.ahoda-close{
  width:34px;
  height:34px;
  border:1px solid #c3c4c7;
  border-radius:8px;
  background:#fff;
  color:#50575e;
  cursor:pointer;
  font-size:22px;
  line-height:28px;
  padding:0;
}
.ahoda-close:hover{background:#f6f7f7}

@media(max-width:600px){
  .ahoda-float-wrap{right:12px;bottom:12px}
  .ahoda-float-label{display:none}
  .ahoda-float-button{
    width:54px;
    height:54px;
    padding:0;
    justify-content:center;
  }
  .ahoda-float-panel{
    position:fixed;
    left:10px;
    right:10px;
    bottom:76px;
    width:auto;
  }
  .ahoda-chat-floating{margin:0}
  .ahoda-chat-floating .ahoda-messages{
    min-height:300px;
    max-height:52vh;
  }
  .ahoda-header{align-items:flex-start}
  .ahoda-header-actions{
    flex-direction:column-reverse;
    align-items:flex-end;
  }
}


/* Mobile polish v0.3.1 */
@media(max-width:600px){
  .ahoda-float-panel{
    top:88px;
    bottom:18px;
  }
  .ahoda-chat-floating{
    height:calc(100vh - 106px);
    max-height:none;
    display:flex;
    flex-direction:column;
  }
  .ahoda-chat-floating .ahoda-header{
    padding:12px 14px;
    gap:8px;
  }
  .ahoda-chat-floating .ahoda-header strong{
    font-size:16px;
  }
  .ahoda-chat-floating .ahoda-header span{
    font-size:12px;
  }
  .ahoda-chat-floating .ahoda-header-actions{
    flex-direction:row;
    align-items:center;
  }
  .ahoda-chat-floating .ahoda-new-chat{
    padding:7px 9px;
    font-size:12px;
  }
  .ahoda-chat-floating .ahoda-close{
    width:32px;
    height:32px;
  }
  .ahoda-chat-floating .ahoda-messages{
    flex:1;
    min-height:0;
    max-height:none;
    padding:14px;
  }
  .ahoda-chat-floating .ahoda-form{
    padding:10px;
    gap:8px;
  }
  .ahoda-chat-floating .ahoda-form textarea{
    min-height:44px;
    max-height:88px;
    padding:9px 10px;
  }
  .ahoda-chat-floating .ahoda-form button{
    padding:10px 14px;
  }
  .ahoda-chat-floating .ahoda-note{
    padding:0 10px 10px;
    font-size:11px;
  }
}


/* Ali Hoca / Ah Şu Matematik branding v0.3.3 */
.ahoda-brand{
  font-weight:700;
  letter-spacing:.1px;
}
.ahoda-pi-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  font-family:Georgia, "Times New Roman", serif;
  font-size:19px;
  font-weight:700;
  line-height:1;
}
@media(max-width:600px){
  .ahoda-pi-icon{
    width:28px;
    height:28px;
    font-size:21px;
  }
}


/* Quick replies + conditional request flow v0.4.0 */
.ahoda-quick-replies{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:0 14px 12px;
  background:#fff;
}
.ahoda-quick-replies[hidden]{
  display:none!important;
}
.ahoda-quick-reply{
  border:1px solid #2271b1;
  background:#fff;
  color:#2271b1;
  border-radius:999px;
  padding:8px 12px;
  font:inherit;
  font-size:13px;
  font-weight:600;
  line-height:1.2;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, transform .15s ease;
}
.ahoda-quick-reply:hover,
.ahoda-quick-reply:focus{
  background:#2271b1;
  color:#fff;
  outline:none;
}
.ahoda-quick-reply:active{
  transform:scale(.98);
}
@media(max-width:600px){
  .ahoda-quick-replies{
    padding:0 10px 10px;
    gap:7px;
  }
  .ahoda-quick-reply{
    padding:8px 10px;
    font-size:12px;
  }
}
