/* ====================================
   Aria Chat Interface Component
   ==================================== */

/* Services Section */
.services-section {
  padding: 80px 0 100px;
  position: relative;
  z-index: 1;
}

.services-section .container {
  max-width: 800px;
}

.services-header {
  text-align: center;
  margin-bottom: 48px;
}

/* Aria Input Container */
.aria-input-container {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.aria-input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 8px 8px 8px 28px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.aria-input-box:focus-within {
  border-color: var(--text-primary);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.aria-input-box.hidden {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.aria-input-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  padding: 12px 0;
}

.aria-input-field::placeholder {
  color: var(--text-muted);
}

.aria-mic-btn,
.aria-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.aria-mic-btn {
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-muted);
}

.aria-mic-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-card);
}

.aria-send-btn {
  background: var(--black);
  border: none;
}

.aria-send-btn:hover {
  background: #333;
  transform: scale(1.05);
}

.aria-send-btn svg {
  color: white;
}

/* Aria Suggestions */
.aria-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  opacity: 1;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.aria-suggestions.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.aria-suggestion {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
}

.aria-suggestion:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--white);
}

/* Aria Expanded Chat Window */
.aria-expanded {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-page);
  z-index: 150;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.aria-expanded.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

/* Aria Expanded Header */
.aria-expanded-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(251, 249, 239, 0.95);
  backdrop-filter: blur(12px);
}

.aria-expanded-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aria-expanded-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Instrument Serif', serif;
  font-size: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.aria-expanded-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aria-expanded-title {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  color: var(--text-primary);
}

.aria-expanded-title span {
  color: var(--text-muted);
  font-style: italic;
}

.aria-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  color: var(--text-muted);
}

.aria-close-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Aria Messages */
.aria-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.aria-user-query {
  align-self: flex-end;
  max-width: 70%;
  padding: 16px 24px;
  background: var(--black);
  color: var(--white);
  border-radius: 20px 20px 4px 20px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
  animation: msgAppear 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes msgAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aria-response {
  display: flex;
  gap: 16px;
  max-width: 85%;
  opacity: 0;
  transform: translateY(20px);
  animation: msgAppear 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.aria-response-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
  font-family: 'Instrument Serif', serif;
  font-size: 16px;
  overflow: hidden;
}

.aria-response-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aria-response-content {
  flex: 1;
}

.aria-response-bubble {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px 20px 20px 20px;
  padding: 20px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.aria-response-bubble p {
  margin-bottom: 12px;
}

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

.aria-response-bubble strong {
  font-weight: 600;
}

/* Aria Typing Indicator */
.aria-typing {
  display: flex;
  gap: 16px;
  max-width: 85%;
  opacity: 0;
  transform: translateY(20px);
  animation: msgAppear 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.aria-typing-dots {
  display: flex;
  gap: 5px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px 20px 20px 20px;
}

.aria-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite;
}

.aria-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.aria-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* Aria Followup Buttons */
.aria-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: msgAppear 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.aria-followup {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
}

.aria-followup:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--white);
}

/* Aria Expanded Input */
.aria-expanded-input {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border-light);
  background: rgba(251, 249, 239, 0.95);
  backdrop-filter: blur(12px);
}

.aria-expanded-input-box {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 12px 12px 24px;
  max-width: 800px;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.aria-expanded-input-box:focus-within {
  border-color: var(--text-primary);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.aria-expanded-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
  max-height: 120px;
  padding: 8px 0;
}

.aria-expanded-textarea::placeholder {
  color: var(--text-muted);
}

.aria-expanded-mic,
.aria-expanded-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.aria-expanded-mic {
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-muted);
}

.aria-expanded-mic:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.aria-expanded-send {
  background: var(--black);
  border: none;
}

.aria-expanded-send:hover {
  background: #333;
  transform: scale(1.05);
}

.aria-expanded-send svg {
  color: white;
}

.aria-input-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .aria-expanded {
    top: auto;
    bottom: 0;
    height: 90vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.15);
    background: rgba(251, 249, 239, 0.98);
  }

  .aria-expanded.open {
    transform: translateY(0);
  }

  .aria-expanded::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    z-index: 20;
  }

  .aria-expanded-header {
    border-radius: 24px 24px 0 0;
    padding: 32px 20px 20px;
  }
}

@media (max-width: 600px) {
  .aria-user-query {
    max-width: 85%;
  }

  .aria-response {
    max-width: 95%;
  }
}
