/* Crakcode Lara Chat Commands UI
   Adds chat-command based Lara controls without floating LARA/WATCH/MEDIA buttons. */

#cc-lara-command-layer {
  position: fixed;
  left: 390px;
  right: 330px;
  bottom: 86px;
  z-index: 2147482100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  max-height: 46vh;
  overflow: hidden;
}

.cc-lara-chat-card {
  pointer-events: auto;
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
  background: rgba(35, 36, 42, .96);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  color: #f2f3f5;
  overflow: hidden;
  animation: ccLaraIn .18s cubic-bezier(.2,.8,.2,1) both;
  backdrop-filter: blur(16px);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

@keyframes ccLaraIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cc-lara-chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(88,101,242,.22), rgba(30, 188, 112, .12));
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.cc-lara-avatar {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: #111318;
  display: grid;
  place-items: center;
  font-size: 21px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.05);
}

.cc-lara-title {
  min-width: 0;
  flex: 1;
}

.cc-lara-name {
  font-weight: 900;
  font-size: 15px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cc-lara-badge {
  font-size: 10px;
  font-weight: 900;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
}

.cc-lara-sub {
  margin-top: 3px;
  color: #b5bac1;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-lara-close {
  border: 0;
  background: rgba(255,255,255,.08);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 900;
}

.cc-lara-body {
  padding: 14px 16px 16px;
}

.cc-lara-status {
  color: #dbdee1;
  line-height: 1.45;
  font-size: 13px;
  word-break: break-word;
}

.cc-lara-now {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.07);
}

.cc-lara-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.cc-lara-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 8px;
  background: #383a40;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-size: 12px;
  transition: transform .14s ease, background .14s ease, opacity .14s ease;
}

.cc-lara-btn:hover {
  transform: translateY(-1px);
  background: #444750;
}

.cc-lara-btn.primary {
  background: #5865f2;
}

.cc-lara-btn.green {
  background: #23a55a;
}

.cc-lara-btn.red {
  background: #f23f42;
}

.cc-lara-btn.yellow {
  background: #f0b232;
  color: #111;
}

.cc-lara-help {
  margin-top: 10px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.5;
}

.cc-lara-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147482600;
  background: rgba(35,36,42,.97);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  display: none;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  max-width: 360px;
}

/* Keep previous unwanted floating buttons hidden */
#cc-lara-btn,
#cc-watch-btn,
#cc-media-btn,
#cc-clean-admin-btn,
.cc-admin-shield {
  display: none !important;
}

/* Mobile */
@media (max-width: 1100px) {
  #cc-lara-command-layer {
    left: 18px;
    right: 18px;
    bottom: 92px;
  }

  .cc-lara-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #cc-lara-command-layer {
    bottom: 120px;
  }

  .cc-lara-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
