
/* ===========================================================
   Gloriva AI Chatbot - Premium Glass UI
   File : assets/chatbot/chatbot.css
   Version : Final UI v1
   =========================================================== */

:root{
  --gc-primary:#f7f7f8;
  --gc-secondary:#d9d9de;
  --gc-border:rgba(255,255,255,.55);
  --gc-shadow:0 20px 50px rgba(0,0,0,.25);
  --gc-text:#232323;
  --gc-muted:#707070;
  --gc-accent:#c8ced8;
  --gc-user:#eef4ff;
  --gc-bot:#ffffff;
  --gc-radius:22px;
  --gc-font:"Poppins","Segoe UI",sans-serif;
}

#gloriva-chat-launcher{
  position:fixed;
  right:28px;
  bottom:28px;
  width:74px;
  height:74px;
  border-radius:50%;
  z-index:999999;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(145deg,#ffffff,#dfe4ea);
  border:2px solid rgba(255,255,255,.65);
  box-shadow:0 10px 35px rgba(0,0,0,.22);
  backdrop-filter:blur(18px);
  transition:.35s;
}

#gloriva-chat-launcher:hover{
  transform:translateY(-5px) scale(1.05);
  box-shadow:0 18px 45px rgba(0,0,0,.3);
}

#gloriva-chat-launcher img{
  width:38px;
  height:38px;
}

#gloriva-chatbox{
  position:fixed;
  right:30px;
  bottom:120px;
  width:390px;
  max-width:calc(100vw - 30px);
  height:650px;

  background:rgba(255,255,255,.60);
  backdrop-filter:blur(30px);
  border:1px solid var(--gc-border);
  border-radius:30px;
  overflow:hidden;

  display:flex;
  flex-direction:column;

  z-index:999998;
  box-shadow:var(--gc-shadow);

  opacity:0;
  visibility:hidden;
  pointer-events:none;

  transform:translateY(40px) scale(.97);

  transition:
      opacity .35s ease,
      transform .35s ease,
      visibility .35s ease;
}

#gloriva-chatbox.open{

  opacity:1;

  visibility:visible;

  pointer-events:auto;

  transform:none;

}

@keyframes gcFade{
 from{opacity:0;transform:translateY(20px) scale(.95);}
 to{opacity:1;transform:none;}
}

.gc-header{
  position:relative;
  padding:18px 22px;
  color:#222;
  font-family:var(--gc-font);
  background:linear-gradient(135deg,#fff,#eceff3);
  border-bottom:1px solid rgba(255,255,255,.55);
}

.gc-header:before,
.gc-header:after{
  content:"";
  position:absolute;
  width:48px;
  height:48px;
  border:2px solid rgba(180,180,180,.35);
}

.gc-header:before{
  left:10px;top:10px;
  border-right:none;border-bottom:none;
  border-radius:16px 0 0 0;
}

.gc-header:after{
  right:10px;bottom:10px;
  border-left:none;border-top:none;
  border-radius:0 0 16px 0;
}

.gc-title{
  font-size:20px;
  font-weight:700;
  letter-spacing:.4px;
}

.gc-status{
  font-size:12px;
  color:#2d9b55;
  margin-top:3px;
}

.gc-close{
  position:absolute;
  right:18px;
  top:16px;
  border:none;
  background:none;
  font-size:26px;
  cursor:pointer;
  color:#444;
}

.gc-messages{
  flex:1;
  overflow-y:auto;
  padding:18px;
  background:
  radial-gradient(circle at top,#ffffff,transparent 65%),
  linear-gradient(#f9f9fa,#eef2f6);
}

.gc-message{
  display:flex;
  margin-bottom:14px;
}

.gc-message.bot{
  justify-content:flex-start;
}

.gc-message.user{
  justify-content:flex-end;
}

.gc-bubble{
  max-width:78%;
  padding:13px 16px;
  border-radius:20px;
  font-family:var(--gc-font);
  font-size:14px;
  line-height:1.6;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.gc-message.bot .gc-bubble{
  background:var(--gc-bot);
  color:#333;
  border:1px solid rgba(230,230,230,.8);
}

.gc-message.user .gc-bubble{
  background:var(--gc-user);
  color:#222;
}

.gc-time{
  margin-top:5px;
  font-size:10px;
  color:#888;
}

.gc-input-area{
  display:flex;
  gap:10px;
  padding:14px;
  background:#fff;
  border-top:1px solid rgba(220,220,220,.6);
}

.gc-input{
  flex:1;
  border:none;
  border-radius:50px;
  padding:13px 18px;
  background:#f3f5f7;
  font-family:var(--gc-font);
  outline:none;
}

.gc-send{
  width:52px;
  border:none;
  border-radius:50%;
  background:linear-gradient(145deg,#ffffff,#dfe5ec);
  cursor:pointer;
  font-size:18px;
  transition:.3s;
}

.gc-send:hover{
  transform:scale(1.06);
}

.gc-typing{
  display:inline-flex;
  gap:4px;
}

.gc-typing span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#999;
  animation:typing 1.2s infinite;
}

.gc-typing span:nth-child(2){animation-delay:.2s;}
.gc-typing span:nth-child(3){animation-delay:.4s;}

@keyframes typing{
  0%,80%,100%{transform:scale(.6);opacity:.4;}
  40%{transform:scale(1);opacity:1;}
}

@media (max-width:768px){

    /* Floating desktop disembunyikan */
    #gloriva-chat-launcher{
        display:none;
    }

    /* Chat fullscreen mobile */
    #gloriva-chatbox{

        position:fixed;

        inset:0;

        width:100%;

        height:100dvh;

        max-width:none;

        border-radius:0;

        right:auto;
        bottom:auto;

        display:flex;

        flex-direction:column;

        /* Posisi awal: di luar layar sebelah kanan */
        transform:translateX(100%);

        opacity:1;

        visibility:visible;

        pointer-events:none;

        transition:
            transform .42s cubic-bezier(.22,.61,.36,1);

        z-index:999999;

    }

    /* Saat dibuka */
    #gloriva-chatbox.open{

        transform:translateX(0);

        pointer-events:auto;

    }

    .gc-header{

        padding:22px 20px;

    }

    .gc-title{

        font-size:21px;

    }

    .gc-messages{

        flex:1;

    }

    .gc-input-area{

        padding:16px;

        padding-bottom:calc(16px + env(safe-area-inset-bottom));

    }

}

::-webkit-scrollbar{
 width:6px;
}

::-webkit-scrollbar-thumb{
 background:#cfd4db;
 border-radius:20px;
}
