/* ComplyBot - Petronella AI Labs */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --card: #111118;
  --border: #1f1f2e;
  --text: #f0f0f5;
  --muted: #9090a0;
  --cyan: #00A9E0;
  --purple: #7C3AED;
  --emerald: #10B981;
  --input-bg: #1a1a24;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo { height: 28px; width: auto; filter: brightness(1.8); }

.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--text); }
.btn-cta {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
}
.btn-cta:hover { opacity: 0.9; }

/* Main layout */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  max-height: calc(100vh - 52px - 44px);
}

/* Info panel */
.info-panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card { text-align: center; }
.bot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  margin-bottom: 1rem;
}
.info-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}
.description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  margin-top: 0.75rem;
}

.frameworks h3, .example-questions h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.framework-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  padding: 0.3rem 0.6rem;
  background: rgba(0, 169, 224, 0.1);
  border: 1px solid rgba(0, 169, 224, 0.2);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--cyan);
}

.example-q {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.625rem 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
  font-family: inherit;
}
.example-q:hover {
  border-color: var(--cyan);
  background: rgba(0, 169, 224, 0.05);
}

.cta-block {
  padding: 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
}
.cta-block p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.btn-book {
  display: inline-block;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-book:hover { opacity: 0.9; }
.phone-link {
  display: block;
  margin-top: 0.5rem;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Chat section */
.chat-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chatbot-container {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg);
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  bottom: auto;
  right: auto;
  z-index: 1;
}

#chatbot-container.full {
  position: fixed;
  top: 0; left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
}

#chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.expand-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.expand-btn:hover { color: var(--text); background: var(--input-bg); }

#chatbot-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#chatbot-input {
  display: flex;
  padding: 0.75rem;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}

#chatbot-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
#chatbot-input input:focus {
  border-color: var(--cyan);
}
#chatbot-input input::placeholder {
  color: var(--muted);
}

#chatbot-input button {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
#chatbot-input button:hover { opacity: 0.9; }

/* Messages */
.user-msg, .bot-msg {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  max-width: 85%;
  font-size: 0.875rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.user-msg {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}

.bot-msg {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
}

.welcome-msg {
  background: rgba(0, 169, 224, 0.08);
  border-color: rgba(0, 169, 224, 0.2);
}
.welcome-msg strong {
  color: var(--cyan);
}

/* Typing indicator */
#typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.typing-dots {
  display: flex;
  gap: 3px;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Footer */
.site-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer p {
  font-size: 0.75rem;
  color: var(--muted);
}
.site-footer a {
  color: var(--cyan);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Scrollbar */
#chatbot-body::-webkit-scrollbar { width: 6px; }
#chatbot-body::-webkit-scrollbar-track { background: transparent; }
#chatbot-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
#chatbot-body::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Mobile */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .info-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
  .chat-section {
    min-height: 60vh;
  }
  .header-nav a:not(.btn-cta) { display: none; }
}
