/* =========================================================
   TamilAI FONT STYLE SYSTEM
   ---------------------------------------------------------
   Global UI font selector
   Code blocks remain monospace.
   ========================================================= */
/* =========================================================
   1. FONT IMPORTS
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap");
/* =========================================================
   2. DEFAULT FONT
   ========================================================= */
:root {
  --tai-font-family:
    "Segoe UI", "Noto Sans Tamil", "Noto Sans", Arial, sans-serif;
}
/* =========================================================
   3. APPLY SELECTED FONT
   ========================================================= */
/* =========================================================
   APPLY SELECTED FONT TO TAMILAI UI
   ========================================================= */
body,
button,
input,
textarea,
select,
.app-container,
.workspace,
.main-chat,
.conversation-workspace,
.chat-box,
.chat-row,
.ai-message,
.user-message,
.message-content,
.message-text,
.composer,
.composer-text,
.profile-modal-card,
.profile-modal-card * {
  font-family: var(--tai-font-family) !important;
}
/* =========================================================
   4. KEEP PROGRAMMING CODE MONOSPACE
   ========================================================= */
pre,
pre *,
code,
code *,
.tai-code-wrapper,
.tai-code-wrapper *,
.tai-code-scroll,
.tai-code-scroll *,
.tai-line-numbers,
.tai-line-number {
  font-family:
    "Cascadia Code", "JetBrains Mono", "Fira Code", Consolas, "Courier New",
    monospace !important;
}
/* =========================================================
   5. FONT OPTIONS CARD
   ========================================================= */
.tai-font-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
/* =========================================================
   6. FONT OPTION
   ========================================================= */
.tai-font-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}
/* =========================================================
   7. HOVER
   ========================================================= */
.tai-font-option:hover {
  background: var(--surface-hover);
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}
/* =========================================================
   8. SELECTED
   ========================================================= */
.tai-font-option.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
/* =========================================================
   9. FONT PREVIEW
   ========================================================= */
.tai-font-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 42px;
  border-radius: 9px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  border: 1px solid var(--border);
}
/* =========================================================
   10. FONT INFORMATION
   ========================================================= */
.tai-font-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.tai-font-info strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.tai-font-info small {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
}
/* =========================================================
   11. DARK THEME
   ========================================================= */
body.dark-theme .tai-font-option {
  background: var(--surface);
  border-color: var(--border);
}
body.dark-theme .tai-font-option:hover {
  background: var(--surface-hover);
}
body.dark-theme .tai-font-option.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: #60a5fa;
}
/* =========================================================
   12. MOBILE
   ========================================================= */
@media screen and (max-width: 600px) {
  .tai-font-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tai-font-option {
    min-height: 58px;
    padding: 9px 10px;
  }
  .tai-font-preview {
    flex-basis: 44px;
    width: 44px;
    height: 38px;
    font-size: 18px;
  }
  .tai-font-info strong {
    font-size: 12px;
  }
  .tai-font-info small {
    font-size: 10px;
  }
}
/* =========================================================
   13. REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .tai-font-option {
    transition: none;
  }
}
