/* ATMAN — Reusable Component Styles */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 14px; }
.btn-icon { padding: 10px; border-radius: 10px; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  transition: all var(--transition-base);
}
.card:hover { border-color: var(--border-default); }
.card-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); cursor: pointer; }

.card-sm { padding: 16px; border-radius: 12px; }
.card-lg { padding: 32px; border-radius: 20px; }

/* ===== INPUTS ===== */
.input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}
.input::placeholder { color: var(--text-tertiary); }
.input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(200, 149, 108, 0.1); outline: none; }

.textarea { min-height: 100px; resize: vertical; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23A09A93' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.badge-primary { background: rgba(200, 149, 108, 0.15); color: var(--accent-primary); }
.badge-success { background: rgba(76, 175, 80, 0.15); color: var(--success); }
.badge-warning { background: rgba(255, 152, 0, 0.15); color: var(--warning); }
.badge-error { background: rgba(244, 67, 54, 0.15); color: var(--error); }
.badge-info { background: rgba(33, 150, 243, 0.15); color: var(--info); }

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== ACCORDION ===== */
.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
}
.accordion-header i { transition: transform var(--transition-fast); }
.accordion-item.open .accordion-header i { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.accordion-item.open .accordion-body { max-height: 500px; }
.accordion-body-inner { padding: 0 0 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ===== PROGRESS BAR ===== */
.progress { height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
  border-radius: 3px;
  transition: width var(--transition-slow);
}

/* ===== AVATAR ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-primary);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl { width: 80px; height: 80px; font-size: 28px; }

/* ===== TOOLTIP ===== */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

/* ===== STREAK FLAME ===== */
.streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-gold);
}
.streak i { color: #FF6B35; }

/* ===== CHECKBOX ===== */
.checkbox-wrap { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-default);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.checkbox.checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.checkbox.checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid var(--bg-primary);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
  margin-top: -2px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
  max-width: 400px;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-info { border-left: 3px solid var(--info); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-social { border-left: 3px solid var(--accent-primary); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}
.modal-backdrop.active .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: none;
  background: var(--bg-hover); color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--bg-active); color: var(--text-primary); }

/* ===== CHAT BUBBLE ===== */
.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease;
}
.chat-message.user { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
}
.chat-bubble.ai {
  background: var(--bg-tertiary);
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}
.typing-indicator span {
  width: 8px; height: 8px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.chat-chip {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.chat-chip:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* ===== SPHERE TAG ===== */
.sphere-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== SECTION STYLES (Landing) ===== */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .container { padding: 0 16px; }
}
