/**
 * AI-Assistant Desktop UI
 * Modern 2-Column Layout with Context Sidebar
 */

/* ============================================================================
   HEADER COMPANION - ALWAYS AVAILABLE AI
   ============================================================================ */

.header-ai-companion {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

.header-ai-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 46px;
  padding: 5px 11px 5px 7px;
  border: 1px solid rgba(0,188,212,0.26);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(30,41,59,0.86));
  color: #e8f7ff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,188,212,0.11);
}

.header-ai-trigger:hover,
.header-ai-trigger.is-open {
  border-color: rgba(0,188,212,0.62);
  box-shadow: 0 0 0 3px rgba(0,188,212,0.08), 0 12px 34px rgba(0,188,212,0.18);
}

.header-ai-avatar {
  width: 35px;
  height: 35px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.header-ai-ring {
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: conic-gradient(from 140deg, #00d5ff, #8b5cf6, #22c55e, #00d5ff);
  animation: headerAiSpin 4s linear infinite;
  opacity: 0.88;
}

.header-ai-face {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  background: linear-gradient(145deg, #1e3a8a, #7c3aed);
  box-shadow: inset 0 0 14px rgba(255,255,255,0.18);
  z-index: 1;
}

.header-ai-face span {
  width: 5px;
  height: 7px;
  border-radius: 999px;
  background: #dffaff;
  animation: headerAiBlink 4.8s infinite;
}

.header-ai-face em {
  position: absolute;
  bottom: 6px;
  width: 12px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  border-bottom: 2px solid rgba(255,255,255,0.84);
}

.header-ai-copy {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.1;
}

.header-ai-copy strong {
  color: #f8fbff;
  font-size: 13px;
  font-weight: 900;
}

.header-ai-copy small {
  color: #8ff4ff;
  font-size: 11px;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-ai-panel {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  right: 14px;
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - var(--header-height) - var(--nav-height) - 24px));
  display: none;
  grid-template-rows: auto minmax(210px, 1fr) auto auto auto auto;
  z-index: 420;
  border: 1px solid rgba(0,188,212,0.28);
  border-radius: 18px;
  background: radial-gradient(circle at 16% 0%, rgba(0,188,212,0.17), transparent 34%),
    linear-gradient(145deg, rgba(10,12,31,0.98), rgba(17,24,39,0.98));
  box-shadow: 0 28px 80px rgba(0,0,0,0.46), 0 0 40px rgba(0,188,212,0.10);
  overflow: hidden;
}

.header-ai-panel.is-open {
  display: grid;
  animation: headerAiPanelIn 0.18s ease-out;
}

.header-ai-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-ai-panel-head strong {
  color: #fff;
  font-size: 17px;
}

.header-ai-panel-head small {
  display: block;
  color: #9fb2c8;
  font-size: 12px;
  margin-top: 3px;
}

.header-ai-panel-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 24px;
}

.header-ai-messages {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 230px;
}

.header-ai-message {
  max-width: 88%;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.42;
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.header-ai-message.assistant {
  align-self: flex-start;
  background: rgba(71,85,105,0.38);
  border: 1px solid rgba(148,163,184,0.20);
  color: #e2e8f0;
}

.header-ai-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
}

.header-ai-message.loading {
  color: #8ff4ff;
}

.header-ai-suggestions {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
  overflow-x: auto;
}

.header-ai-suggestions button {
  border: 1px solid rgba(0,188,212,0.24);
  border-radius: 999px;
  background: rgba(0,188,212,0.08);
  color: #bff7ff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.header-ai-suggestions button:hover {
  border-color: rgba(0,188,212,0.55);
  background: rgba(0,188,212,0.16);
  color: #fff;
}

.header-ai-input-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  padding: 12px 14px 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.header-ai-voice-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.42);
}

.header-ai-voice-row strong {
  display: block;
  color: #f8fbff;
  font-size: 15px;
  font-weight: 900;
}

.header-ai-voice-row small {
  display: block;
  color: #9fb2c8;
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.35;
}

.header-ai-voice-main {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(0,188,212,0.28), rgba(37,99,235,0.30));
  border: 1px solid rgba(0,188,212,0.35);
}

.header-ai-voice-main.recording {
  background: linear-gradient(135deg, #ef4444, #db2777);
  animation: headerAiPulse 1s infinite;
}

.header-ai-trigger.voice-active .header-ai-ring,
.header-ai-trigger.voice-speaking .header-ai-ring {
  animation-duration: 1.1s;
}

.header-ai-trigger.voice-active {
  border-color: rgba(239,68,68,0.72);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.09), 0 12px 34px rgba(239,68,68,0.18);
}

