/* /aichat/bybot.css */
:root{
  --bybot-bg:#0b0f17;
  --bybot-card:#111827;
  --bybot-line:rgba(255,255,255,.10);
  --bybot-text:rgba(255,255,255,.92);
  --bybot-sub:rgba(255,255,255,.65);
  --bybot-ac:#2dd4bf;
  --bybot-ac2:#60a5fa;
  --bybot-shadow:0 18px 45px rgba(0,0,0,.35);
  --bybot-radius:16px;
}

.bybot-launcher{
  position:fixed;
  right:20px;
  bottom: 50px;   /* 너 플로팅 버튼(↑/⚙) 있는 곳과 겹치면 여기만 조절 */
  z-index:100000;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.62);
  color:#fff;
 box-shadow: none !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor:pointer;
  user-select:none;
  transition:transform .15s ease, background .15s ease;
}


.bybot-launcher:hover{ transform: translateY(-1px); background:rgba(0,0,0,.78); }
.bybot-launcher:active{ transform: translateY(1px); }

.bybot-launcher-badge{
  width:34px;height:34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background: linear-gradient(135deg, var(--bybot-ac), var(--bybot-ac2));
  font-weight:900;
}
.bybot-launcher-text .t1{ font-size:13px; font-weight:800; line-height:1; }
.bybot-launcher-text .t2{ font-size:11px; opacity:.85; margin-top:2px; }

.bybot-panel{
  position:fixed;
  top:0;
  left:0;
  width:min(420px, 140vw);
  height:60vh;
  background: linear-gradient(180deg, rgba(10,15,23,.7), rgba(9,13,20,.7));
  border-right:1px solid var(--bybot-line);
  border-radius: 0 0 25px 0; /* ← 오른쪽 아래만 둥글게 */
  box-shadow: var(--bybot-shadow);
  z-index:99999;
  transform: translateX(-105%);
  transition: transform .5s cubic-bezier(.2,.9,.2,1);
  display:flex;
  flex-direction:column;
  overflow: hidden;
    backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  }
  .bybot-panel > *{
  pointer-events: auto;
}
.bybot-panel.open{ transform: translateX(0); 
pointer-events: auto;
}

.bybot-header{
  padding:14px 14px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--bybot-line);
}
.bybot-header .left{ display:flex; gap:10px; align-items:center; }
.bybot-header .logo{
  width:36px;height:36px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:#fff; font-weight:900;
}
.bybot-header .name{ color:var(--bybot-text); font-weight:900; font-size:14px; }
.bybot-header .sub{ color:var(--bybot-sub); font-size:11px; margin-top:2px; }

.bybot-btn{
  border:none; outline:none;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  cursor:pointer;
}
.bybot-btn.ghost{ background:transparent; }
.bybot-btn:hover{ background:rgba(255,255,255,.12); }
.bybot-btn:active{ transform:translateY(1px); }

.bybot-body{
  flex:1;
  padding:14px;
  overflow:auto;
}
.bybot-msg{ display:flex; margin:10px 0; }
.bybot-msg.user{ justify-content:flex-end; }
.bybot-msg.bot{ justify-content:flex-start; }

.bybot-msg .bubble{
  max-width: 86%;
  padding:10px 12px;
  border-radius: 14px;
  line-height:1.45;
  font-size:13px;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
}
.bybot-msg.user .bubble{
  background: linear-gradient(135deg, rgba(96,165,250,.95), rgba(45,212,191,.95));
  color:#06101a;
  font-weight:700;
  border-bottom-right-radius: 6px;
}
.bybot-msg.bot .bubble{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color: var(--bybot-text);
  border-bottom-left-radius: 6px;
}

.bybot-msg .bubble a.bybot-link{
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(45,212,191,.15);
  border: 1px solid rgba(45,212,191,.35);
  color: #2dd4bf;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.bybot-msg .bubble a.bybot-link:hover{
  background: rgba(45,212,191,.25);
}

.bybot-meta{
  margin-top:6px;
  font-size:11px;
  opacity:.75;
}

.bybot-footer{
  border-top:1px solid var(--bybot-line);
  padding:12px;
  background: rgba(0,0,0,.15);
}
.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.chip{
  border:none;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  font-size:12px;
  cursor:pointer;
}
.chip:hover{ background:rgba(255,255,255,.12); }

