/* variant-b.css — Стили чат-интерфейса (Вариант Б + Демо) */
/* Версия: 1.0.4 | Зависит от: core.css */

/* ===== BACKGROUND EFFECTS ===== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  pointer-events: none;
}

/* ===== HEADER (с прозрачностью) ===== */
header {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===== HEADER CENTER (Dropdown) ===== */
.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

/* ===== DEMO DROPDOWN ===== */
.demo-dropdown {
  position: relative;
}
.demo-trigger {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.demo-trigger:hover {
  border-color: var(--primary);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}
.demo-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.demo-option {
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.demo-option:hover {
  background: var(--bg-primary);
}
.demo-option.active {
  background: var(--primary);
  color: white;
}
.demo-option img {
  width: 40px;
  height: 40px;
  border-radius: 0.375rem;
  object-fit: cover;
}
.demo-option-text {
  display: flex;
  flex-direction: column;
}
.demo-option-title {
  font-weight: 500;
  font-size: 0.875rem;
}
.demo-option-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.demo-option.active .demo-option-desc {
  color: rgba(255,255,255,0.8);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  display: flex;
  height: 100vh;
  padding-top: calc(var(--header-height) + var(--banner-height));
  padding-bottom: 120px;
  position: relative;
}

/* ===== LEFT SPACE ===== */
.left-space {
  width: 15%;
  flex-shrink: 0;
}

/* ===== CHAT AREA ===== */
.chat-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* ===== TITLE CONTAINER ===== */
.title-container {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.main-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeIn 0.6s ease;
}

/* ===== MESSAGES CONTAINER ===== */
.messages-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* ===== MESSAGE LINE ===== */
.message-line {
  padding: 10px 15px;
  border-radius: 12px;
  max-width: 80%;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
  word-wrap: break-word;
}
.message-line.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.message-line.bot {
  background: var(--bg-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

/* ===== ANDROID VISUAL (RIGHT SIDE) ===== */
.right-side {
  width: 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.android-wrapper {
  max-width: 400px;
  animation: float 6s infinite ease-in-out;
  position: relative;
  z-index: 1;
}
.android-wrapper img {
  width: 100%;
  filter: drop-shadow(0 20px 40px var(--shadow-color));
}

/* Floating cards */
.floating-card {
  position: absolute;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  animation: float 4s infinite ease-in-out;
  white-space: nowrap;
}
.floating-card.top-right {
  top: 10%;
  right: -20%;
  animation-delay: 0s;
}
.floating-card.bottom-left {
  bottom: 20%;
  left: -15%;
  animation-delay: 2s;
}
.floating-card.bottom-right {
  bottom: 10%;
  right: -10%;
  animation-delay: 1s;
}
.floating-card::before {
  content: '✓';
  color: var(--success, #22c55e);
  margin-right: 0.5rem;
  font-weight: bold;
}

/* ===== FOOTER INPUT ===== */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 1rem var(--container-padding);
  z-index: 100;
}
.input-row {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  outline: none;
  transition: var(--transition-fast);
  font-size: 0.9375rem;
}
.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.chat-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== BUTTONS ===== */
.btn-demo,
.btn-want,
.send-button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-demo:hover,
.btn-want:hover,
.send-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.send-button {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding: 0;
}
.btn-demo {
  min-width: 120px;
}

/* ===== CONSENT LABEL ===== */
.consent-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  justify-content: center;
}
.consent-label input[type="checkbox"] {
  accent-color: var(--primary);
}
.consent-label a {
  color: var(--primary);
  text-decoration: underline;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
  .right-side {
    display: none;
  }
  .left-space {
    width: 0;
  }
  .header-center {
    position: static;
    transform: none;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding-bottom: 100px;
  }
  .chat-area {
    padding: 1rem;
  }
  .message-line {
    max-width: 90%;
  }
  .input-row {
    flex-wrap: wrap;
  }
  .btn-demo, .btn-want {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: auto;
    flex: 1;
  }
  .chat-input {
    padding: 0.7rem 2.5rem 0.7rem 0.75rem;
    font-size: 0.85rem;
    flex: 2;
  }
  .send-button {
    width: 40px;
    height: 40px;
  }
  .header-center {
    display: none;
  }
}

@media (max-width: 480px) {
  .btn-demo, .btn-want {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  .chat-input {
    padding: 0.7rem 2.5rem 0.7rem 0.75rem;
    font-size: 0.85rem;
  }
}