.header-ai-trigger.voice-speaking {
  border-color: rgba(34,197,94,0.62);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08), 0 12px 34px rgba(34,197,94,0.16);
}

.header-ai-input-row textarea {
  width: 100%;
  min-height: 42px;
  max-height: 110px;
  resize: none;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.header-ai-input-row textarea:focus {
  border-color: rgba(0,188,212,0.60);
  box-shadow: 0 0 0 3px rgba(0,188,212,0.10);
}

.header-ai-mic,
.header-ai-send {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
}

.header-ai-mic {
  background: rgba(255,255,255,0.08);
}

.header-ai-mic.recording {
  background: #ef4444;
  animation: headerAiPulse 1s infinite;
}

.header-ai-send {
  background: linear-gradient(135deg, #00bcd4, #2563eb);
}

.header-ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 14px;
}

.header-ai-actions button {
  flex: 1 1 auto;
  min-width: 92px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: #cdeafe;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
}

.header-ai-actions button:hover {
  border-color: rgba(0,188,212,0.45);
  color: #fff;
}

@keyframes headerAiSpin {
  to { transform: rotate(360deg); }
}

@keyframes headerAiBlink {
  0%, 45%, 50%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(0.14); }
}

@keyframes headerAiPulse {
  50% { box-shadow: 0 0 0 7px rgba(239,68,68,0.14); }
}

@keyframes headerAiPanelIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .header-ai-copy {
    display: none;
  }

  .header-ai-trigger {
    padding: 5px;
    height: 44px;
  }

  .header-ai-panel {
    left: 10px;
    right: 10px;
    width: auto;
    max-height: calc(100vh - var(--header-height) - var(--nav-height) - 18px);
  }
}

/* ============================================================================
   DESKTOP CONTAINER - 2 COLUMNS (FULLWIDTH)
   ============================================================================ */

.ai-desktop-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  width: 100vw !important;
  max-width: 100vw !important;
  height: calc(100vh - 110px) !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  left: calc(-50vw + 50%);
}

/* ============================================================================
   LEFT SIDEBAR - CONTEXT PANEL
   ============================================================================ */

.ai-context-sidebar {
  background: linear-gradient(180deg, rgba(15,23,42,0.95) 0%, rgba(30,41,59,0.95) 100%);
  border-right: 1px solid rgba(148,163,184,0.2);
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.ai-sidebar-header {
  flex: 0 0 auto;
  padding: 16px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  background: rgba(30,41,59,0.5);
  position: sticky;
  top: 0;
  z-index: 10;
}

.ai-sidebar-header h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: #e2e8f0;
  font-weight: 600;
}

.ai-sidebar-header small {
  color: #94a3b8;
  font-size: 12px;
}

.ai-sidebar-section {
  padding: 14px;
  border-bottom: 1px solid rgba(148,163,184,0.15);
  flex: 0 0 auto;
}

.ai-sidebar-section h4 {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(71,85,105,0.2);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  font-size: 12px;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.ai-sidebar-item:hover {
  background: rgba(71,85,105,0.35);
  border-left-color: #60a5fa;
  color: #e2e8f0;
}

.ai-sidebar-item .time {
  color: #94a3b8;
  font-weight: 600;
  min-width: 45px;
}

.ai-sidebar-item .text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-sidebar-item .icon {
  font-size: 14px;
}

.ai-sidebar-item .priority {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.ai-sidebar-item .priority-hoch {
  background: rgba(239,68,68,0.2);
  color: #fca5a5;
}

.ai-sidebar-item .priority-normal {
  background: rgba(251,146,60,0.2);
  color: #fed7aa;
}

.ai-sidebar-item .priority-niedrig {
  background: rgba(34,197,94,0.2);
  color: #86efac;
}

/* Quick Actions Grid */
.ai-quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-qa-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(37,99,235,0.2));
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  color: #93c5fd;
  font-weight: 500;
}

.ai-qa-btn:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(37,99,235,0.3));
  border-color: rgba(59,130,246,0.5);
  color: #bfdbfe;
  transform: translateY(-2px);
}

.ai-qa-btn span:first-child {
  font-size: 18px;
}

/* ============================================================================
   RIGHT SIDE - MAIN CHAT INTERFACE
   ============================================================================ */

.ai-chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1a1f35 100%);
}

