/* Module AI Assistant — Floating Chat Panel */
.mod-ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--accent, #bb86fc);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mod-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.mod-ai-panel {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 400px;
  height: 500px;
  z-index: 1000;
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--card-border, #2a2a2a);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
}
.mod-ai-panel.open {
  display: flex;
}

.mod-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border, #2a2a2a);
  background: var(--sidebar-bg, #111);
}
.mod-ai-header-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg, #e0e0e0);
}
.mod-ai-header-blocks {
  font-size: 11px;
  color: var(--muted, #888);
  margin-left: 8px;
}
.mod-ai-header-close {
  background: none;
  border: none;
  color: var(--muted, #888);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.mod-ai-header-close:hover {
  color: var(--fg, #e0e0e0);
}

.mod-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mod-ai-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--card-border, #2a2a2a);
  background: var(--sidebar-bg, #111);
}
.mod-ai-input {
  flex: 1;
  background: var(--input-bg, #2a2a2a);
  border: 1px solid var(--input-border, #444);
  border-radius: 10px;
  color: var(--input-text, #e0e0e0);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 40px;
  max-height: 100px;
}
.mod-ai-input:focus {
  outline: none;
  border-color: var(--accent, #bb86fc);
}
.mod-ai-send {
  background: var(--accent, #bb86fc);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.mod-ai-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 768px) {
  .mod-ai-panel {
    width: calc(100% - 16px);
    right: 8px;
    bottom: 72px;
    height: 60vh;
  }
  .mod-ai-fab {
    bottom: 16px;
    right: 16px;
  }
}
