/* ClutchHub v194: kompakt sayfa asistanı ve yalnızca komut kabul eden bot sohbeti. */

.inline-clutchbot-v188 {
  grid-template-columns: 102px minmax(0, 1fr) !important;
  gap: 16px !important;
  min-height: 148px !important;
  margin: 14px 0 18px !important;
  padding: 13px 18px !important;
  background: linear-gradient(135deg, #fff8f4, #fff 64%) !important;
  border-color: #ffd1be !important;
}

.inline-clutchbot-v188 .inline-clutchbot-tools {
  display: none !important;
}

.inline-clutchbot-v188 .inline-clutchbot-visual {
  height: 118px !important;
  border-right: 1px solid #e2e9f1 !important;
}

.inline-clutchbot-v188 .inline-clutchbot-visual img {
  width: 104px !important;
  height: 116px !important;
}

.inline-clutchbot-v188 .inline-clutchbot-live {
  top: 0;
  left: -2px;
  padding: 3px 6px;
  font-size: 8px;
}

.inline-clutchbot-v188 .inline-clutchbot-kicker {
  margin-bottom: 3px;
  font-size: 10px;
}

.inline-clutchbot-v188 .inline-clutchbot-copy h2 {
  margin-bottom: 4px;
  font-size: 17px !important;
}

.inline-clutchbot-v188 .inline-clutchbot-copy p {
  display: -webkit-box;
  min-height: 0 !important;
  max-width: 860px;
  margin: 0;
  overflow: hidden;
  font-size: 11px !important;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.inline-clutchbot-v188 .inline-clutchbot-action,
.inline-clutchbot-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 9px 7px 0 0;
  padding: 0 11px;
  border-radius: 7px 3px;
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
}

.inline-clutchbot-v188 .inline-clutchbot-action {
  color: #e8440e;
  background: #fff;
  border: 1px solid #ffb897;
}

.inline-clutchbot-chat-button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6526, #ed430d);
  border: 1px solid #e6430d;
  box-shadow: 0 6px 14px rgb(237 67 13 / 18%);
}

.inline-clutchbot-chat-button:hover,
.inline-clutchbot-chat-button:focus-visible {
  background: linear-gradient(135deg, #f55a1d, #d93a08);
  outline: 3px solid rgb(255 91 24 / 16%);
}

.clutchbot-command-bubble {
  position: fixed;
  z-index: 2147482600;
  right: 24px;
  bottom: 22px;
  width: min(410px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 96px));
  color: #14243d;
  background: #fff;
  border: 1px solid #d6e1ed;
  border-radius: 18px 18px 5px 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  box-shadow: 0 24px 70px rgb(15 35 62 / 25%);
  animation: clutchbotCommandOpen 180ms ease-out;
}