.bybot-form{
  display:flex;
  gap:8px;
}
#bybotInput{
  flex:1;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:13px;
  outline:none;
}
#bybotInput::placeholder{ color:rgba(255,255,255,.45); }
#bybotSend{
  width:74px;
  border:none;
  border-radius:12px;
  background: linear-gradient(135deg, var(--bybot-ac), var(--bybot-ac2));
  font-weight:900;
  cursor:pointer;
}
#bybotSend:active{ transform: translateY(1px); }

.bybot-hint{
  margin-top:8px;
  color:rgba(255,255,255,.55);
  font-size:11px;
  line-height:1.4;
}

/* 모바일에서 패널 폭 */
@media(max-width: 550px){
  .bybot-panel{ width: 90vw; }
  .bybot-launcher{ bottom: 55px; right: 14px; }
}





.bybot-launcher:hover{
  background: rgba(0,0,0,.78);
  transform: translateY(-1px);
}

.bybot-launcher.collapsed{
  max-width: 44px;
}

.bybot-launcher.expanded{
  max-width: 260px;
  padding: 10px 14px;
}

/* =========================
   BY 공
========================= */
.bybot-launcher-badge{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;

  background: linear-gradient(135deg,#2dd4bf,#60a5fa);
  color:#000;
  font-weight:900;
  flex-shrink:0;
}

/* =========================
   텍스트 애니
========================= */
.bybot-launcher-text{
  opacity: 0;
  transform: translateX(-6px);
  white-space: nowrap;
  transition: opacity .25s ease, transform .25s ease;
}

.bybot-launcher.expanded .bybot-launcher-text{
  opacity: 1;
  transform: translateX(0);
}

/* 🔥 iOS에서 보이는 동그란 그림자 제거 */
/* BY봇 아이콘 뒤 동그란 그림자 완전 제거 */
.bybot-launcher,
.bybot-launcher *,
.bybot-launcher-badge,
.floating-wrap {
  filter: none !important;
  box-shadow: none !important;
}

/* 접힌 상태에서는 캡슐 배경 제거 (BY 공만 보이게) */
.bybot-launcher.collapsed{
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}


/* BY 공 자체 (무조건 보이게) */
.bybot-launcher-badge{
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #60a5fa);
  color: #000;
  font-weight: 900;
  font-size: 14px;
}
.bybot-panel {
  pointer-events: auto;
}

/* ===== 빠른 닫기 버튼 ===== */




#bybotQuickClose{
  position: fixed !important;
  right: 20px !important;
  bottom: 55px !important;

  width: 164px;
  height: 64px;
  border-radius: 50%;
  border: none;

  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 18px;
  font-weight: 700;

  cursor: pointer;
  z-index: 2147483647; /* 🔥 무조건 최상위 */
  
  display: none;
}

/* 패널 열렸을 때만 */
#bybotQuickClose.show{
  display: flex;
  align-items: center;
  justify-content: center;
}

#bybotQuickClose{
  position: relative;
  display: none;
  background: transparent;
}

/* ===============================
   iOS 입력창 자동 확대 완전 차단 (정답)
=============================== */

/* 🔑 실제 입력창 ID 기준 */
#bybotInput {
    font-size: 16px !important;
    line-height: 1.4;
    transform: translateZ(0);
}

/* placeholder */
#bybotInput::placeholder {
    font-size: 16px;
}

/* 전송 버튼도 같이 */
#bybotSend {
    font-size: 16px;
}

/* iOS 텍스트 자동 리사이즈 방지 */
body {
    -webkit-text-size-adjust: 100%;
}

/* iOS Safari 전용 */
@supports (-webkit-touch-callout: none) {
    #bybotInput {
        font-size: 16px !important;
    }
}

/* 🔥 BY봇 채팅 안 모든 링크 강제 스타일 */
#bybot-chat a,
.bybot a,
.bot-message a,
.chat-bubble a,
.bubble a {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px 0;
    background: #0ea5e9;
    color: #ffffff !important;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

#bybot-chat a:hover,
.bybot a:hover,
.bot-message a:hover,
.chat-bubble a:hover,
.bubble a:hover {
    background: #0284c7;
}