/* =========================
   Floating Tools
   ========================= */
.st-floating {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 99999;
  pointer-events: none;
  font-family: inherit;
}

.st-floating * {
  box-sizing: border-box;
}

.st-floating__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  pointer-events: none;
}

.st-btn {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 8px;
  background: #2C61FE;
  box-shadow: 0 8px 24px rgba(44, 97, 254, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
  padding: 0;
}

.st-btn:hover {
  background: #2C61FE;
  transform: translateY(-2px);
}

.st-btn svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-btn--top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
}

.st-btn--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* =========================
   AI Button
   ========================= */
.st-btn--ai {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  position: relative;
  animation: stAiFloat 2.8s ease-in-out infinite;
  margin-top: 8px;
}

.st-btn--ai:hover {
  background: transparent;
  transform: translateY(-3px) scale(1.04);
}

.st-btn--ai::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(44, 97, 254, 0.22);
  filter: blur(10px);
  opacity: .9;
  z-index: -1;
  animation: stAiGlow 2s ease-in-out infinite;
}

.st-ai-btn-img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

@keyframes stAiFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes stAiGlow {
  0%, 100% {
    opacity: .65;
    transform: scale(.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

/* =========================
   AI Chat Panel
   ========================= */
.st-ai-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  pointer-events: none;
  z-index: 100000;
}

.st-ai-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.st-ai-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 430px;
  max-width: calc(100vw - 48px);
  height: 100vh;
  background: #fff;
  box-shadow: none;
  transform: translateX(100%);
  transition: transform .26s ease, box-shadow .26s ease;
  z-index: 100001;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.st-ai-panel.is-open {
  transform: translateX(0);
  box-shadow: -18px 0 46px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
}

.st-ai-header {
  height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  flex-shrink: 0;
}

.st-ai-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.st-ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2C61FE, #7a8cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.st-ai-avatar svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-ai-title {
  font-size: 16px;
  font-weight: 800;
  color: #03205A;
  line-height: 1.2;
}

.st-ai-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #667085;
  line-height: 1.2;
}

.st-ai-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #03205A;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.st-ai-close:hover {
  background: #F7F8FA;
}

.st-ai-body {
  flex: 1;
  overflow-y: auto;
  background: #F7F8FA;
  padding: 18px;
}

.st-ai-welcome {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(16, 35, 63, 0.06);
  margin-bottom: 14px;
}

.st-ai-welcome-title {
  color: #2C61FE;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.st-ai-welcome-main {
  margin-top: 4px;
  color: #03205A;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.st-ai-welcome p {
  margin: 12px 0 0;
  color: #1F2937;
  font-size: 13px;
  line-height: 1.7;
}

.st-ai-suggest {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.st-ai-suggest-item {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  color: #03205A;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.st-ai-suggest-item:hover {
  border-color: #2C61FE;
  color: #2C61FE;
  background: #EEF3FF;
}

.st-ai-msg {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 14px;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.st-ai-msg--user {
  margin-left: auto;
  background: #2C61FE;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.st-ai-msg--bot {
  margin-right: auto;
  background: #fff;
  color: #1F2937;
  border: 1px solid #E5E7EB;
  border-bottom-left-radius: 4px;
}

.st-ai-inputbar {
  min-height: 70px;
  padding: 12px;
  border-top: 1px solid #E5E7EB;
  background: #fff;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.st-ai-input {
  flex: 1;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  font-family: inherit;
}

.st-ai-input:focus {
  border-color: #2C61FE;
  box-shadow: 0 0 0 3px rgba(44, 97, 254, 0.12);
}

.st-ai-input:disabled {
  background: #F7F8FA;
  color: #667085;
}

.st-ai-send {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #2C61FE;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s ease, opacity .18s ease;
}

.st-ai-send:hover {
  background: #2C61FE;
}

.st-ai-send:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.st-ai-send svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-ai-send.is-loading svg {
  animation: stAiPulse 1s ease-in-out infinite;
}

@keyframes stAiPulse {
  0%, 100% {
    transform: scale(1);
    opacity: .65;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

html.st-ai-open {
  overflow: hidden;
}

/* =========================
   Share Panel
   ========================= */
.st-share-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  pointer-events: none;
}

.st-share-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.st-share-panel {
  position: absolute;
  right: 76px;
  bottom: 0;
  width: 410px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 26px 24px 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.98);
  transform-origin: right bottom;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  pointer-events: none;
}

.st-share-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.st-share-panel::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 40px;
  width: 18px;
  height: 18px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.04);
}

