/* file: /home/mate/public_html/camtalkers.com/css/partner-ai-widget.css */

:root {
  --ct-ai-accent: #7357f6;
  --ct-ai-accent-hover: #6045dc;
  --ct-ai-success: #16885d;
  --ct-ai-danger: #d04454;
  --ct-ai-warning: #b26d00;
  --ct-ai-panel-bg: #ffffff;
  --ct-ai-soft-bg: #f5f7fb;
  --ct-ai-user-bg: #7357f6;
  --ct-ai-text: #171923;
  --ct-ai-muted: #6f778a;
  --ct-ai-border: #e1e5ee;
  --ct-ai-shadow:
    0 26px 80px rgba(20, 23, 42, 0.22);
}

html[data-theme="dark"] {
  --ct-ai-accent: #9b86ff;
  --ct-ai-accent-hover: #ad9cff;
  --ct-ai-success: #52d59b;
  --ct-ai-danger: #ff7b89;
  --ct-ai-warning: #f3b75a;
  --ct-ai-panel-bg: #151925;
  --ct-ai-soft-bg: #1d2231;
  --ct-ai-user-bg: #765cf0;
  --ct-ai-text: #f5f7fb;
  --ct-ai-muted: #a6afc0;
  --ct-ai-border: #2d3447;
  --ct-ai-shadow:
    0 28px 90px rgba(0, 0, 0, 0.46);
}

#ct-ai-widget-root,
#ct-ai-widget-root * {
  box-sizing: border-box;
}

#ct-ai-widget-root {
  position: relative;
  z-index: 99990;
  font-family:
    Inter,
    Pretendard,
    "Noto Sans KR",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

#ct-ai-widget-root button,
#ct-ai-widget-root textarea {
  font: inherit;
}

.ct-ai-launcher {
  position: fixed;
  z-index: 99992;
  right: 22px;
  bottom:
    max(
      22px,
      calc(env(safe-area-inset-bottom) + 12px)
    );
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: visible;
  border: 1px solid
    rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  outline: none;
  background:
    linear-gradient(
      145deg,
      var(--ct-ai-accent),
      #5ca9f7
    );
  box-shadow:
    0 16px 42px rgba(70, 54, 190, 0.38);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.ct-ai-launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 20px 48px rgba(70, 54, 190, 0.46);
}

.ct-ai-launcher:focus-visible {
  box-shadow:
    0 0 0 4px rgba(115, 87, 246, 0.24),
    0 20px 48px rgba(70, 54, 190, 0.46);
}

.ct-ai-launcher img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: contain;
}

.ct-ai-launcher-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid var(--ct-ai-panel-bg);
  border-radius: 999px;
  background: var(--ct-ai-success);
  color: #ffffff;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 900;
}

.ct-ai-panel {
  position: fixed;
  z-index: 99991;
  right: 22px;
  bottom:
    max(
      98px,
      calc(env(safe-area-inset-bottom) + 88px)
    );
  display: grid;
  width: min(410px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 125px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--ct-ai-border);
  border-radius: 24px;
  background: var(--ct-ai-panel-bg);
  color: var(--ct-ai-text);
  box-shadow: var(--ct-ai-shadow);
  transform-origin: right bottom;
  animation: ct-ai-panel-open 180ms ease-out;
}

.ct-ai-panel[hidden] {
  display: none !important;
}

@keyframes ct-ai-panel-open {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ct-ai-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--ct-ai-border);
  background:
    linear-gradient(
      135deg,
      rgba(115, 87, 246, 0.1),
      transparent
    ),
    var(--ct-ai-panel-bg);
}

.ct-ai-header-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: contain;
}

.ct-ai-header-copy {
  min-width: 0;
  flex: 1;
}

.ct-ai-header-copy strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-ai-header-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ct-ai-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-ai-icon-button {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ct-ai-border);
  border-radius: 12px;
  background: var(--ct-ai-soft-bg);
  color: var(--ct-ai-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ct-ai-account {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--ct-ai-border);
  background: var(--ct-ai-soft-bg);
}

.ct-ai-account-copy {
  min-width: 0;
  flex: 1;
}

