/* CZS Chatbot Widget Styles
   All selectors are namespaced with .czs-widget__ to avoid conflicts with the host page.
*/

/* ========== BANNER ========== */

.czs-widget__banner {
  position: relative;
  display: block;
  background: #0000dc;
  border-radius: 0;
  padding: 24px 20px 20px 20px;
  cursor: pointer;
  overflow: visible;
  min-height: 160px;
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 220, 0.3);
  transition: background 0.2s, box-shadow 0.2s;
}

.czs-widget__banner:hover {
  background: #0000b8;
  box-shadow: 0 6px 24px rgba(0, 0, 220, 0.4);
}

.czs-widget__banner:focus-visible {
  outline: 3px solid #0000dc;
  outline-offset: 3px;
}

.czs-widget__banner-icon {
  position: absolute;
  top: -14px;
  right: 16px;
  width: 80px;
  height: 80px;
  isolation: isolate;
}

.czs-widget__banner-icon img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #DBDBFF;
  border: 1.5px solid #DBDBFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Speech bubble tail */
.czs-widget__banner-icon::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  background: #DBDBFF;
  bottom: 2px;
  left: -8px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  transform: rotate(-30deg);
  z-index: -1;
}

.czs-widget__banner-title {
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: white;
  margin-bottom: 10px;
  margin-top: 12px;
  line-height: 33px;
}

.czs-widget__banner-subtitle {
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.92);
  line-height: 22px;
  margin-bottom: 20px;
}

.czs-widget__banner-btn {
  display: inline-block;
  background: white;
  color: #0000dc;
  font-family: Arial, sans-serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.czs-widget__banner-btn:hover {
  background: #f0f0ff;
}

/* ========== MODAL (floating panel, no overlay) ========== */

.czs-widget__modal {
  position: fixed;
  bottom: 96px;
  right: 72px;
  width: 460px;
  max-width: calc(100vw - 40px);
  height: 580px;
  max-height: calc(100vh - 80px);
  background: white;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.czs-widget__modal--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}


/* ========== IFRAME ========== */

.czs-widget__iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
  background: #f4f7f6;
  min-height: 400px;
}

/* ========== FLOATING BUTTON ========== */

.czs-widget__label {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999998;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #DBDBFF;
  border: none;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 220, 0.25);
  transition: box-shadow 0.2s, transform 0.2s, opacity 0.25s;
  opacity: 0;
  pointer-events: none;
}

.czs-widget__label--visible {
  opacity: 1;
  pointer-events: auto;
}

.czs-widget__label:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 220, 0.35);
  transform: scale(1.05);
}

.czs-widget__label img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

/* ========== MOBILE ========== */

@media (max-width: 600px) {
  .czs-widget__modal {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transform-origin: bottom center;
  }

  .czs-widget__modal--visible {
    transform: translateY(0) scale(1);
  }

  .czs-widget__label {
    bottom: 16px;
    right: 16px;
  }
}
