/* CZS Chatbot Widget Styles
   All selectors are namespaced with .czs-widget__ to avoid conflicts with the host page.
    */

/* Banner  */

.czs-widget__banner {
  display: block;
  background: #0000dc;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  text-decoration: none;
  padding: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 2px 10px rgba(0, 0, 220, 0.25);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.czs-widget__banner:hover {
  background: #0000b3;
  box-shadow: 0 4px 16px rgba(0, 0, 220, 0.35);
}

.czs-widget__banner:focus-visible {
  outline: 3px solid #0000dc;
  outline-offset: 3px;
}

.czs-widget__banner strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  margin-bottom: 4px;
}

.czs-widget__banner span {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

/* Modal Overlay  */

.czs-widget__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.czs-widget__overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/*  Modal Panel  */

.czs-widget__modal {
  width: 440px;
  height: 640px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.czs-widget__overlay--visible .czs-widget__modal {
  transform: translateY(0);
}

/*  Modal Header  */

.czs-widget__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0000dc;
  color: white;
  padding: 14px 18px;
  flex-shrink: 0;
}

.czs-widget__modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.czs-widget__modal-header-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.czs-widget__modal-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.2px;
}

.czs-widget__close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  opacity: 0.75;
  transition: opacity 0.15s, background-color 0.15s;
}

.czs-widget__close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}

/*  Iframe  */

.czs-widget__iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #f4f7f6;
}

/*  Persistent Label (bottom-right corner)  */

.czs-widget__label {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  background: #0000dc;
  color: white;
  border: none;
  border-radius: 28px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 220, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.15s, box-shadow 0.2s;
}

.czs-widget__label--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.czs-widget__label:hover {
  background: #0000b3;
  box-shadow: 0 6px 20px rgba(0, 0, 220, 0.45);
  transform: translateY(-2px);
}

.czs-widget__label span {
  color: white;
}

/*  Mobile  */

@media (max-width: 600px) {
  .czs-widget__overlay {
    align-items: flex-end;
  }

  .czs-widget__modal {
    width: 100vw;
    height: 92dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .czs-widget__overlay--visible .czs-widget__modal {
    transform: translateY(0);
  }

  .czs-widget__label {
    bottom: 16px;
    right: 16px;
  }
}
