/* LegalMoov Mobile-First CSS */

/* ========== 1. Variables & Base Setup ========== */
:root {
  /* Brand Colors */
  --primary: #8CC63F; /* LegalMoov green */
  --primary-light: #d9ebbd;
  --primary-dark: #76a935;
  --secondary: #f8f9fa;
  
  /* Text Colors */
  --text-primary: #202124;
  --text-secondary: #5f6368;
  
  /* UI Colors */
  --success: #34a853;
  --info: #4285f4;
  --warning: #fbbc05;
  --danger: #ea4335;
  --border: #e0e0e0;
  --bg-light: #f5f7fa;
  
  /* Effects */
  --shadow: 0 2px 5px rgba(0,0,0,0.1);
  --transition: all 0.2s ease-in-out;
  
  /* Layout */
  --sidebar-width-mobile: 260px;
  --sidebar-width-tablet: 220px;
  --sidebar-width-desktop: 260px;
  
  /* Typography */
  --fs-base: 14px;
  --fs-small: 12px;
  --fs-smaller: 11px;
}

/* ========== 2. Global Reset & Foundation ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-base);
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.5;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  height: auto;
}

button, input {
  font-family: inherit;
}

/* ========== 8. Stage Indicators ========== */
.stage-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stage-indicator {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: var(--fs-small);
  border-radius: 16px;
  background-color: var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.stage-indicator.active {
  background-color: var(--primary);
  color: white;
}

.stage-indicator.completed {
  background-color: var(--success);
  color: white;
}

/* ========== 9. Welcome Header ========== */
.welcome-header {
  text-align: center;
  padding: 32px 16px;
  margin: 16px 0;
}

.welcome-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.welcome-header h2 .highlight {
  color: var(--primary);
}

.welcome-header p {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  margin: 0 auto;
  line-height: 1.5;
}

.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.welcome-button {
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease-in-out;
}

.primary-button {
  background-color: var(--primary);
  color: white;
  border: none;
}

.primary-button:hover {
  background-color: var(--primary-dark);
}

.secondary-button {
  background-color: var(--secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background-color: #f0f0f0;
}

/* ========== 10. Buttons ========== */
.btn-legalmoov {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 500;
  transition: var(--transition);
  font-size: var(--fs-base);
}

.btn-legalmoov:hover {
  background-color: var(--primary-dark);
  color: white;
}

.btn-send {
  background-color: var(--primary);
  color: white;
}

/* ========== 11. Progress Bar ========== */
.progress-container {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.progress-bar-custom {
  height: 6px;
  background-color: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-value {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ========== 12. Typing Indicator ========== */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: white;
  border-radius: 16px;
  width: fit-content;
  box-shadow: var(--shadow);
}

.typing-indicator span {
  height: 8px;
  width: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  opacity: 0.6;
}

.typing-indicator span:nth-child(1) { animation: pulse 1s infinite 0s; }
.typing-indicator span:nth-child(2) { animation: pulse 1s infinite 0.2s; }
.typing-indicator span:nth-child(3) { animation: pulse 1s infinite 0.4s; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.6; }
}

/* ========== 14. Survey Modal ========== */
#surveyModal .modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#surveyModal .modal-body {
  padding: 24px;
}

#surveyModal h4 {
  color: var(--text-primary);
  font-weight: 600;
}

#surveyModal p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Button styling */
#surveyModal .btn-legalmoov {
  padding: 10px 24px;
  font-weight: 500;
  transition: all 0.2s ease;
}

#surveyModal .btn-outline-secondary {
  padding: 10px 24px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

#surveyModal .btn-outline-secondary:hover {
  background-color: #f5f5f5;
}

#survey-prompt-section {
  margin-top: 16px;
  animation: fadeIn 0.5s ease;
}

#survey-prompt-section .panel-header {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

#survey-prompt-section .panel-body {
  padding: 16px;
}

#survey-prompt-section p {
  color: var(--text-secondary);
}

/* ========== 16. Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out, opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: scale(1);
  opacity: 1;
}


#legal-context {
  white-space: pre-line;   /* turn \n into visual line-breaks */
  line-height: 1.4;        /* a little breathing room */
  max-height: 75vh;        /* optional—scroll instead of stretching forever */
  overflow-y: auto;        /*   ”    */
}




/* testing out styling legal context */


/* ------- generic item look -------- */
.legal-item        { padding-left: .25rem; position: relative; }
.legal-item::marker{ color:#9ca3af; }  /* grey bullets */
.legal-item cite   { display:inline-block;
                     font-size:.75rem;
                     color:#6b7280;
                     margin-left:.25rem; }

/* ------- type-specific ribbons ----- */
.legal-item.statute::before,
.legal-item.case-law::before,
.legal-item.regulation::before,
.legal-item.article::before,
.legal-item.precedent::before {
  content:'';
  position:absolute;
  left:-.75rem; top:.4rem;           /* sits over the bullet */
  width:.4rem; height:.4rem; border-radius:50%;
}
.legal-item.statute::before     { background:#3b82f6; } /* blue  */
.legal-item.case-law::before    { background:#10b981; } /* green */
.legal-item.regulation::before  { background:#f59e0b; } /* amber */
.legal-item.article::before     { background:#ef4444; } /* red   */
.legal-item.precedent::before   { background:#8b5cf6; } /* violet*/

/* ------- highlight query terms ----- */
.legal-highlight { background:#fff3cd; padding:0 .15rem; }

/* ------- tiny helpers -------------- */
.legal-empty   { color:#6b7280; font-style:italic; }
.legal-loading { animation:pulse 1.2s infinite; }
@keyframes pulse{ 0%{opacity:.2;}50%{opacity:.6;}100%{opacity:.2;} }