.ct-ai-account-name {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-ai-account-limit {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ct-ai-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-ai-login-button {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--ct-ai-accent);
  border-radius: 10px;
  background: transparent;
  color: var(--ct-ai-accent);
  padding: 0 11px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.ct-ai-login-button[hidden] {
  display: none !important;
}

.ct-ai-messages {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scroll-behavior: smooth;
}

.ct-ai-message {
  display: grid;
  margin-bottom: 14px;
}

.ct-ai-message-user {
  justify-items: end;
}

.ct-ai-message-assistant,
.ct-ai-message-error {
  justify-items: start;
}

.ct-ai-message-label {
  margin: 0 4px 5px;
  color: var(--ct-ai-muted);
  font-size: 10px;
  font-weight: 700;
}

.ct-ai-bubble {
  max-width: 88%;
  border: 1px solid var(--ct-ai-border);
  border-radius: 17px;
  background: var(--ct-ai-soft-bg);
  color: var(--ct-ai-text);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.58;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ct-ai-message-user .ct-ai-bubble {
  border-color: transparent;
  border-bottom-right-radius: 5px;
  background: var(--ct-ai-user-bg);
  color: #ffffff;
}

.ct-ai-message-assistant .ct-ai-bubble {
  border-bottom-left-radius: 5px;
}

.ct-ai-message-error .ct-ai-bubble {
  border-color: rgba(208, 68, 84, 0.34);
  border-bottom-left-radius: 5px;
  background: rgba(208, 68, 84, 0.09);
  color: var(--ct-ai-danger);
}

.ct-ai-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.ct-ai-meta-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid var(--ct-ai-border);
  border-radius: 999px;
  background: var(--ct-ai-panel-bg);
  color: var(--ct-ai-muted);
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 750;
}

.ct-ai-sources {
  width: min(100%, 360px);
  margin-top: 8px;
  border: 1px solid var(--ct-ai-border);
  border-radius: 13px;
  background: var(--ct-ai-panel-bg);
  overflow: hidden;
}

.ct-ai-sources summary {
  min-height: 39px;
  padding: 10px 12px;
  color: var(--ct-ai-accent);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.ct-ai-source-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 10px 10px;
  list-style: none;
}

.ct-ai-source-item {
  border: 1px solid var(--ct-ai-border);
  border-radius: 10px;
  background: var(--ct-ai-soft-bg);
  padding: 9px 10px;
}

.ct-ai-source-link,
.ct-ai-source-text {
  display: block;
  color: var(--ct-ai-text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ct-ai-source-link {
  color: var(--ct-ai-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ct-ai-source-detail {
  display: block;
  margin-top: 4px;
  color: var(--ct-ai-muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ct-ai-thinking {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.ct-ai-thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ct-ai-muted);
  animation: ct-ai-thinking 1s infinite ease-in-out;
}

.ct-ai-thinking span:nth-child(2) {
  animation-delay: 120ms;
}

.ct-ai-thinking span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes ct-ai-thinking {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.ct-ai-composer {
  padding:
    11px
    12px
    max(
      12px,
      env(safe-area-inset-bottom)
    );
  border-top: 1px solid var(--ct-ai-border);
  background: var(--ct-ai-panel-bg);
}

.ct-ai-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 43px;
  align-items: end;
  gap: 8px;
}

.ct-ai-textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 1px solid var(--ct-ai-border);
  border-radius: 14px;
  outline: none;
  background: var(--ct-ai-soft-bg);
  color: var(--ct-ai-text);
  padding: 11px 12px;
  line-height: 1.42;
}

.ct-ai-textarea:focus {
  border-color: var(--ct-ai-accent);
  box-shadow:
    0 0 0 3px rgba(115, 87, 246, 0.14);
}

.ct-ai-textarea::placeholder {
  color: var(--ct-ai-muted);
}

.ct-ai-send-button {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--ct-ai-accent);
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
}

.ct-ai-send-button:hover {
  background: var(--ct-ai-accent-hover);
}

.ct-ai-send-button:disabled,
.ct-ai-textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ct-ai-composer-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--ct-ai-muted);
  font-size: 9px;
}

.ct-ai-clear-button {
  border: 0;
  background: transparent;
  color: var(--ct-ai-muted);
  padding: 0;
  font-size: 9px;
  cursor: pointer;
}

.ct-ai-clear-button:hover {
  color: var(--ct-ai-accent);
}

@media (max-width: 640px) {
  .ct-ai-launcher {
    right: 14px;
    bottom:
      max(
        14px,
        calc(env(safe-area-inset-bottom) + 8px)
      );
    width: 58px;
    height: 58px;
  }

  .ct-ai-launcher img {
    width: 41px;
    height: 41px;
  }

  .ct-ai-panel {
    right: 8px;
    bottom:
      max(
        80px,
        calc(env(safe-area-inset-bottom) + 72px)
      );
    left: 8px;
    width: auto;
    height: min(76dvh, 680px);
    border-radius: 20px;
  }

  .ct-ai-header {
    min-height: 68px;
    padding: 10px 12px;
  }

  .ct-ai-header-logo {
    width: 42px;
    height: 42px;
  }

  .ct-ai-messages {
    padding: 13px;
  }

  .ct-ai-bubble {
    max-width: 92%;
  }
}

@media (max-width: 380px) {
  .ct-ai-panel {
    right: 5px;
    left: 5px;
  }

  .ct-ai-header-copy span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-ai-panel,
  .ct-ai-launcher,
  .ct-ai-thinking span {
    animation: none !important;
    transition: none !important;
  }
}

/* CT AI LAUNCHER REDESIGN START */

.ct-ai-launcher {
  display: flex;
  width: auto;
  min-width: 158px;
  height: 58px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--ct-ai-border);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(115, 87, 246, 0.08),
      transparent 58%
    ),
    var(--ct-ai-panel-bg);
  color: var(--ct-ai-text);
  padding: 7px 14px 7px 7px;
  box-shadow:
    0 14px 40px rgba(20, 23, 42, 0.2);
}

.ct-ai-launcher:hover {
  border-color: var(--ct-ai-accent);
  background:
    linear-gradient(
      135deg,
      rgba(115, 87, 246, 0.14),
      transparent 62%
    ),
    var(--ct-ai-panel-bg);
  transform: translateY(-2px);
  box-shadow:
    0 18px 46px rgba(20, 23, 42, 0.26);
}

.ct-ai-launcher-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      var(--ct-ai-accent),
      #5ca9f7
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ct-ai-launcher .ct-ai-launcher-mark img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: contain;
}

