/* UnlockIt Theme - Purple/Yellow Colors */

/* Aeonik Fono Font Loading */
@font-face {
  font-family: 'Aeonik Fono';
  src: url('font/unlockit/aeonik-fono/AeonikFono-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Aeonik Fono';
  src: url('font/unlockit/aeonik-fono/AeonikFono-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Aeonik Fono';
  src: url('font/unlockit/aeonik-fono/AeonikFono-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Aeonik Fono';
  src: url('font/unlockit/aeonik-fono/AeonikFono-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

[data-theme="unlockit"] {
  /* Font Family */
  --theme-font-family: 'Aeonik Fono', sans-serif;

  /* Custom Shadow with Side Effects */
  --theme-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 15px rgba(0, 0, 0, 0.08);

  /* Primary Colors (Purple) */
  --theme-primary: #6366f1;        /* indigo-500 */
  --theme-primary-hover: #4f46e5;  /* indigo-600 */
  --theme-primary-soft: #eef2ff;   /* indigo-50 */

  /* Accent Colors (Amber) */
  --theme-accent: #d97706;         /* amber-600 */
  --theme-accent-hover: #b45309;   /* amber-700 */

  /* Surface Colors (Light) */
  --theme-surface: #ffffff;        /* pure white background */
  --theme-surface-elevated: #ffffff; /* pure white cards */
  --theme-surface-sunken: #f8fafc; /* light input backgrounds */

  /* Sidebar Colors (Light for unlockit) */
  --theme-sidebar: #ffffff;        /* white sidebar for unlockit */
  --theme-sidebar-elevated: #f8fafc; /* light gray for hover */

  /* Editor Colors */
  --theme-editor-bg: #1f2937;      /* gray-800 - same as fleck for consistency */

  /* Text Colors */
  --theme-text-primary: #111827;   /* gray-900 */
  --theme-text-secondary: #374151; /* gray-700 */
  --theme-text-tertiary: #6b7280;  /* gray-500 */
  --theme-text-on-dark: #111827;   /* dark text on light sidebar */
  --theme-text-on-dark-secondary: #374151; /* secondary dark text on light sidebar */

  /* Border Colors */
  --theme-border: #e5e7eb;         /* gray-200 - very light borders */
  --theme-border-subtle: #f3f4f6;  /* gray-100 - barely visible borders */

  /* Button Background Colors */
  --theme-button-secondary: #6b7280; /* gray-500 - medium gray for secondary buttons */

  /* Status Colors */
  --theme-danger: #ef4444;         /* red-500 */
  --theme-danger-hover: #dc2626;   /* red-600 - darker red */
  --theme-success: #10b981;        /* green-500 */

  /* Action Button Colors (Rich/Saturated) */
  --theme-action-edit: #2563eb;    /* blue-600 - rich blue */
  --theme-action-delete: #dc2626;  /* red-600 - rich red */
  --theme-action-assign: #059669;  /* emerald-600 - rich green */

  /* Navigation Button Colors */
  --theme-nav-text: #6366f1;      /* indigo-500 - violet for unlockit */
}

/* UnlockIt-specific button styling */
[data-theme="unlockit"] button {
  /* Make primary color buttons pill-shaped */
}

[data-theme="unlockit"] button[style*="background-color: var(--color-primary)"] {
  border-radius: 50px 0 50px 0 !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  font-weight: 300 !important; /* Use light weight like the reference */
  transition: background-color 0.2s ease !important;
}

[data-theme="unlockit"] button[style*="background-color: var(--color-primary)"]:hover {
  background-color: var(--color-primary-hover) !important; /* Darker violet on hover */
}

/* Make action buttons more vibrant on hover in unlockit theme */
[data-theme="unlockit"] .action-edit {
  transition: color 0.2s ease;
}
[data-theme="unlockit"] .action-edit:hover {
  color: #2563eb !important; /* More saturated blue */
}

[data-theme="unlockit"] .action-delete {
  transition: color 0.2s ease;
}
[data-theme="unlockit"] .action-delete:hover {
  color: #dc2626 !important; /* More saturated red */
}

[data-theme="unlockit"] .action-assign {
  transition: color 0.2s ease;
}
[data-theme="unlockit"] .action-assign:hover {
  color: #059669 !important; /* More saturated green */
}

/* Content item hover background for unlockit theme */
[data-theme="unlockit"] .group:hover {
  background-color: #f8fafc !important; /* light gray hover for unlockit */
}

/* Navigation button borders only for unlockit theme */
[data-theme="unlockit"] button[style*="color: var(--color-nav-text)"] {
  border: 1px solid var(--color-nav-text) !important;
}

[data-theme="unlockit"] button[style*="color: var(--color-nav-text)"]:hover {
  color: #4f46e5 !important; /* indigo-600 - lighter purple on hover */
}

/* Tab borders for unlockit theme */
[data-theme="unlockit"] .rounded-t-lg {
  border: 1px solid #9ca3af !important; /* gray-400 - darker */
  border-bottom: none !important;
}

/* Remove thick border from content containers in unlockit theme */
[data-theme="unlockit"] div.divide-y.rounded-lg.overflow-hidden.border {
  border: none !important;
}

[data-theme="unlockit"] div[style*="border-color: var(--color-border)"].border {
  border: none !important;
}

/* Remove left border from dropdown button to avoid double border */
[data-theme="unlockit"] .rounded-e-lg[style*="color: var(--color-nav-text)"] {
  border-left: none !important;
}

/* Hover effects for secondary gray buttons (like Publish) in unlockit theme */
[data-theme="unlockit"] button[style*="background-color: var(--color-button-secondary)"]:hover {
  background-color: #9ca3af !important; /* gray-400 - lighter gray on hover */
  transition: background-color 0.2s ease !important;
}

/* ===== AI LAWYER MOCKUP STYLES ===== */

/* Main container */
[data-theme="unlockit"] .ai-lawyer-mockup {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-color: #f8f9fa;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Empty State */
[data-theme="unlockit"] .empty-state {
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex: 1;
}

[data-theme="unlockit"] .welcome-container {
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}

[data-theme="unlockit"] .welcome-container h1 {
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

[data-theme="unlockit"] .welcome-container p {
  color: #6c757d;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Legal Disclaimer - matches mockup exactly */
[data-theme="unlockit"] .legal-disclaimer {
  margin: 20px;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease-out;
}

[data-theme="unlockit"] .disclaimer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

[data-theme="unlockit"] .disclaimer-header:hover {
  background-color: #fff2a8;
}

[data-theme="unlockit"] .disclaimer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease-out;
}

[data-theme="unlockit"] .disclaimer-icon {
  width: 24px;
  height: 24px;
  background-color: #f39c12;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}

[data-theme="unlockit"] .disclaimer-text {
  font-size: 14px;
  color: #856404;
  font-weight: 500;
  transition: all 0.3s ease-out;
}

[data-theme="unlockit"] .disclaimer-text strong {
  color: #6c5605;
}

[data-theme="unlockit"] .disclaimer-content {
  padding: 0 20px 16px 54px;
  font-size: 13px;
  color: #856404;
  line-height: 1.4;
  max-height: 200px;
  opacity: 1;
  transition: all 0.3s ease-out;
}

/* Main Content Container - matches mockup */
[data-theme="unlockit"] .content-container {
  background-color: #fff;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Chat State */
[data-theme="unlockit"] .chat-state {
  display: flex;
  flex-direction: column;
  padding: 20px;
  flex: 1;
}

[data-theme="unlockit"] .chat-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 400px;
  max-height: calc(100vh - 300px);
}

/* Input Section - matches mockup exactly */
[data-theme="unlockit"] .input-section {
  padding: 30px;
  background-color: #fff;
  border-top: 1px solid #e1e5e9;
}

[data-theme="unlockit"] .input-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* Legal Topics - matches mockup exactly */
[data-theme="unlockit"] .quick-topics-container {
  margin-top: 16px;
}

[data-theme="unlockit"] .topics-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 16px;
  transition: background-color 0.2s ease;
}

[data-theme="unlockit"] .topics-header:hover {
  background-color: #f8f9fa;
}

[data-theme="unlockit"] .topics-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

[data-theme="unlockit"] .topics-toggle {
  font-size: 12px;
  color: #9aa0a6;
  transition: transform 0.3s ease;
}

[data-theme="unlockit"] .quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: top;
  opacity: 1;
}

[data-theme="unlockit"] .topic-button {
  padding: 8px 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="unlockit"] .topic-button:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

/* Override the existing input styling to match mockup */
[data-theme="unlockit"] .ai-lawyer-mockup textarea {
  width: 100%;
  padding: 16px 50px 16px 20px !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 24px !important;
  font-size: 16px !important;
  font-family: inherit !important;
  resize: none !important;
  background-color: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
}

[data-theme="unlockit"] .ai-lawyer-mockup textarea:focus {
  outline: none !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="unlockit"] .ai-lawyer-mockup button[type="submit"] {
  position: absolute !important;
  right: 8px !important;
  top: 8px !important;
  background-color: var(--color-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
}

[data-theme="unlockit"] .ai-lawyer-mockup button[type="submit"]:hover {
  background-color: var(--color-primary-hover) !important;
}

[data-theme="unlockit"] .ai-lawyer-welcome h1 {
  color: var(--theme-text-primary);
}

[data-theme="unlockit"] .legal-disclaimer {
  background-color: #fff3cd; /* Warning yellow background */
  border-color: #ffeaa7;
}

[data-theme="unlockit"] .disclaimer-text {
  color: #856404; /* Dark amber text for readability */
}

/* AI Lawyer page layout and styling */
[data-theme="unlockit"] .ai-lawyer-page {
  padding: 0;
}

[data-theme="unlockit"] .ai-lawyer-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

[data-theme="unlockit"] .ai-lawyer-welcome {
  text-align: center;
  padding: 40px 20px;
  background: var(--theme-surface-elevated);
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--theme-shadow);
}

[data-theme="unlockit"] .ai-lawyer-welcome h1 {
  color: var(--theme-text-primary);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
}

[data-theme="unlockit"] .ai-lawyer-welcome p {
  color: var(--theme-text-secondary);
  font-size: 18px;
  line-height: 1.6;
}

[data-theme="unlockit"] .legal-disclaimer {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--theme-shadow);
}

[data-theme="unlockit"] .legal-topics-container {
  margin-bottom: 30px;
}

[data-theme="unlockit"] .legal-topics-grid {
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

[data-theme="unlockit"] .ai-lawyer-chat-wrapper {
  background: var(--theme-surface-elevated);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--theme-shadow);
  border: 1px solid var(--theme-border-subtle);
}

/* AI Lawyer chat area overrides for light theme */
[data-theme="unlockit"] .ai-lawyer-chat-area,
[data-theme="unlockit"] .ai-lawyer-main-container,
[data-theme="unlockit"] .ai-lawyer-chat-container,
[data-theme="unlockit"] .ai-lawyer-content {
  background-color: #f8f9fa !important;
}

/* Override any dark message backgrounds in AI lawyer */
[data-theme="unlockit"] .ai-lawyer-chat-area,
[data-theme="unlockit"] .ai-lawyer-chat-area .message,
[data-theme="unlockit"] .ai-lawyer-chat-area .bg-slate-800,
[data-theme="unlockit"] .ai-lawyer-chat-area .bg-slate-700 {
  background-color: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
  border-color: var(--color-border) !important;
}

/* AI Lawyer input form styling */
[data-theme="unlockit"] .ai-lawyer-input-section {
  background-color: #ffffff !important;
  border-top: 1px solid #e1e5e9 !important;
}

/* ULTRA NUCLEAR: Target the entire AI lawyer route container */
[data-theme="unlockit"] .bg-gray-50 .input-form-wrapper,
[data-theme="unlockit"] .bg-gray-50 .border-t,
[data-theme="unlockit"] .bg-gray-50 .border-slate-700,
[data-theme="unlockit"] .bg-gray-50 .bg-slate-800,
[data-theme="unlockit"] .bg-gray-50 .bg-slate-900,
[data-theme="unlockit"] .bg-gray-50 .bg-slate-700,
[data-theme="unlockit"] .bg-gray-50 div[style*="background"],
[data-theme="unlockit"] .bg-gray-50 .p-4 {
  background-color: #ffffff !important;
  border-color: #e1e5e9 !important;
}

/* Target AI lawyer route text inputs - match search bar styling */
[data-theme="unlockit"] .bg-gray-50 textarea,
[data-theme="unlockit"] .bg-gray-50 input[type="text"],
[data-theme="unlockit"] .bg-gray-50 input,
[data-theme="unlockit"] .bg-gray-50 .text-white,
[data-theme="unlockit"] .bg-gray-50 .text-slate-200,
[data-theme="unlockit"] .bg-gray-50 [class*="text-slate"] {
  background-color: var(--color-surface-sunken) !important;
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* AI lawyer input focus - proper thin ring */
[data-theme="unlockit"] .bg-gray-50 textarea:focus,
[data-theme="unlockit"] .bg-gray-50 input[type="text"]:focus,
[data-theme="unlockit"] .bg-gray-50 input:focus {
  outline: none !important;
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 1px var(--theme-primary) !important;
}

/* AI lawyer route placeholder text - NUCLEAR OVERRIDE */
[data-theme="unlockit"] .bg-gray-50 textarea::placeholder,
[data-theme="unlockit"] .bg-gray-50 input::placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea::-webkit-input-placeholder,
[data-theme="unlockit"] .bg-gray-50 input::-webkit-input-placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea::-moz-placeholder,
[data-theme="unlockit"] .bg-gray-50 input::-moz-placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea:-ms-input-placeholder,
[data-theme="unlockit"] .bg-gray-50 input:-ms-input-placeholder {
  color: var(--color-text-secondary) !important;
  opacity: 1 !important;
}

/* AI Lawyer greeting container - constrain width like mockup */
[data-theme="unlockit"] .ai-lawyer-greeting {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin: 40px auto;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* AI Lawyer welcome section - matches mockup */
[data-theme="unlockit"] .ai-lawyer-welcome {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="unlockit"] .ai-lawyer-welcome h1 {
  font-size: 32px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 16px;
}

[data-theme="unlockit"] .ai-lawyer-welcome p {
  font-size: 18px;
  color: #6c757d;
  line-height: 1.6;
}

/* Legal topics container - constrain width like mockup */
[data-theme="unlockit"] .legal-topics-container {
  margin: 40px auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="unlockit"] .legal-topics-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 16px;
}

[data-theme="unlockit"] .topics-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
}

[data-theme="unlockit"] .topics-toggle {
  font-size: 12px;
  color: #9aa0a6;
}

[data-theme="unlockit"] .legal-topics-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: top;
  opacity: 1;
}

[data-theme="unlockit"] .legal-topics-grid.collapsed {
  max-height: 0;
  transform: scaleY(0);
  opacity: 0;
  overflow: hidden;
}

[data-theme="unlockit"] .legal-topic-button {
  padding: 8px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="unlockit"] .legal-topic-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Legal disclaimer - constrain width like mockup */
[data-theme="unlockit"] .legal-disclaimer {
  margin: 40px auto !important;
  max-width: 800px !important;
  background: #fff3cd !important;
  border: 1px solid #ffeaa7 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

[data-theme="unlockit"] .legal-disclaimer .disclaimer-icon {
  width: 24px !important;
  height: 24px !important;
  background: #f59e0b !important;
  color: white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

/* Override hardcoded Tailwind ring classes for chat input */
[data-theme="unlockit"] .focus\:ring-2:focus {
  --tw-ring-offset-width: 0px !important;
  --tw-ring-width: 1px !important;
  --tw-ring-color: var(--theme-primary) !important;
}

[data-theme="unlockit"] .focus\:ring-blue-600:focus {
  --tw-ring-color: var(--theme-primary) !important;
}

/* Set proper ring color for search bar too */
[data-theme="unlockit"] .focus\:ring-1:focus {
  --tw-ring-color: var(--theme-primary) !important;
}

/* Override chat input background and colors */
[data-theme="unlockit"] .bg-gray-50 #chat-input,
[data-theme="unlockit"] .bg-gray-50 textarea.bg-slate-700 {
  background-color: var(--color-surface-sunken) !important;
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border) !important;
}

/* Simple approach - add container to entire input area */
[data-theme="unlockit"] .bg-gray-50 > div:last-child {
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 2rem !important;
}

[data-theme="unlockit"] .bg-gray-50 textarea.bg-slate-700::placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea.bg-slate-700::-webkit-input-placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea.bg-slate-700::-moz-placeholder,
[data-theme="unlockit"] .bg-gray-50 textarea.bg-slate-700:-ms-input-placeholder {
  color: var(--color-text-secondary) !important;
  opacity: 1 !important;
}

/* Clean override for the chat input placeholder with !important */
[data-theme="unlockit"] .dark\:placeholder-slate-400::placeholder,
[data-theme="unlockit"] .dark\:placeholder-slate-400::-webkit-input-placeholder,
[data-theme="unlockit"] .dark\:placeholder-slate-400::-moz-placeholder,
[data-theme="unlockit"] .dark\:placeholder-slate-400:-ms-input-placeholder {
  color: var(--color-text-secondary) !important;
  opacity: 1 !important;
}