/* Chat Header */
.ai-chat-header {
  flex: 0 0 auto;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  background: linear-gradient(180deg, rgba(30,41,59,0.6) 0%, rgba(15,23,42,0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ai-chat-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ai-header-modern > .ai-icon {
  display: none;
}

.ai-live-avatar {
  --avatar-size: 58px;
  width: var(--avatar-size);
  height: var(--avatar-size);
  position: relative;
  flex: 0 0 var(--avatar-size);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 26px rgba(0, 188, 212, 0.25));
  animation: ai-live-breathe 3.2s ease-in-out infinite;
}

.ai-live-avatar-compact {
  --avatar-size: 48px;
}

.ai-live-ring {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    conic-gradient(from 0deg, rgba(103,232,249,0.95), rgba(139,92,246,0.18), rgba(59,130,246,0.75), rgba(103,232,249,0.95));
  animation: ai-live-spin 5.5s linear infinite;
}

.ai-live-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 15px;
  background: #182033;
}

.ai-live-core {
  width: calc(var(--avatar-size) - 12px);
  height: calc(var(--avatar-size) - 12px);
  position: relative;
  z-index: 1;
  border-radius: 14px;
  background: linear-gradient(145deg, #5b7cfa 0%, #7454db 48%, #1bbce3 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -12px 22px rgba(8,13,28,0.24);
  display: grid;
  place-items: center;
  overflow: visible;
}

.ai-live-antenna {
  position: absolute;
  top: -9px;
  width: 18px;
  height: 12px;
  border-left: 2px solid rgba(216,251,255,0.8);
  transform: translateX(7px) rotate(18deg);
  transform-origin: bottom left;
  animation: ai-live-antenna 2.6s ease-in-out infinite;
}

.ai-live-antenna span {
  position: absolute;
  right: -5px;
  top: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 12px rgba(103,232,249,0.9);
  animation: ai-live-pulse 1.7s ease-in-out infinite;
}

.ai-live-face {
  width: 68%;
  height: 48%;
  border-radius: 9px;
  background: rgba(10,17,34,0.82);
  border: 1px solid rgba(216,251,255,0.28);
  position: relative;
  box-shadow: inset 0 0 18px rgba(103,232,249,0.12);
}

.ai-live-eye {
  position: absolute;
  top: 36%;
  width: 7px;
  height: 9px;
  border-radius: 999px;
  background: #d8fbff;
  box-shadow: 0 0 9px rgba(103,232,249,0.95);
  animation: ai-live-blink 4.2s infinite;
}

.ai-live-eye-left {
  left: 27%;
}

.ai-live-eye-right {
  right: 27%;
  animation-delay: 0.04s;
}

.ai-live-mouth {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(103,232,249,0.8);
  transform: translateX(-50%);
  animation: ai-live-talk 2.4s ease-in-out infinite;
}

.ai-live-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fef3c7;
  box-shadow: 0 0 10px rgba(254,243,199,0.9);
  opacity: 0.8;
}

.ai-live-spark-one {
  right: -2px;
  top: 13px;
  animation: ai-live-spark 2.1s ease-in-out infinite;
}

.ai-live-spark-two {
  left: 2px;
  bottom: 10px;
  animation: ai-live-spark 2.8s ease-in-out infinite reverse;
}

@keyframes ai-live-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.035); }
}

@keyframes ai-live-spin {
  to { transform: rotate(360deg); }
}

@keyframes ai-live-antenna {
  0%, 100% { transform: translateX(7px) rotate(14deg); }
  50% { transform: translateX(7px) rotate(25deg); }
}

@keyframes ai-live-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes ai-live-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  93%, 96% { transform: scaleY(0.12); }
}

@keyframes ai-live-talk {
  0%, 100% { width: 15px; opacity: 0.7; }
  35% { width: 9px; opacity: 1; }
  70% { width: 20px; opacity: 0.9; }
}