.ct-ai-launcher-copy {
  display: grid;
  min-width: 0;
  text-align: left;
}

.ct-ai-launcher-copy strong {
  color: var(--ct-ai-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.ct-ai-launcher-copy small {
  margin-top: 3px;
  color: var(--ct-ai-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.ct-ai-launcher-badge {
  display: none !important;
}

.ct-ai-open .ct-ai-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
}

.ct-ai-open .ct-ai-panel {
  bottom:
    max(
      18px,
      calc(env(safe-area-inset-bottom) + 10px)
    );
  height: min(720px, calc(100dvh - 36px));
}

@media (max-width: 640px) {
  .ct-ai-launcher {
    right: 12px;
    bottom:
      max(
        12px,
        calc(env(safe-area-inset-bottom) + 7px)
      );
    min-width: 146px;
    height: 54px;
    border-radius: 17px;
    padding: 6px 12px 6px 6px;
  }

  .ct-ai-launcher-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .ct-ai-launcher .ct-ai-launcher-mark img {
    width: 34px;
    height: 34px;
  }

  .ct-ai-open .ct-ai-panel {
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 20px;
  }
}

/* CT AI LAUNCHER REDESIGN END */


/* CT AI CLEAN LAUNCHER V3 */

.ct-ai-launcher {
  min-width: 150px;
  height: 56px;
  gap: 10px;
  border: 1px solid var(--ct-ai-border);
  border-radius: 16px;
  background: var(--ct-ai-panel-bg);
  padding: 7px 14px 7px 9px;
  box-shadow:
    0 12px 32px rgba(20, 23, 42, 0.18);
}

.ct-ai-launcher:hover {
  border-color: var(--ct-ai-accent);
  background: var(--ct-ai-panel-bg);
  transform: translateY(-2px);
  box-shadow:
    0 16px 38px rgba(20, 23, 42, 0.24);
}

.ct-ai-launcher-logo {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  outline: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.ct-ai-launcher-mark {
  display: contents !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ct-ai-launcher-mark::before,
.ct-ai-launcher-mark::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 640px) {
  .ct-ai-launcher {
    min-width: 142px;
    height: 52px;
    padding: 6px 12px 6px 8px;
  }

  .ct-ai-launcher-logo {
    width: 39px;
    height: 39px;
  }
}

/* CT AI SIMPLE HEADER LOGO V5 */

.ct-ai-launcher > .ct-ai-header-logo {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 14px;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
}

.ct-ai-launcher-mark,
.ct-ai-launcher-logo,
.ct-ai-launcher-badge {
  display: none !important;
}

.ct-ai-launcher {
  gap: 10px;
  min-width: 154px;
  height: 60px;
  border: 1px solid var(--ct-ai-border);
  border-radius: 18px;
  background: var(--ct-ai-panel-bg);
  padding: 7px 14px 7px 7px;
}

@media (max-width: 640px) {
  .ct-ai-launcher {
    min-width: 146px;
    height: 56px;
  }

  .ct-ai-launcher > .ct-ai-header-logo {
    width: 42px;
    height: 42px;
  }
}

/* CT AI LAUNCHER BREATHING START */

@keyframes ct-ai-launcher-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 12px 32px rgba(20, 23, 42, 0.18),
      0 0 0 0 rgba(115, 87, 246, 0);
  }

  50% {
    transform: translateY(-2px) scale(1.035);
    box-shadow:
      0 17px 42px rgba(20, 23, 42, 0.25),
      0 0 0 7px rgba(115, 87, 246, 0.09);
  }
}

.ct-ai-launcher {
  animation:
    ct-ai-launcher-breathe
    2.8s
    ease-in-out
    infinite;
  will-change: transform, box-shadow;
}

.ct-ai-launcher:hover,
.ct-ai-launcher:focus-visible {
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.02);
}

.ct-ai-launcher:active {
  animation-play-state: paused;
  transform: translateY(0) scale(0.98);
}

.ct-ai-open .ct-ai-launcher {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .ct-ai-launcher {
    animation: none !important;
    will-change: auto;
  }
}

/* CT AI LAUNCHER BREATHING END */

