/* OKA Messenger (iOS-style modal chat) */
.oka-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:flex-end; justify-content:center;
  z-index: 99999;
  padding: 20px 20px 26px;
}
.oka-overlay.is-open{ display:flex; }

.oka-modal{
  width:min(860px, 96vw);
  height:min(680px, 88vh);
  background:#fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.oka-close{
  position:absolute; top:14px; right:14px;
  width:36px; height:36px;
  border:0; background:#EFF1F3;
  border-radius:12px;
  font-size:24px; line-height:36px;
  cursor:pointer;
}

.oka-header{
  padding:18px 18px 14px 18px;
  background:#F8F9FB;
  border-bottom:1px solid #E7EAEE;
  display:flex; gap:12px; align-items:center;
}
.oka-avatar{
  width:44px; height:44px;
  border-radius:50%;
  background: var(--primary, #059669);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight:700;
}
.oka-title{ font-weight:700; color:#141619; }
.oka-subtitle{ color:#6B7280; font-size:14px; margin-top:2px; }
.oka-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#46C35B; margin:0 6px 0 10px;
  vertical-align:middle;
}

.oka-chat{
  flex:1;
  padding:16px 18px;
  background:#FBFCFD;
  overflow:auto;
}

.oka-bubble{
  max-width: 72%;
  padding:12px 14px;
  border-radius:16px;
  margin: 10px 0;
  font-size:16px;
  word-wrap:break-word;
}
.oka-bubble.left{ background:#F1F3F6; color:#141619; }
.oka-bubble.right{ background: var(--primary, #059669); color:#fff; margin-left:auto; }

.oka-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; margin: 10px 0 6px; }
.oka-chip{
  border:1.5px solid var(--primary, #059669);
  background:#fff;
  color: var(--primary, #059669);
  padding:8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:700;
  font-size:14px;
  line-height:1.1;
  flex:0 0 auto;
  max-width: 320px;
  white-space:normal;
  text-align:center;
}
.oka-chip:hover{ filter:brightness(.98); }

.oka-typing{
  max-width: 120px;
  padding:10px 14px;
  border-radius:16px;
  background:#F1F3F6;
  margin: 10px 0;
  display:flex; gap:6px; align-items:center;
}
.oka-typing span{
  width:8px;height:8px;border-radius:50%;
  background:#9AA1AA;
  display:inline-block;
  animation: okaDot 1.2s infinite ease-in-out;
}
.oka-typing span:nth-child(2){ animation-delay:.15s; }
.oka-typing span:nth-child(3){ animation-delay:.30s; }
@keyframes okaDot{
  0%, 80%, 100%{ opacity:.35; transform: translateY(0); }
  40%{ opacity:1; transform: translateY(-2px); }
}

.oka-card{
  background:#F1F3F6;
  border:1px solid #E7EAEE;
  border-radius:16px;
  padding:12px;
  margin: 10px 0;
}

.oka-field{ display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.oka-label{ font-size:13px; color:#6B7280; }
.oka-input{
  height:40px;
  border-radius:12px;
  border:1px solid #DCE1E7;
  padding: 0 12px;
  background:#fff;
  outline:none;
}
.oka-input:focus{ border-color: var(--primary, #059669); box-shadow: 0 0 0 3px rgba(5,150,105,.12); }

.oka-row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.oka-cta{
  width:100%;
  height:46px;
  border-radius:14px;
  border:0;
  background: var(--primary, #059669);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.oka-cta:hover{ filter:brightness(.98); }

.oka-consent{
  display:flex; gap:10px; align-items:flex-start;
  font-size:13px; color:#6B7280;
  margin-top:8px;
}
.oka-consent input{ margin-top:3px; }

.oka-footer{
  padding:14px 18px;
  border-top:1px solid #E7EAEE;
  background:#fff;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}
.oka-return{
  border:1px solid #E7EAEE;
  background:#fff;
  border-radius:14px;
  padding:10px 14px;
  cursor:pointer;
}
.oka-brand{
  font-size:12px;
  color:#9AA1AA; /* справа снизу внутри окна */
}

/* mini bubble */
.oka-mini-wrap{
  position:fixed;
  right:18px;
  bottom:18px;
  display:flex;
  align-items:center;
  gap:10px;
  z-index: 99998;
}
.oka-launcher{
  width:86px; height:44px;
  border-radius:14px;
  border:0;
  background: var(--primary, #059669);
  color:#fff;
  cursor:pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  font-weight:800;
}
.oka-mini-text{
  background: rgba(255,255,255,.92);
  border: 1px solid #E7EAEE;
  padding:10px 12px;
  border-radius:14px;
  color:#141619;
  font-size:14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  white-space:nowrap;
}

/* small screens */
@media (max-width: 520px){
  .oka-modal{ height:min(720px, 92vh); }
  .oka-row{ grid-template-columns:1fr; }
  .oka-mini-text{ display:none; }
}


/* typewriter caret */
.oka-caret{
  display:inline-block;
  width:8px;
  height:16px;
  margin-left:2px;
  border-radius:2px;
  background: rgba(20,22,25,.35);
  vertical-align:-2px;
  animation: okaBlink 1s steps(1) infinite;
}
.oka-bubble.right .oka-caret{ background: rgba(255,255,255,.65); }
@keyframes okaBlink{ 50%{ opacity:0; } }
