/* Public ClosedCast AI sales/help widget. Scoped to #cc-ai-root only. */
#cc-ai-root, #cc-ai-root * { box-sizing: border-box; }
#cc-ai-root [hidden] { display: none !important; }
#cc-ai-root {
  position: fixed; bottom: 20px; right: 20px; z-index: 10010;
  font-family: "Segoe UI", Arial, sans-serif; color: #13213b; text-align: left;
  line-height: 1.4;
}
#cc-ai-root button, #cc-ai-root a, #cc-ai-root textarea { font: inherit; }
#cc-ai-root button { cursor: pointer; }
#cc-ai-root button:disabled { cursor: wait; opacity: .66; }
#cc-ai-root :is(button, a, textarea):focus-visible { outline: 3px solid #f2b531; outline-offset: 3px; }
#cc-ai-root .cc-ai-launcher {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-left: auto; background: #102858; color: #fff; border: 2px solid #f2b531;
  border-radius: 28px; padding: 12px 18px; min-height: 48px;
  box-shadow: 0 10px 28px rgba(4, 16, 38, .24); font-weight: 700;
}
#cc-ai-root .cc-ai-launcher:hover { background: #1a3c78; }
#cc-ai-root .cc-ai-launcher-icon { color: #f2b531; font-size: 22px; line-height: 1; }
#cc-ai-root .cc-ai-panel {
  display: flex; flex-direction: column; width: min(390px, calc(100vw - 32px));
  height: min(585px, calc(100dvh - 102px)); min-height: 340px;
  margin: 0 0 12px auto; overflow: hidden; border: 1px solid #cbd8ec;
  border-radius: 17px; background: #fff;
  box-shadow: 0 25px 62px rgba(5, 22, 52, .28);
}
#cc-ai-root .cc-ai-header {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  background: #102858; color: #fff; padding: 13px 12px;
}
#cc-ai-root .cc-ai-avatar {
  border: 2px solid #f2b531; border-radius: 50%; width: 35px; height: 35px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800; flex: 0 0 35px;
}
#cc-ai-root .cc-ai-headline { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#cc-ai-root .cc-ai-headline strong { color: white; font-size: 14px; }
#cc-ai-root .cc-ai-headline small { color: #c9dcf8; font-size: 11px; }
#cc-ai-root .cc-ai-icon-button {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: #fff; font-size: 24px;
}
#cc-ai-root .cc-ai-icon-button:hover { background: rgba(255,255,255,.15); }
#cc-ai-root .cc-ai-messages {
  display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto;
  min-height: 90px; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 13px; background: #f7f9fe;
}
#cc-ai-root .cc-ai-message {
  font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 14px;
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 91%; text-align: left;
}
#cc-ai-root .cc-ai-from-agent {
  align-self: flex-start; background: #fff; border: 1px solid #dce6f5;
  border-bottom-left-radius: 4px;
}
#cc-ai-root .cc-ai-message a.cc-ai-answer-link {
  color: #1754ab; text-decoration: underline; text-underline-offset: 2px;
  font-weight: 600; overflow-wrap: anywhere;
}
#cc-ai-root .cc-ai-message a.cc-ai-answer-link:hover { color: #0c326d; }
#cc-ai-root .cc-ai-message a.cc-ai-answer-link:focus-visible {
  outline: 3px solid #f2b531; outline-offset: 2px; border-radius: 2px;
}

/* Approved YouTube video: thumbnail card appears only in assistant replies. */
#cc-ai-root .cc-ai-message a.cc-ai-video-card {
  display: block; width: 100%; max-width: 320px; margin: 10px 0 2px;
  border: 1px solid #d8e2f2; border-radius: 12px; overflow: hidden;
  background: #fff; color: #173158; text-decoration: none;
  white-space: normal; box-shadow: 0 2px 6px rgba(15, 35, 70, .07);
}
#cc-ai-root .cc-ai-message a.cc-ai-video-card:hover {
  border-color: #7ea3d8; box-shadow: 0 4px 12px rgba(15,35,70,.16);
}
#cc-ai-root .cc-ai-video-thumbnail {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  background: #132b51; overflow: hidden;
}
#cc-ai-root .cc-ai-video-thumbnail img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
#cc-ai-root .cc-ai-video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 37px; border-radius: 11px;
  background: rgba(205, 27, 27, .95); color: white; font-size: 19px;
  padding-left: 3px; box-shadow: 0 2px 12px rgba(0,0,0,.28);
}
#cc-ai-root .cc-ai-video-caption { display: block; padding: 10px 11px; }
#cc-ai-root .cc-ai-video-title {
  display: block; font-size: 12px; font-weight: 700; line-height: 1.35;
  overflow-wrap: anywhere;
}
#cc-ai-root .cc-ai-video-hint {
  display: block; margin-top: 5px; color: #1754ab;
  font-size: 11px; font-weight: 600;
}

#cc-ai-root .cc-ai-from-visitor {
  align-self: flex-end; background: #1b56b4; color: #fff;
  border-bottom-right-radius: 4px;
}
#cc-ai-root .cc-ai-suggestions {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 12px 4px; background: #fff;
}
#cc-ai-root .cc-ai-suggestion {
  text-align: left; background: #eef4ff; color: #16478f; border: 1px solid #cfddf1;
  border-radius: 20px; padding: 5px 10px; font-size: 11px;
}
#cc-ai-root .cc-ai-suggestion:hover { background: #daeaff; }
#cc-ai-root .cc-ai-status {
  min-height: 18px; padding: 0 12px; color: #5c6a7b; font-size: 11px;
}
#cc-ai-root .cc-ai-form {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 0 12px 10px;
}
#cc-ai-root .cc-ai-form textarea {
  display: block; flex: 1; min-width: 0; resize: none; border: 1px solid #bacbe4;
  border-radius: 10px; padding: 10px; color: #13213b; background: #fff;
  font-size: 13px; max-height: 112px;
}
#cc-ai-root .cc-ai-send {
  align-self: stretch; border: 0; border-radius: 10px; padding: 0 13px;
  background: #2157ae; color: #fff; font-size: 12px; font-weight: 700;
}
#cc-ai-root .cc-ai-send:hover:not(:disabled) { background: #143c84; }
#cc-ai-root .cc-ai-actions {
  display: flex; gap: 7px; align-items: center; flex: 0 0 auto;
  padding: 10px 12px; border-top: 1px solid #e0e8f5; flex-wrap: wrap;
}
#cc-ai-root .cc-ai-actions a {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; padding: 8px 9px; font-size: 11px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
#cc-ai-root .cc-ai-actions .cc-ai-primary { background: #2058ae; color: #fff; border: 1px solid #2058ae; }
#cc-ai-root .cc-ai-actions .cc-ai-secondary { background: #fff; color: #224776; border: 1px solid #c3d0e4; }
#cc-ai-root .cc-ai-disclaimer {
  flex: 0 0 auto; margin: 0; padding: 0 12px 9px; color: #56637a;
  font-size: 10px; line-height: 1.35;
}
#cc-ai-root .cc-ai-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (max-width: 480px) {
  #cc-ai-root { right: 10px; bottom: 10px; }
  #cc-ai-root .cc-ai-panel { width: calc(100vw - 20px); height: min(570px, calc(100dvh - 95px)); }
  #cc-ai-root .cc-ai-launcher { padding: 11px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  #cc-ai-root *, #cc-ai-root *::before, #cc-ai-root *::after { transition: none !important; }
}
@media print { #cc-ai-root { display: none !important; } }

