/* authcore/public/css/autoAnswers.css */
.autoanswers-view{
  display:flex;
  flex-direction:column;
  gap:16px;
  font-size:14px;
  color:#E5E5EA;
  line-height:1.45;
}

.autoanswers-modal-titlebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
}

.autoanswers-modal-titlegroup{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
}

.autoanswers-modal-titleicon{
  flex:0 0 auto;
  font-size:18px;
  line-height:1;
  color:#F5F5F7;
}

.autoanswers-modal-titletext{
  display:block;
  font-size:17px;
  line-height:1.2;
  font-weight:700;
  color:#FFFFFF;
}

.autoanswers-modal-refresh{
  flex:0 0 auto;
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:0;
  border:0;
  border-radius:50%;
  background:#2C2C2E;
  color:#F5F5F7;
  cursor:pointer;
  transition:background-color .15s ease, transform .15s ease, opacity .15s ease;
  -webkit-appearance:none;
  appearance:none;
}

.autoanswers-modal-refresh:hover{
  background:#3A3A3C;
}

.autoanswers-modal-refresh:active{
  background:#48484A;
  transform:scale(.98);
}

.autoanswers-modal-refresh:disabled{
  opacity:.5;
  cursor:default;
}

.autoanswers-modal-refresh i{
  font-size:14px;
  line-height:1;
}

.autoanswers-panel{
  padding:16px;
  border:1px solid #1C1C1E;
  border-radius:16px;
  background:#1C1C1E;
}

.autoanswers-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.autoanswers-panel-head--top{
  align-items:center;
}

.autoanswers-panel-label{
  margin:0;
  font-size:13px;
  color:#98989F;
  line-height:1.35;
}

.autoanswers-panel-label--with-gap{
  margin-bottom:4px;
}

.autoanswers-divider{
  width:98%;
  height:1px;
  margin:12px auto 0;
  background:#3A3A3C;
}

.autoanswers-note{
  margin:0;
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:12px;
  color:#98989F;
  line-height:1.5;
}

.autoanswers-note__icon{
  margin-top:1px;
  font-size:13px;
  color:#9CA3AF;
  flex:0 0 auto;
}

.autoanswers-note__strong{
  margin-left:4px;
  font-size:13px;
  font-weight:600;
  color:#E5E5EA;
}

.autoanswers-prompt-preview{
  max-height:144px;
  margin:12px 0 0;
  padding-right:4px;
  overflow-y:auto;
  font-size:12px;
  color:#E5E5EA;
  line-height:1.6;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.autoanswers-prompt-preview::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.autoanswers-switcher{
  width:100%;
}

.autoanswers-switcher__inner{
  display:flex;
  width:100%;
  gap:0;
}

.autoanswers-switcher .pill{
  flex:1 1 0;
  text-align:center;
}

.autoanswers-usage-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.autoanswers-usage-label{
  font-size:11px;
  color:#98989F;
}

.autoanswers-usage-track{
  width:100%;
  height:8px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:#2C2C2E;
}

.autoanswers-usage-bar{
  height:100%;
  width:0;
  border-radius:999px;
  transition:width .3s ease, background-color .3s ease;
}

.autoanswers-usage-bar--normal{
  background:#0A84FF;
}

.autoanswers-usage-bar--warn{
  background:#FF9F0A;
}

.autoanswers-usage-bar--danger{
  background:#FF453A;
}

.autoanswers-usage-bar--success{
  background:#22c55e;
}

.autoanswers-usage-actions{
  display:flex;
  justify-content:flex-end;
  padding-top:10px;
}

.autoanswers-small-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:32px;
  padding:6px 10px;
  border:0;
  border-radius:10px;
  background:#2C2C2E;
  color:#FFFFFF;
  font-size:11px;
  font-weight:500;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .15s ease, opacity .15s ease;
}

.autoanswers-small-btn:hover{
  background:#3A3A3C;
}

.autoanswers-small-btn:active{
  background:#48484A;
}