.st-share-header {
  position: relative;
  text-align: center;
  margin-bottom: 22px;
}

.st-share-title {
  font-size: 20px;
  font-weight: 700;
  color: #03205A;
  line-height: 1.2;
}

.st-share-close {
  position: absolute;
  top: -4px;
  right: -2px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #667085;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.st-share-close:hover {
  color: #03205A;
}

.st-share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 14px;
}

.st-share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  color: #667085;
  font: inherit;
}

.st-share-item:hover .st-share-icon {
  transform: translateY(-2px);
}

.st-share-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: transform .18s ease;
}

.st-share-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-share-item span {
  font-size: 12px;
  line-height: 1.3;
  color: #667085;
}

.st-share-line { background: #06c755; }
.st-share-whatsapp { background: #25d366; }
.st-share-facebook { background: #1877f2; }
.st-share-x { background: #1F2937; }
.st-share-linkedin { background: #0a66c2; }

.st-share-copy {
  background: #fff;
  color: #1F2937;
  border: 1px solid #E5E7EB;
}

.st-share-mail {
  background: #fff;
  color: #1F2937;
  border: 1px solid #E5E7EB;
}

/* =========================
   Toast
   ========================= */
.st-toast {
  position: fixed;
  right: 20px;
  bottom: 280px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 100000;
}

.st-toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================
   Mobile
   ========================= */
@media screen and (max-width: 767px) {
  #stShareBtn {
    display: none;
  }

  #stContactBtn {
    display: none;
  }

  .st-floating {
    right: 12px;
    bottom: 16px;
  }

  .st-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
  }

  .st-btn svg {
    width: 22px;
    height: 22px;
  }

  .st-btn--ai svg {
    width: 25px;
    height: 25px;
  }

  .st-ai-btn-badge {
    right: 4px;
    bottom: 4px;
    min-width: 20px;
    height: 15px;
    font-size: 9px;
    line-height: 15px;
  }

  .st-ai-backdrop {
    background: rgba(15, 23, 42, 0.42);
  }

  .st-ai-panel {
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    transform: translateX(100%);
    border-radius: 0;
  }

  .st-ai-header {
    height: 58px;
    padding: 0 14px;
  }

  .st-ai-avatar {
    width: 32px;
    height: 32px;
  }

  .st-ai-avatar svg {
    width: 20px;
    height: 20px;
  }

  .st-ai-title {
    font-size: 15px;
  }

  .st-ai-subtitle {
    font-size: 11px;
  }

  .st-ai-body {
    padding: 14px;
  }

  .st-ai-welcome-title {
    font-size: 20px;
  }

  .st-ai-welcome-main {
    font-size: 17px;
  }

  .st-ai-inputbar {
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .st-ai-msg {
    max-width: 90%;
    font-size: 14px;
  }

  .st-share-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 86px;
    padding: 22px 18px 18px;
  }

  .st-share-panel::after {
    display: none;
  }

  .st-share-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 10px;
  }

  .st-share-icon {
    width: 56px;
    height: 56px;
  }

  .st-toast {
    right: 12px;
    left: 12px;
    bottom: 180px;
    text-align: center;
  }
}

.st-ai-input {
  flex: 1;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  font-family: inherit;

  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.st-ai-input::-webkit-scrollbar {
  display: none;
}