@keyframes ai-live-spark {
  0%, 100% { transform: translate(0, 0) scale(0.75); opacity: 0.35; }
  50% { transform: translate(2px, -3px) scale(1.2); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-live-avatar,
  .ai-live-ring,
  .ai-live-antenna,
  .ai-live-antenna span,
  .ai-live-eye,
  .ai-live-mouth,
  .ai-live-spark {
    animation: none;
  }
}

.ai-chat-header-content h2 {
  margin: 0 0 4px 0;
  font-size: 24px;
  color: #e2e8f0;
  font-weight: 700;
}

.ai-chat-header-content p {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.ai-model-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
}

.ai-model-current {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-model-current i {
  color: #38bdf8;
}

.ai-model-current em {
  font-style: normal;
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,.35);
  background: rgba(59,130,246,.12);
  border-radius: 999px;
  padding: 3px 8px;
}

.ai-model-select {
  min-width: 180px;
  max-width: 280px;
  height: 36px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(15,23,42,.88);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.ai-model-select:disabled {
  opacity: .65;
}

/* Messages Area - BIG & SPACIOUS */
.ai-messages-desktop {
  flex: 1 1 auto;
  min-height: 200px;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-messages-desktop::-webkit-scrollbar {
  width: 8px;
}

.ai-messages-desktop::-webkit-scrollbar-track {
  background: transparent;
}

.ai-messages-desktop::-webkit-scrollbar-thumb {
  background: rgba(71,85,105,0.4);
  border-radius: 4px;
}

.ai-messages-desktop::-webkit-scrollbar-thumb:hover {
  background: rgba(71,85,105,0.6);
}

/* Message Rows */
.ai-msg-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-msg-row.user-msg {
  justify-content: flex-end;
}

.ai-msg-row.assistant-msg {
  justify-content: flex-start;
}

/* Message Bubble */
.ai-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 12px;
  line-height: 1.6;
  word-wrap: break-word;
  font-size: 15px;
}

.ai-msg-row.user-msg .ai-bubble {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 16px 4px 16px 16px;
}

.ai-msg-row.assistant-msg .ai-bubble {
  background: rgba(71,85,105,0.4);
  color: #e2e8f0;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 4px 16px 16px 16px;
}

.ai-bubble p {
  margin: 0 0 8px 0;
}

.ai-bubble p:last-child {
  margin-bottom: 0;
}

.ai-bubble strong {
  color: #bfdbfe;
}

.ai-msg-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #94a3b8;
}

.ai-msg-row.user-msg .ai-msg-icon {
  order: 2;
}

.ai-msg-row.assistant-msg .ai-msg-icon {
  color: #3b82f6;
}

/* ============================================================================
   INPUT AREA - DESKTOP VERSION
   ============================================================================ */

.ai-input-desktop {
  flex: 0 0 auto;
  padding: 24px 32px 28px 32px;
  background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(30,41,59,0.6) 100%);
  border-top: 1px solid rgba(148,163,184,0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
}

.ai-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
}

.ai-input-field-desktop {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  background: rgba(71,85,105,0.3);
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 15px;
  height: 44px;
  outline: none;
  transition: all 0.2s ease;
}

.ai-input-field-desktop::placeholder {
  color: #64748b;
}

.ai-input-field-desktop:focus {
  background: rgba(71,85,105,0.5);
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Input Buttons */
.ai-input-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
  color: #e2e8f0;
}

.ai-voice-btn {
  background: rgba(59,130,246,0.2);
  border: 1px solid rgba(59,130,246,0.3);
}

.ai-voice-btn:hover {
  background: rgba(59,130,246,0.3);
  border-color: rgba(59,130,246,0.5);
}

.ai-send-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
}

.ai-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59,130,246,0.3);
}

.ai-send-btn:active {
  transform: translateY(0);
}

/* Quick Message Buttons */
.ai-quick-messages {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-qm-btn {
  padding: 10px 16px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 6px;
  color: #93c5fd;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.ai-qm-btn:hover {
  background: rgba(59,130,246,0.25);
  border-color: rgba(59,130,246,0.5);
  color: #bfdbfe;
}

.ai-qm-btn-clear {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
  min-height: 38px;
  display: flex;
  align-items: center;
}

.ai-qm-btn-clear:hover {
  background: rgba(239,68,68,0.25);
  border-color: rgba(239,68,68,0.5);
  color: #fecaca;
}

/* ============================================================================
   RESPONSIVE - TABLETS & SMALLER DESKTOPS
   ============================================================================ */

@media (max-width: 1600px) {
  .ai-desktop-container {
    grid-template-columns: 320px 1fr;
  }
  
  .ai-bubble {
    max-width: 80%;
  }
}

@media (max-width: 1400px) {
  .ai-desktop-container {
    grid-template-columns: 280px 1fr;
  }
  
  .ai-bubble {
    max-width: 75%;
  }
  
  .ai-messages-desktop,
  .ai-chat-header,
  .ai-input-desktop {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 1024px) {
  /* Fall back to mobile layout */
  .ai-desktop-container {
    display: none;
  }
}
