/* ============================================
   INNATEENGINE - COMPONENT STYLES
   Reusable UI Components
   ============================================ */

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: 
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  border-radius: var(--radius-xl);
}

/* Primary Button */
.btn-primary {
  background: var(--brand-gradient);
  color: white;
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

/* Secondary Button */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-emphasis);
  transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--hover-overlay);
  color: var(--text-primary);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline:hover {
  background: rgba(var(--brand-primary-rgb), 0.1);
  transform: translateY(-2px);
}

/* Icon Button */
.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

.btn-icon.btn-sm {
  padding: var(--space-2);
}

.btn-icon.btn-lg {
  padding: var(--space-4);
}

/* Button Icon */
.btn svg,
.btn-icon svg {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* Full Width Button */
.btn-block {
  width: 100%;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: 
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--border-emphasis);
  box-shadow: var(--shadow-glow-sm);
}

/* Glass Card */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
}

/* Elevated Card */
.card-elevated {
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-lg);
}

/* Interactive Card */
.card-interactive {
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border-color: var(--brand-primary);
}

/* Card Padding Variants */
.card-sm {
  padding: var(--space-4);
}

.card-lg {
  padding: var(--space-8);
}

/* ==========================================
   BENTO GRID
   ========================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.bento-item {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: 
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
  overflow: hidden;
  position: relative;
}

.bento-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.bento-item:hover {
  transform: translateY(-4px);
  border-color: var(--border-emphasis);
  box-shadow: var(--shadow-glow);
}

.bento-item:hover::before {
  opacity: 0.05;
}

/* Bento Sizes */
.bento-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-item.wide {
  grid-column: span 2;
}

.bento-item.tall {
  grid-row: span 2;
}

/* Responsive Bento */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-item.large,
  .bento-item.wide {
    grid-column: span 1;
  }
  
  .bento-item.large {
    grid-row: span 1;
  }
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.badge-primary {
  background: rgba(var(--brand-primary-rgb), 0.15);
  color: var(--brand-primary-light);
  border-color: rgba(var(--brand-primary-rgb), 0.3);
}

.badge-success {
  background: rgba(var(--brand-secondary-rgb), 0.15);
  color: var(--brand-secondary-light);
  border-color: rgba(var(--brand-secondary-rgb), 0.3);
}

.badge-lg {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* Animated Dot */
.badge-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* ==========================================
   FEATURE ICON
   ========================================== */
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--brand-gradient);
  border-radius: var(--radius-xl);
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-icon-lg {
  width: 72px;
  height: 72px;
  font-size: 2rem;
  border-radius: var(--radius-2xl);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-icon-lg svg {
  width: 36px;
  height: 36px;
}

/* ==========================================
   AVATAR
   ========================================== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: white;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  overflow: hidden;
}

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

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--text-2xl);
}

/* Avatar Group */
.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  border: 3px solid var(--bg-primary);
  margin-left: -12px;
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ==========================================
   INPUT FIELDS
   ========================================== */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: 
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
}

.input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
}

/* Input with Icon */
.input-group {
  position: relative;
}

.input-group .input {
  padding-left: var(--space-12);
}

.input-group-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.input-group-icon svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   STAT CARDS
   ========================================== */
.stat {
  padding-left: var(--space-6);
  border-left: 2px solid var(--border-default);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* ==========================================
   TESTIMONIAL CARD
   ========================================== */
.testimonial {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}

.testimonial-content {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.testimonial-title {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ==========================================
   TOOLTIP
   ========================================== */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: 
    opacity var(--transition-fast),
    transform var(--transition-fast);
  z-index: var(--z-tooltip);
  pointer-events: none;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* ==========================================
   DIVIDER
   ========================================== */
.divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-8) 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--border-default);
  margin: 0 var(--space-4);
}

/* ==========================================
   PROGRESS BAR
   ========================================== */
.progress {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* ==========================================
   SPINNER / LOADER
   ========================================== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

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

/* ==========================================
   LINK STYLES
   ========================================== */
.link {
  color: var(--brand-primary);
  font-weight: var(--font-medium);
  transition: color var(--transition-fast);
}

.link:hover {
  color: var(--brand-primary-light);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.link-arrow svg {
  width: 1em;
  height: 1em;
  transition: transform var(--transition-fast);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* ==========================================
   SECTION HEADER
   ========================================== */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-16);
}

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
}

.section-description {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