.clutchbot-command-bubble::before,
.clutchbot-command-bubble::after,
.clutchbot-room-stage::before,
.clutchbot-room-stage::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.clutchbot-command-bubble::before,
.clutchbot-room-stage::before {
  top: -1px;
  left: -1px;
  width: 38px;
  height: 38px;
  border-top: 3px solid #ff5018;
  border-left: 3px solid #ff5018;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.clutchbot-command-bubble::after,
.clutchbot-room-stage::after {
  right: -1px;
  bottom: -1px;
  width: 30px;
  height: 30px;
  border-right: 3px solid #ff5018;
  border-bottom: 3px solid #ff5018;
}

.clutchbot-command-head {
  min-height: 72px;
  padding: 12px 12px 11px 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #dce5ee;
  background: linear-gradient(120deg, rgb(255 80 24 / 8%), transparent 52%), #fff;
}

.clutchbot-command-head img,
.clutchbot-room-head img,
.clutchbot-room-button > img {
  object-fit: contain;
}

.clutchbot-command-head img {
  width: 44px;
  height: 50px;
}

.clutchbot-command-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.clutchbot-command-head small,
.clutchbot-room-head small {
  color: #ef4d15;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .08em;
}

.clutchbot-command-head strong,
.clutchbot-room-head strong {
  color: #10213b;
  font-size: 14px;
  font-weight: 950;
}

.clutchbot-command-head span,
.clutchbot-room-head span {
  color: #718099;
  font-size: 9px;
}

.clutchbot-command-close {
  width: 34px;
  height: 34px;
  color: #263950;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d8e2ed;
  border-radius: 9px;
  font: inherit;
  font-size: 18px;
}

.clutchbot-command-messages,
.clutchbot-room-messages {
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  background:
    linear-gradient(rgb(226 234 242 / 35%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(226 234 242 / 35%) 1px, transparent 1px),
    #f8fafc;
  background-size: 30px 30px;
}

.clutchbot-command-message {
  max-width: 88%;
  margin: 0 0 10px;
  display: grid;
  gap: 3px;
}

.clutchbot-command-message.user {
  margin-left: auto;
  justify-items: end;
}

.clutchbot-command-message strong {
  color: #52647b;
  font-size: 8px;
}

.clutchbot-command-message p {
  margin: 0;
  padding: 9px 11px;
  color: #1b2d47;
  background: #fff;
  border: 1px solid #dbe5ee;
  border-radius: 5px 13px 13px 13px;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 12px rgb(18 42 72 / 5%);
}

.clutchbot-command-message.user p {
  color: #fff;
  background: linear-gradient(135deg, #ff6429, #f5470d);
  border-color: #ff5a21;
  border-radius: 13px 5px 13px 13px;
}

.clutchbot-command-message.error p {
  color: #a72d20;
  background: #fff5f2;
  border-color: #ffc4b3;
}

.clutchbot-command-footer,
.clutchbot-room-footer {
  padding: 9px 10px 10px;
  background: #fff;
  border-top: 1px solid #d9e3ed;
}

.clutchbot-command-chips {
  display: flex;
  gap: 5px;
  margin-bottom: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.clutchbot-command-chip {
  flex: 0 0 auto;
  min-height: 27px;
  padding: 0 8px;
  color: #e44913;
  cursor: pointer;
  background: #fff7f2;
  border: 1px solid #ffc7ad;
  border-radius: 7px 3px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
}

.clutchbot-command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 7px;
}

.clutchbot-command-form input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  color: #172943;
  background: #fff;
  border: 1px solid #d5e1ec;
  border-radius: 10px;
  outline: 0;
  font: inherit;
  font-size: 11px;
}

.clutchbot-command-form input:focus {
  border-color: #ff7040;
  box-shadow: 0 0 0 3px rgb(255 80 24 / 10%);
}

.clutchbot-command-form button {
  width: 42px;
  height: 42px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff6429, #f0440e);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 18px;
  font-weight: 950;
}

.clutchbot-chat-room-group {
  display: grid !important;
  gap: 6px;
  margin: 0 0 17px;
}

.clutchbot-chat-room-group > span {
  margin: 5px 3px 1px;
  color: #75859a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.chat-page .clutchbot-room-button {
  position: relative;
  width: 100%;
  min-height: 68px !important;
  padding: 8px 10px !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 9px;
  color: #182b47 !important;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, #fff6f0, #fff) !important;
  border: 1px solid #ffb895 !important;
  border-radius: 8px 3px !important;
  box-shadow: 0 7px 18px rgb(255 75 22 / 10%) !important;
}

.chat-page .clutchbot-room-button.active {
  box-shadow: inset 3px 0 0 #ff5018, 0 8px 20px rgb(255 75 22 / 13%) !important;
}

.clutchbot-room-button > img {
  width: 46px;
  height: 52px;
}

.clutchbot-room-button > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.clutchbot-room-button strong {
  color: #172a45 !important;
  font-size: 11px !important;
}

.clutchbot-room-button small {
  color: #77879b !important;
  font-size: 8px !important;
}

.clutchbot-room-button b {
  width: 8px !important;
  min-width: 8px !important;
  height: 8px !important;
  background: #1fbb6d !important;
  border-radius: 50%;
}

.chat-page .chat-conversation {
  position: relative;
}

.clutchbot-room-stage {
  position: relative;
  min-width: 0;
  min-height: 640px;
  height: 100%;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
}

.chat-page.clutchbot-room-open .chat-conversation > :not(.clutchbot-room-stage) {
  display: none !important;
}

.chat-page.clutchbot-room-open .clutchbot-room-stage {
  display: grid;
}

.clutchbot-room-head {
  min-height: 76px;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #dce5ee;
  background: linear-gradient(90deg, #fff7f2, #fff);
}

.clutchbot-room-head img {
  width: 50px;
  height: 58px;
}

.clutchbot-room-head > div {
  display: grid;
  gap: 2px;
}

.clutchbot-room-head > b {
  color: #11975a;
  font-size: 9px;
}

.clutchbot-room-help {
  padding: 10px 12px;
  margin: 0 0 12px;
  color: #55677e;
  background: #fff;
  border: 1px solid #dce5ed;
  border-left: 3px solid #ff5b18;
  border-radius: 5px 12px 12px 5px;
  font-size: 10px;
  line-height: 1.5;
}

@keyframes clutchbotCommandOpen {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .inline-clutchbot-v188 {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    padding: 12px !important;
  }

  .inline-clutchbot-v188 .inline-clutchbot-visual {
    height: 96px !important;
  }

  .inline-clutchbot-v188 .inline-clutchbot-visual img {
    width: 74px !important;
    height: 92px !important;
  }

  .clutchbot-command-bubble {
    right: 8px;
    bottom: 72px;
    width: calc(100vw - 16px);
    height: min(610px, calc(100vh - 88px));
  }
}