.autoanswers-small-btn--muted{
  background:#3A3A3C;
  color:#98989F;
}

.autoanswers-small-btn--muted:hover{
  background:#48484A;
}

.autoanswers-small-btn__plus{
  font-size:16px;
  line-height:1;
  font-weight:800;
}

.autoanswers-head-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.autoanswers-api-status{
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  background:#2C2C2E;
  font-size:10px;
  color:#98989F;
}

.autoanswers-api-status__dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#FF453A;
  flex:0 0 auto;
}

.autoanswers-api-status__dot--ok{
  background:#22c55e;
}

.autoanswers-api-status__dot--warn{
  background:#FF9F0A;
}

.autoanswers-api-block{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}

.autoanswers-stack-8{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.autoanswers-field-caption{
  margin:0;
  font-size:11px;
  line-height:1.45;
  color:#98989F;
}

.autoanswers-field-caption__strong{
  color:#FFFFFF;
}

.autoanswers-field-label{
  font-size:11px;
  color:#98989F;
}

.autoanswers-input-dark{
  width:100%;
  background:#3A3A3C;
}

.autoanswers-toggle-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.autoanswers-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  color:#E5E5EA;
}

.autoanswers-products{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.autoanswers-products__title{
  margin:0;
  font-size:15px;
  font-weight:600;
  color:#E5E5EA;
}

.autoanswers-products__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.autoanswers-products__count{
  margin:4px 0 0;
  font-size:15px;
  font-weight:600;
  color:#F2F2F7;
}

.autoanswers-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.autoanswers-card{
  padding:12px;
  border:1px solid #1C1C1E;
  border-radius:16px;
  background:#1C1C1E;
  cursor:pointer;
  transition:background-color .15s ease;
}

.autoanswers-card:hover{
  background:#2C2C2E;
}

.autoanswers-card__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.autoanswers-card__main{
  min-width:0;
  flex:1 1 auto;
}

.autoanswers-card__article{
  margin:0;
  font-size:11px;
  color:#98989F;
}

.autoanswers-card__article b{
  color:#E5E5EA;
}

.autoanswers-card__title{
  margin:6px 0 0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:600;
  color:#FFFFFF;
}

.autoanswers-card__meta-row{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size:12px;
}

.autoanswers-card__meta-label{
  color:#98989F;
}

.autoanswers-card__meta-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
}

.autoanswers-card__meta-pill--ok{
  color:#6EE7B7;
}

.autoanswers-card__meta-pill--danger{
  color:#FF453A;
}

.autoanswers-card__meta-pill i{
  font-size:14px;
  color:#FFFFFF;
}

.autoanswers-card__side{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  flex:0 0 auto;
}

.autoanswers-card__actions{
  display:flex;
  gap:4px;
  margin-top:2px;
}

.autoanswers-card__icon-btn{
  font-size:11px;
}

.autoanswers-card__icon-btn--pause{
  background:#3A3A3C;
  color:#FFFFFF;
}

.autoanswers-state-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
}

.autoanswers-state-badge--enabled{
  background:rgba(16,185,129,.15);
}

.autoanswers-state-badge--disabled{
  background:#2C2C2E;
}

.autoanswers-state-badge__dot{
  font-size:7px;
}

.autoanswers-state-badge__dot--enabled{
  font-size:7px;
  color:#86efac;
}

.autoanswers-state-badge__dot--disabled{
  font-size:7px;
  color:#FF453A;
}

.autoanswers-empty-text{
  margin:0;
  font-size:12px;
  color:#98989F;
  line-height:1.5;
}

.autoanswers-empty-card{
  padding:12px;
  border:1px solid #1C1C1E;
  border-radius:16px;
  background:#1C1C1E;
  font-size:12px;
  color:#98989F;
  line-height:1.5;
}

.autoanswers-pay-plan-features{
  margin-top:-10px;
}

.autoanswers-item-tabs-wrap{
  display:flex;
  justify-content:center;
  margin-bottom:12px;
}

