/**
 * AI Companion — hero, cards, study modes, quick actions.
 * Matches Improvers / Daily 30 aesthetics: gradient hero, section heads, even grids.
 */

.ai-comp-main .page-content {
  padding-bottom: var(--app-space-xl);
}

/* ----- Hero (gradient block, badges) ----- */
.ai-comp-hero {
  text-align: center;
  padding: var(--app-space-xl) var(--app-space);
  margin-bottom: var(--app-space-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(168, 85, 247, 0.04) 100%);
  border-radius: var(--app-radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.18);
}
.ai-comp-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--app-radius-lg);
  background: var(--app-primary-soft);
  border: 1px solid rgba(99, 102, 241, 0.22);
  margin-bottom: var(--app-space-md);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}
.ai-comp-hero-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.ai-comp-hero-title {
  font-size: var(--app-text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--app-text);
  margin: 0 0 var(--app-space-sm);
  line-height: 1.25;
}
.ai-comp-hero-desc {
  font-size: var(--app-text-base);
  color: var(--app-text-secondary);
  line-height: 1.55;
  margin: 0 auto var(--app-space-md);
  max-width: 38ch;
}
.ai-comp-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--app-space-sm);
  justify-content: center;
}
.ai-comp-badge {
  font-size: var(--app-text-xs);
  font-weight: 600;
  color: var(--app-primary);
  background: rgba(99, 102, 241, 0.12);
  padding: 6px 12px;
  border-radius: var(--app-radius-md);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ----- Cards (exam, study mode, quick actions) ----- */
.ai-comp-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border-soft);
  border-radius: var(--app-radius-lg);
  padding: var(--app-space-lg);
  margin-bottom: var(--app-space-lg);
  box-shadow: var(--app-shadow-card);
}
.ai-comp-card-label {
  display: block;
  font-size: var(--app-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--app-text-muted);
  margin-bottom: var(--app-space-sm);
}
.ai-comp-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  font-size: var(--app-text-base);
  background: var(--app-bg);
  color: var(--app-text);
  transition: border-color var(--app-duration-fast) var(--app-ease);
}
.ai-comp-select:focus {
  border-color: var(--app-primary);
  outline: none;
}
.ai-comp-card-hint {
  font-size: var(--app-text-xs);
  color: var(--app-text-muted);
  margin: var(--app-space-sm) 0 0;
}

/* Section heading + description (Study mode, Quick actions) */
.ai-comp-section-head {
  font-size: var(--app-text-base);
  font-weight: 700;
  color: var(--app-text);
  margin: 0 0 var(--app-space-xs);
}
.ai-comp-section-desc {
  font-size: var(--app-text-sm);
  color: var(--app-text-secondary);
  line-height: 1.45;
  margin: 0 0 var(--app-space-md);
}

/* ----- Study mode: 3 equal pills, no overflow ----- */
.ai-comp-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--app-space-sm);
}
.ai-comp-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  border-radius: var(--app-radius-md);
  font-size: var(--app-text-sm);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  background: var(--app-bg);
  color: var(--app-text-secondary);
  border: 1px solid var(--app-border);
  transition: background var(--app-duration-fast) var(--app-ease), color var(--app-duration-fast) var(--app-ease), border-color var(--app-duration-fast) var(--app-ease);
  min-height: 48px;
}
.ai-comp-mode:hover {
  background: var(--app-primary-soft);
  color: var(--app-primary);
  border-color: rgba(99, 102, 241, 0.35);
}
.ai-comp-mode.active {
  background: var(--app-gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.35);
}

/* ----- Quick actions: even grid (2 cols mobile, 3 cols tablet+) ----- */
.ai-comp-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--app-space-sm);
}
.ai-comp-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  font-size: var(--app-text-sm);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  background: var(--app-bg);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-md);
  color: var(--app-text-secondary);
  transition: background var(--app-duration-fast) var(--app-ease), color var(--app-duration-fast) var(--app-ease), border-color var(--app-duration-fast) var(--app-ease);
  min-height: 48px;
}
.ai-comp-quick-btn:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
  background: var(--app-primary-soft);
}

/* CTA uses .btn-primary-block from responsive-content */
.ai-comp-cta {
  margin-top: var(--app-space-md);
}

@media (min-width: 480px) {
  .ai-comp-hero {
    padding: var(--app-space-xl) var(--app-space-lg);
  }
  .ai-comp-quick {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 600px) {
  .ai-comp-quick {
    grid-template-columns: repeat(3, 1fr);
  }
  .ai-comp-mode {
    padding: 16px;
  }
  .ai-comp-quick-btn {
    padding: 16px;
  }
}