.autoanswers-item-tabs{
  display:inline-flex;
  padding:4px;
  border:1px solid #2C2C2E;
  border-radius:999px;
  background:#1C1C1E;
}

.autoanswers-item-tabs__btn{
  min-height:20px;
  padding:5px 26px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:#98989F;
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  transition:background-color .15s ease, color .15s ease;
}

.autoanswers-item-tabs__btn.is-active{
  background:#FFFFFF;
  color:#111827;
}

.autoanswers-item-summary-card{
  padding:12px;
  border-radius:16px;
  background:#1C1C1E;
}

.autoanswers-item-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}

.autoanswers-item-stat{
  display:block;
  width:100%;
  padding:8px;
  border:1px solid transparent;
  border-radius:12px;
  background:#2C2C2E;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease, transform .15s ease;
  appearance:none;
  -webkit-appearance:none;
}

.autoanswers-item-stat:hover{
  background:#343437;
}

.autoanswers-item-stat:active{
  transform:scale(.98);
}

.autoanswers-item-stat.is-active{
  border-color:#0A84FF;
  background:#30394A;
}

.autoanswers-item-stat__label{
  margin:0;
  font-size:11px;
  color:#98989F;
}

.autoanswers-item-stat__value{
  margin:4px 0 0;
  font-size:14px;
  font-weight:600;
  color:#E5E5EA;
}

.autoanswers-chat-item{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.autoanswers-chat-item__meta{
  display:flex;
  padding:0 4px;
  font-size:10px;
  color:#636366;
}

.autoanswers-chat-item__meta--left{
  justify-content:flex-start;
}

.autoanswers-chat-item__meta--right{
  justify-content:flex-end;
  padding-top:2px;
}

.autoanswers-chat-item__meta--between{
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.autoanswers-chat-item__bubbles{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:2px;
}

.autoanswers-chat-item__bubble-row{
  display:flex;
}

.autoanswers-chat-item__bubble-row--left{
  justify-content:flex-start;
}

.autoanswers-chat-item__bubble-row--right{
  justify-content:flex-end;
}

.autoanswers-chat-item__bubble-row--with-action{
  align-items:center;
  gap:12px;
}

.autoanswers-chat-item__bubble{
  display:inline-block;
  max-width:80%;
  padding:8px 12px;
  border-radius:16px;
}

.autoanswers-chat-item__bubble-row--with-action .autoanswers-chat-item__bubble{
  max-width:calc(100% - 48px);
}

.autoanswers-chat-item__bubble p{
  margin:0;
  font-size:11px;
  line-height:1.45;
  white-space:pre-wrap;
}

.autoanswers-chat-item__bubble--in{
  background:#2C2C2E;
}

.autoanswers-chat-item__bubble--in p{
  color:#E5E5EA;
}

.autoanswers-chat-item__bubble--out{
  background:#0A84FF;
}

.autoanswers-chat-item__bubble--out p{
  color:#FFFFFF;
}

.autoanswers-chat-item__dash{
  color:#636366;
}

.autoanswers-chat-item__dash--light{
  color:rgba(255,255,255,.8);
}

.autoanswers-chat-item__context{
  padding:0 4px;
  font-size:10px;
  line-height:1.4;
  color:#8E8E93;
}

.autoanswers-chat-item__action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  padding:0;
  border:0;
  border-radius:999px;
  background:#3A3A3C;
  color:#E5E5EA;
  cursor:pointer;
  transition:background-color .15s ease, transform .15s ease, color .15s ease;
  appearance:none;
  -webkit-appearance:none;
}

.autoanswers-chat-item__action:hover{
  background:#4A4A4E;
}

.autoanswers-chat-item__action:active{
  transform:scale(.97);
}

.autoanswers-chat-item__action i{
  font-size:15px;
  line-height:1;
}

@media (max-width: 640px){
  .autoanswers-chat-item__bubble-row--with-action{
    gap:10px;
  }

  .autoanswers-chat-item__action{
    width:38px;
    height:38px;
  }
}

.autoanswers-article-copy{
  display:inline-flex;
  align-items:center;
  gap:1px;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
  vertical-align:middle;
  transition:opacity .15s ease;
}

.autoanswers-article-copy:hover{
  opacity:.8;
}

.autoanswers-article-copy.is-copied{
  opacity:.8;
}

.autoanswers-article-copy__icon-wrap{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  width:16px;
  height:16px;
  border-radius:4px;
}

.autoanswers-article-copy__tooltip{
  position:absolute;
  left:8px;
  top:100%;
  z-index:20;
  margin-top:4px;
  padding:4px 8px;
  border-radius:10px;
  background:rgba(58,58,60,1);
  color:#F5F5F7;
  font-size:10px;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  transition:opacity .15s ease;
}

.autoanswers-article-copy__tooltip.is-visible{
  opacity:1;
}

.ai-modal-body{
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.ai-modal-body::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.info-scroll{
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.info-scroll::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.info-body{
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.info-body::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

/* AI quota modal */
.ai-quota-sheet{
  max-height:80dvh;
}

.ai-quota-header{
  padding:12px 0 0 0;
}

.ai-quota-titlebar{
  padding:0 16px;
  margin-top:2px;
}

.ai-quota-divider{
  width:100%;
  height:1px;
  margin:12px 0 0 0;
  background:#2C2C2E;
}

.ai-quota-body{
  max-height:calc(80dvh - 78px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:14px 16px 16px 16px;
  scrollbar-width:none;
  -ms-overflow-style:none;
}

.ai-quota-body::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.ai-quota-stack{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.ai-quota-summary-card{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:#1C1C1E;
  cursor:default;
  pointer-events:none;
}

.ai-quota-summary-label{
  font-size:13px;
  line-height:1.0;
  color:#8E8E93;
}

.ai-quota-summary-value{
  margin-top:8px;
  font-size:14px;
  line-height:1.0;
  font-weight:600;
  color:#FFFFFF;
}

.ai-quota-summary-sep{
  margin:0 4px;
  color:#8E8E93;
  font-weight:500;
}

.ai-quota-section{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.ai-quota-section-title{
  margin:0;
  font-size:15px;
  line-height:1.2;
  font-weight:500;
  color:#FFFFFF;
}

.ai-quota-options{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ai-quota-actions{
  padding-top:2px;
}

.ai-quota-actions-row{
  display:flex;
  gap:8px;
}

@media (max-width: 560px){
  .autoanswers-item-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .ai-quota-body{
    max-height:calc(80dvh - 78px);
    padding:14px 16px 16px 16px;
  }

  .ai-quota-promo-row{
    align-items:stretch;
  }

  .ai-quota-promo-row .btn--promo{
    flex:0 0 auto;
  }
}

/* item modal header */
.ai-item-header{
  padding:12px 0 0 0;
}

.ai-item-titlebar{
  padding:0 16px;
  margin-top:2px;
}

#ai-item-modal .ai-item-titlebar .ai-modal-title{
  margin:0;
}

#ai-item-modal .ai-item-subtitle{
  margin:8px 0 0;
  padding:0 16px;
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.4;
}

.ai-item-header-divider{
  width:100%;
  height:1px;
  margin:12px 0 0 0;
  background:#2C2C2E;
}

/* body padding как в основной модалке */
#ai-item-modal .ai-modal-body{
  padding:16px;
}

#ai-item-modal .ai-modal-body--spaced{
  padding:16px;
}

/* footer как в остальных sheet */
#ai-item-modal .ai-actions{
  padding:0 16px 16px;
}

/* item modal header spacing */
#ai-item-modal .ai-modal-header {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 12px;
}

#ai-item-modal .ai-divider {
  height: 1px;
  background: #2C2C2E;
  border: none;
  margin: 0 0 10px 0;
}

#ai-item-modal .ai-sheet {
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
}

#ai-item-modal .ai-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#ai-item-modal .ai-modal-body::-webkit-scrollbar {
  display: none;
}

#ai-item-modal .ai-actions {
  flex-shrink: 0;
}
