/* Main Styles for Image Analysis Tool */

/* Global Styles */
:root {
  /* Alpha Colors */
  --alpha-blue: #40a5d8;
  --alpha-green: #b9f99f;
  --alpha-red: #f15532;
  --alpha-grey: #888b97;
  --alpha-pink: #e80047;
  --alpha-yellow: #feec00;
  --alpha-orange-info: #f8a400;
  --alpha-violet: #7b4ef3;
  --alpha-white: #ffffff;

  /* Background Colors */
  --bg-primary: #fafaf8;
  --bg-secondary: #f5f5f2;
  --bg-cool: #f0f0ed;
  --bg-surface: #ffffff;
  --bg-overlay: rgba(250, 250, 248, 0.9);
  --header-bg: #141023;
  --hero-text-color: #141023;
  --hero-font-family: 'Noto Serif', serif;
  --hero-font-weight: bold;
  --hero-font-size: 32px;
  --hero-line-height: 115%;
  --hero-letter-spacing: -6%;
  --hero-subtitle-color: #141023;
  --hero-subtitle-font-family: 'Inter', sans-serif;
  --hero-subtitle-font-weight: normal;
  --hero-subtitle-font-size: 16px;
  --hero-subtitle-line-height: 131%;
  --hero-subtitle-letter-spacing: -2%;

  /* Text Colors */
  --text-primary: #1d1d1f;
  --text-secondary: #424245;
  --text-placeholder: #86868b;
  --text-disabled: #c7c7cc;
  --text-critical: var(--alpha-red);
  --text-warning: var(--alpha-orange-info);
  --text-success: var(--alpha-green);
  --text-accent: var(--alpha-blue);
  --text-neutral: var(--alpha-grey);
  --text-inactive: #c7c7cc;

  /* Border Colors */
  --border-primary: #e8e8e5;
  --border-secondary: #d8d8d5;
  --border-critical: var(--alpha-red);
  --border-warning: var(--alpha-orange-info);
  --border-success: var(--alpha-green);
  --border-accent: var(--alpha-blue);

  /* Shadow Sizes */
  --shadow-sm: 0px 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0px 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0px 8px 16px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0px 16px 24px rgba(0, 0, 0, 0.25);
  --shadow-2xl: 0px 24px 32px rgba(0, 0, 0, 0.25);
  --shadow-3xl: 0px 32px 48px rgba(0, 0, 0, 0.25);

  /* Component Colors */
  --card-bg: var(--bg-surface);
  --input-bg: var(--bg-surface);
  --input-border: var(--border-primary);
  --button-primary-bg: var(--alpha-blue);
  --button-primary-text: var(--alpha-white);
  --button-secondary-bg: var(--bg-cool);
  --button-secondary-text: var(--text-primary);
  --button-disabled-bg: var(--bg-cool);
  --button-disabled-text: var(--text-disabled);

  /* Transitions */
  --transition-base: all 0.2s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --progress-colors: var(--alpha-red), var(--alpha-green), var(--alpha-violet),
    var(--alpha-pink), var(--alpha-yellow), var(--alpha-orange-info);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
}

/* Typography */
h1 {
  font-family: 'Noto Serif', serif;
}

/* Ensure the html element also has the light background */
html {
  min-height: 100%;
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
}

/* Ensure proper box model */
* {
  box-sizing: border-box;
}

/* Add a pseudo-element to ensure complete background coverage */
html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary) url('/static/images/background-image.png')
    no-repeat center center;
  background-size: cover;
  z-index: -1;
  pointer-events: none;
}

/* Alternative background for body as fallback */
body {
  background: var(--bg-primary) url('/static/images/background-image.png')
    no-repeat center center fixed;
  background-size: cover;
}

/* Hide scrollbars and ensure full coverage */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Ensure background extends beyond viewport */
html,
body {
  min-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* Header Styles */
.header {
  background-color: var(--header-bg);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  width: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.header-logo img {
  height: 2.5rem;
  width: auto;
  max-width: 120px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.header-nav a:hover {
  color: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.1);
}

.header-menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  position: relative;
  z-index: 10;
}

.header-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 30px;
  height: 16px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 11;
}

.hamburger-lines span {
  display: block !important;
  width: 100% !important;
  height: 1px !important;
  background-color: #ffffff !important;
  border-radius: 0.5px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 12;
  min-height: 1px !important;
  max-height: 1px !important;
  box-sizing: border-box !important;
}

/* Force identical rendering for both lines */
.hamburger-lines span:nth-child(1) {
  height: 1.1px !important;
  min-height: 1.1px !important;
  max-height: 1.1px !important;
  background-color: #ffffff !important;
}

.hamburger-lines span:nth-child(2) {
  height: 1px !important;
  min-height: 1px !important;
  max-height: 1px !important;
  background-color: #ffffff !important;
}

/* Responsive header */
@media (max-width: 768px) {
  .header-container {
    padding: 0.5rem 1rem;
  }

  .header-logo img {
    height: 2rem;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 0.75rem;
  }

  .header-logo img {
    height: 1.75rem;
    max-width: 80px;
  }
}

/* Card Styles */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--bg-cool);
  border-bottom: 1px solid var(--border-primary);
  padding: 1rem 1.25rem;
}

.card-body {
  padding: 1.25rem;
  background-color: var(--bg-surface);
}

/* Form Controls */
.form-control {
  background-color: var(--input-bg);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 12px 16px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 2px rgba(29, 47, 197, 0.2);
}

.form-control::placeholder {
  color: var(--text-placeholder);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  transition: var(--transition-smooth);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: var(--transition-smooth);
}

.btn:hover::after {
  opacity: 1;
}

.btn:disabled {
  background-color: var(--button-disabled-bg);
  color: var(--button-disabled-text);
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--button-primary-bg);
  color: var(--button-primary-text) !important;
  border-color: var(--button-primary-bg);
}

.btn-secondary {
  background-color: var(--button-secondary-bg);
  color: var(--button-secondary-text);
}

.btn-outline-light {
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  background-color: transparent;
}

.btn-outline-light:hover {
  background-color: var(--bg-cool);
  border-color: var(--border-primary);
  color: var(--text-primary);
}

/* Upload Area Styles */
.upload-area {
  border: 2px dashed var(--border-primary);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  background-color: var(--bg-secondary);
  transition: var(--transition-base);
  cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--border-brand);
  background-color: var(--bg-cool);
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--text-brand-light);
  margin-bottom: 1rem;
}

/* Results Page Styles */
.results-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.analyzed-image {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.design-code-badge {
  background-color: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.results-tabs .nav-link {
  color: var(--secondary-color);
  border: none;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.results-tabs .nav-link.active {
  color: var(--primary-color);
  background-color: transparent;
  border-bottom: 3px solid var(--primary-color);
}

.image-card {
  transition: transform 0.3s ease;
  height: 100%;
}

.image-card:hover {
  transform: translateY(-5px);
}

.analyzed-image-thumbnail {
  height: 150px;
  object-fit: contain;
  background-color: #f8f9fa;
}

/* Loading Indicator */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-overlay);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1050;
}

.spinner-border {
  color: var(--alpha-blue);
}

/* Footer Styles */
.footer {
  background-color: transparent;
  border-top: none;
  padding: 0 0 1rem 0;
}

.footer h4,
.footer h5 {
  color: var(--text-primary);
  font-weight: 600;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-base);
}

.footer a:hover {
  color: var(--alpha-blue);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .btn {
    padding: 0.625rem 1.25rem;
  }

  .card-body {
    padding: 1rem;
  }

  .upload-area {
    padding: 1.5rem;
  }

  .feature-icon {
    font-size: 1.75rem;
  }
}

/* Animation for elements */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-cool);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--alpha-blue);
}

/* About page styles */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.feature-list i {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-right: 1rem;
  margin-top: 0.25rem;
}

.feature-list h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-list p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  padding: 16px;
  border: none;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.alert-critical {
  background-color: rgba(241, 85, 50, 0.1);
  color: var(--text-critical);
}

.alert-warning {
  background-color: rgba(248, 164, 0, 0.1);
  color: var(--text-warning);
}

.alert-success {
  background-color: rgba(36, 200, 130, 0.1);
  color: var(--text-success);
}

.alert-info {
  background-color: rgba(29, 47, 197, 0.1);
  color: var(--text-accent);
}

/* Modal Styles */
.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
}

.modal-header {
  border-bottom: 1px solid var(--border-primary);
  padding: 16px 24px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-primary);
  padding: 16px 24px;
}

.modal-title {
  color: var(--text-primary);
}

/* Toast Styles */
.toast {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.toast-critical {
  border-left: 4px solid var(--border-critical);
}

.toast-warning {
  border-left: 4px solid var(--border-warning);
}

.toast-success {
  border-left: 4px solid var(--border-success);
}

.toast-info {
  border-left: 4px solid var(--border-accent);
}

/* Badge Styles - Updated */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  min-width: 24px;
  height: 24px;
}

.badge-critical {
  background-color: var(--alpha-red);
  color: var(--alpha-white);
}

.badge-warning {
  background-color: var(--alpha-orange-info);
  color: var(--alpha-white);
}

.badge-success {
  background-color: var(--alpha-green);
  color: var(--alpha-white);
}

.badge-accent {
  background-color: var(--alpha-blue);
  color: var(--alpha-white);
}

.badge-neutral {
  background-color: var(--alpha-grey);
  color: var(--alpha-white);
}

.badge-inactive {
  background-color: var(--text-disabled);
  color: var(--alpha-white);
}

/* Toggle Switch - Updated */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-cool);
  transition: var(--transition-smooth);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: var(--alpha-white);
  transition: var(--transition-smooth);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--alpha-blue);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

input:disabled + .toggle-slider {
  background-color: var(--bg-surface);
  cursor: not-allowed;
}

/* Progress Indicators - Updated */
.progress-circular {
  position: relative;
  width: 40px;
  height: 40px;
}

.progress-circular-ring {
  stroke: var(--alpha-blue);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-circular-bg {
  stroke: var(--bg-cool);
}

.progress-circular-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Loading Spinners - Updated */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--bg-cool);
  border-top-color: var(--alpha-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-dots {
  display: flex;
  gap: 4px;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  background-color: var(--alpha-blue);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.4s;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal - Updated */
.modal {
  background-color: rgba(13, 13, 20, 0.8);
}

.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  color: var(--text-secondary);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-primary);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-cool);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Navigation - Updated */
.nav-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-primary);
  padding: 16px 0;
}

.nav-brand {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-item.active {
  color: var(--text-primary);
}

/* Navigation Arrow Buttons */
.nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.nav-arrow:hover {
  background-color: var(--bg-cool);
  border-color: var(--border-secondary);
}

.nav-arrow:disabled {
  background-color: var(--bg-surface);
  border-color: var(--border-primary);
  color: var(--text-disabled);
  cursor: not-allowed;
}

/* Enhanced Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.form-label .optional {
  color: var(--text-secondary);
  font-weight: normal;
  margin-left: 4px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control {
  padding-left: 40px;
}

.input-group-icon {
  position: absolute;
  left: 12px;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-group-text {
  position: absolute;
  right: 12px;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0;
}

.char-count {
  position: absolute;
  right: 12px;
  bottom: -20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Form States */
.form-control.is-valid {
  border-color: var(--border-success);
}

.form-control.is-warning {
  border-color: var(--border-warning);
}

.form-control.is-invalid {
  border-color: var(--border-critical);
}

/* Range Slider Styles */
.range-slider {
  position: relative;
  padding: 16px 0;
}

.range-slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.range-slider-value {
  color: var(--text-secondary);
  font-size: 14px;
}

.range-slider-track {
  height: 2px;
  background-color: var(--bg-cool);
  border-radius: 1px;
  position: relative;
}

.range-slider-progress {
  position: absolute;
  height: 100%;
  background-color: var(--alpha-blue);
  border-radius: 1px;
}

.range-slider-handle {
  width: 16px;
  height: 16px;
  background-color: var(--alpha-blue);
  border: 2px solid var(--alpha-white);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.range-slider-handle:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.range-slider.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.range-slider.disabled .range-slider-progress {
  background-color: var(--text-disabled);
}

.range-slider.disabled .range-slider-handle {
  background-color: var(--text-disabled);
}

/* Textarea with Character Count */
.textarea-wrapper {
  position: relative;
}

.textarea-wrapper textarea {
  padding-bottom: 24px;
  resize: none;
  min-height: 120px;
}

.textarea-wrapper .char-count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

.input-with-button .form-control {
  padding-right: 40px;
}

.input-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.input-button:hover {
  color: var(--text-primary);
}

/* Drawer Styles */
.drawer {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drawer-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-title {
  color: var(--text-primary);
  font-weight: 500;
  margin: 0;
}

.drawer-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.drawer-close {
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drawer-close:hover {
  color: var(--text-primary);
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
}

.dropdown-toggle:hover {
  border-color: var(--border-secondary);
}

.dropdown-toggle.active {
  border-color: var(--alpha-blue);
}

.dropdown-toggle.error {
  border-color: var(--border-critical);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  margin-top: 4px;
  padding: 8px 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.dropdown-item {
  padding: 8px 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown-item:hover {
  background-color: var(--bg-cool);
}

.dropdown-item.selected {
  background-color: var(--bg-cool);
}

.dropdown-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tag Styles */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-cool);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1;
  transition: var(--transition-smooth);
}

.tag-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-close {
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 2px;
  margin-left: 2px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-close:hover {
  color: var(--text-primary);
}

.tag.selected {
  background-color: var(--alpha-blue);
  border-color: var(--alpha-blue);
  color: var(--alpha-white);
}

.tag.disabled {
  background-color: var(--bg-surface);
  border-color: var(--border-primary);
  color: var(--text-disabled);
  cursor: not-allowed;
}

/* Tab Menu Styles */
.tab-menu {
  display: flex;
  gap: 4px;
  padding: 4px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
}

.tab-item {
  padding: 8px 16px;
  color: var(--text-primary);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-item:hover {
  background-color: var(--bg-cool);
}

.tab-item.active {
  background-color: var(--bg-cool);
}

.tab-item.disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}

.tab-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-item-count {
  background-color: var(--bg-cool);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}

/* Underline Style */
.underline-menu {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 4px;
}

.underline-item {
  padding: 8px 0;
  color: var(--text-primary);
  background: none;
  border: none;
  position: relative;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.underline-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--alpha-blue);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.underline-item.active::after {
  transform: scaleX(1);
}

.underline-item.disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}

.underline-item-count {
  color: var(--text-secondary);
  margin-left: 4px;
}

/* Circular Progress and Charts */
.donut-chart {
  position: relative;
  width: 120px;
  height: 120px;
}

.donut-chart-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.donut-chart-segment {
  stroke-width: 12;
  fill: transparent;
}

.donut-chart-bg {
  stroke: var(--bg-cool);
}

.donut-chart-progress {
  stroke: var(--alpha-blue);
  transition: stroke-dasharray 0.3s ease;
}

.donut-chart-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-chart-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.donut-chart-total {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Multi-segment Donut Chart */
.multi-segment-chart .donut-chart-segment {
  transition: stroke-dasharray 0.3s ease;
}

.multi-segment-chart .segment-critical {
  stroke: var(--alpha-red);
}

.multi-segment-chart .segment-warning {
  stroke: var(--alpha-orange-info);
}

.multi-segment-chart .segment-success {
  stroke: var(--alpha-green);
}

.multi-segment-chart .segment-accent {
  stroke: var(--alpha-blue);
}

/* Loading Indicators */
.loading-ring {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-cool);
  border-radius: 50%;
  border-top-color: var(--alpha-blue);
  animation: spin 1s linear infinite;
}

.loading-ring.sm {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.loading-ring.lg {
  width: 64px;
  height: 64px;
  border-width: 4px;
}

.loading-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.loading-dots .dot {
  width: 8px;
  height: 8px;
  background-color: var(--alpha-blue);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

.loading-dots .dot:nth-child(4) {
  animation-delay: 0.6s;
}

.loading-dots .dot:nth-child(5) {
  animation-delay: 0.8s;
}

/* Progress States */
.progress-state {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-state-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.progress-state-critical {
  background-color: rgba(241, 85, 50, 0.1);
  color: var(--alpha-red);
}

.progress-state-warning {
  background-color: rgba(248, 164, 0, 0.1);
  color: var(--alpha-orange-info);
}

.progress-state-success {
  background-color: rgba(36, 200, 130, 0.1);
  color: var(--alpha-green);
}

.progress-state-accent {
  background-color: rgba(29, 47, 197, 0.1);
  color: var(--alpha-blue);
}

/* Radio Buttons and Checkboxes */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none; /* Safari */
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-primary);
  background-color: var(--bg-surface);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.form-check-input:checked {
  background-color: var(--alpha-blue);
  border-color: var(--alpha-blue);
}

.form-check-input:disabled {
  background-color: var(--bg-surface);
  border-color: transparent;
  cursor: not-allowed;
}

.form-check-input:not(:disabled) {
  border-color: #999;
}

.form-check-input[type='radio'] {
  border-radius: 50%;
}

.form-check-input[type='radio']:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: var(--alpha-white);
  border-radius: 50%;
}

.form-check-input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 6px;
  height: 10px;
  border: 2px solid var(--alpha-white);
  border-width: 0 2px 2px 0;
}

/* Fallback for browsers that don't render ::after on inputs (e.g., Safari) */
.form-check-input[type='checkbox']:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3.5 8.5l3 3 6-6'/%3e%3c/svg%3e");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}

.form-check-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* Form Group Spacing */
.form-group + .form-group {
  margin-top: 24px;
}

/* Input States */
.form-control:focus {
  background-color: var(--bg-surface);
  border-color: var(--alpha-blue);
  box-shadow: 0 0 0 2px rgba(29, 47, 197, 0.2);
}

.form-control.is-invalid {
  border-color: var(--alpha-red);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 2px rgba(241, 85, 50, 0.2);
}

.form-control.is-warning {
  border-color: var(--alpha-orange-info);
}

.form-control.is-warning:focus {
  box-shadow: 0 0 0 2px rgba(248, 164, 0, 0.2);
}

.form-control.is-success {
  border-color: var(--alpha-green);
}

.form-control.is-success:focus {
  box-shadow: 0 0 0 2px rgba(36, 200, 130, 0.2);
}

/* Form Feedback Messages */
.form-text {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 14px;
}

.form-text.text-danger {
  color: var(--alpha-red);
}

.form-text.text-warning {
  color: var(--alpha-orange-info);
}

.form-text.text-success {
  color: var(--alpha-green);
}

/* Input Groups */
.input-group {
  position: relative;
  display: flex;
}

.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--bg-cool);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
}

.input-group > :first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > :last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > :not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* Form Help Text */
.form-help {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

/* Character Counter */
.char-counter {
  position: absolute;
  right: 12px;
  bottom: -20px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Flex Container for Results Sections */
.results-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* Space between sections */
}

/* Style for each section card */
.section-card {
  flex: auto;
  max-width: 400px; /* Limit the max width for better readability */
  background: var(--bg-cool);
  border-radius: 8px;
  padding: 1rem 0 0 1rem;
  box-shadow: var(--shadow-md);
}

/* Ensure the row inside each section doesn't add extra margins */
.section-card .row {
  margin: 0;
}

/* Adjust the col-md classes to fit within the flex layout */
.section-card .col-md-4 {
  flex: 1 1 100%; /* Ensure cards inside take full width of the section */
  max-width: 100%;
  padding: 0.5rem;
}

/* Flex container for Image Labels to display cards side by side */
.image-labels-flex {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping to ensure side-by-side layout */
  gap: 1rem; /* Space between cards */
  justify-content: flex-start; /* Align cards to the start */
  width: 100%; /* Ensure the container takes full width */
}

/* Style for each card in Image Labels */
.image-label-card {
  flex: 0 0 auto; /* Prevent growing/shrinking, use natural width */
  width: 150px; /* Fixed width to ensure they fit side by side */
}

/* Circular Progress Bar Styles */
.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.progress-ring__circle-bg {
  fill: none;
  stroke: var(--bg-cool);
  stroke-width: 10;
}

.progress-ring__circle {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 314; /* Circumference of the circle (2 * π * r, where r = 50) */
  stroke-dashoffset: 314; /* Start with 0% filled */
  transition: stroke-dashoffset 1.5s ease-in-out;
}

/* Cycle colors for Detected Logos */
.detected-logos .col-md-4:nth-child(1) .progress-ring__circle {
  stroke: var(--alpha-red);
}
.detected-logos .col-md-4:nth-child(2) .progress-ring__circle {
  stroke: var(--alpha-green);
}
.detected-logos .col-md-4:nth-child(3) .progress-ring__circle {
  stroke: var(--alpha-violet);
}
.detected-logos .col-md-4:nth-child(4) .progress-ring__circle {
  stroke: var(--alpha-pink);
}
.detected-logos .col-md-4:nth-child(5) .progress-ring__circle {
  stroke: var(--alpha-yellow);
}
.detected-logos .col-md-4:nth-child(6) .progress-ring__circle {
  stroke: var(--alpha-orange-info);
}
/* Continue the cycle */
.detected-logos .col-md-4:nth-child(6n + 1) .progress-ring__circle {
  stroke: var(--alpha-red);
}
.detected-logos .col-md-4:nth-child(6n + 2) .progress-ring__circle {
  stroke: var(--alpha-green);
}
.detected-logos .col-md-4:nth-child(6n + 3) .progress-ring__circle {
  stroke: var(--alpha-violet);
}
.detected-logos .col-md-4:nth-child(6n + 4) .progress-ring__circle {
  stroke: var(--alpha-pink);
}
.detected-logos .col-md-4:nth-child(6n + 5) .progress-ring__circle {
  stroke: var(--alpha-yellow);
}
.detected-logos .col-md-4:nth-child(6n + 6) .progress-ring__circle {
  stroke: var(--alpha-orange-info);
}

/* Cycle colors for Image Labels */
.image-labels .image-label-card:nth-child(1) .progress-ring__circle {
  stroke: var(--alpha-green);
}
.image-labels .image-label-card:nth-child(2) .progress-ring__circle {
  stroke: var(--alpha-violet);
}
.image-labels .image-label-card:nth-child(3) .progress-ring__circle {
  stroke: var(--alpha-pink);
}
.image-labels .image-label-card:nth-child(4) .progress-ring__circle {
  stroke: var(--alpha-yellow);
}
.image-labels .image-label-card:nth-child(5) .progress-ring__circle {
  stroke: var(--alpha-orange-info);
}
.image-labels .image-label-card:nth-child(6) .progress-ring__circle {
  stroke: var(--alpha-red);
}
/* Continue the cycle */
.image-labels .image-label-card:nth-child(6n + 1) .progress-ring__circle {
  stroke: var(--alpha-green);
}
.image-labels .image-label-card:nth-child(6n + 2) .progress-ring__circle {
  stroke: var(--alpha-violet);
}
.image-labels .image-label-card:nth-child(6n + 3) .progress-ring__circle {
  stroke: var(--alpha-pink);
}
.image-labels .image-label-card:nth-child(6n + 4) .progress-ring__circle {
  stroke: var(--alpha-yellow);
}
.image-labels .image-label-card:nth-child(6n + 5) .progress-ring__circle {
  stroke: var(--alpha-orange-info);
}
.image-labels .image-label-card:nth-child(6n + 6) .progress-ring__circle {
  stroke: var(--alpha-red);
}

/* Center the percentage text */
.progress-percentage {
  position: absolute;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

/* Animation for the percentage text */
@keyframes count-up {
  from {
    content: '0%';
  }
  to {
    content: attr(data-final-percentage);
  }
}

/* Container to enforce a square shape */
.trademark-image-container {
  width: 100px; /* Fixed width */
  height: 100px; /* Fixed height, making it square */
  aspect-ratio: 1 / 1; /* Enforce a square aspect ratio (width:height = 1:1) */
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-cool); /* Background color for empty space */
  border-radius: 8px; /* Optional: rounded corners */
}

/* Style the image to preserve aspect ratio and fit within the container */
.trademark-thumbnail {
  max-width: 100%; /* Ensure the image doesn't exceed the container's width */
  max-height: 100%; /* Ensure the image doesn't exceed the container's height */
  width: auto; /* Allow the width to adjust based on the aspect ratio */
  height: auto; /* Allow the height to adjust based on the aspect ratio */
  object-fit: contain; /* Preserve aspect ratio, fit within the container */
  object-position: center; /* Center the image within the container */
}

/* Custom Styles for TruIP */

/* Style for clickable table rows */
tr.clickable {
  cursor: pointer;
}

/* Ensure progress bar text is visible */
.progress-bar {
  color: #fff; /* White text on progress bars */
  font-weight: bold;
}

/* Style for wordmark results summary */
.wordmark-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #f8f9fa; /* Ensure wordmark text is visible */
}

.search-context .badge,
.search-variations .badge {
  font-size: 0.9em;
  padding: 0.4em 0.7em;
}

.collapse-row td {
  border-top: none !important; /* Remove top border for collapsed row */
}

.bg-light {
  background-color: #343a40 !important; /* Use dark background for details */
}

.bg-light dl dt {
  color: #adb5bd; /* Lighter gray for labels */
}

.bg-light dl dd {
  color: #f8f9fa; /* White for values */
}

.list-group-item {
  background-color: #2c2f33; /* Dark background for list items */
  border-color: #495057;
  color: #f8f9fa;
}

/* Make sure all text within the wordmark results card is light */
.card .card-body,
.card .card-body h4,
.card .card-body strong,
.card .card-body .text-muted {
  color: #f8f9fa; /* Default to light text */
}

.card .card-body .table {
  color: #f8f9fa; /* Light text for table */
}

.card .card-body .table th {
  color: #adb5bd; /* Slightly dimmer for table headers */
}

.card .card-body .table-hover tbody tr:hover {
  background-color: #343a40; /* Darker hover for table rows */
  color: #fff;
}

.card .card-body .badge.bg-light {
  background-color: #495057 !important; /* Darker background for light badges */
  color: #f8f9fa !important; /* Light text for light badges */
}

.card .card-body .pagination .page-link {
  background-color: #2c2f33;
  border-color: #495057;
  color: #f8f9fa;
}

.card .card-body .pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.card .card-body .pagination .page-item.disabled .page-link {
  background-color: #212529;
  border-color: #495057;
  color: #6c757d;
}

/* Hero title styles */
.hero-title {
  font-family: var(--hero-font-family);
  font-weight: var(--hero-font-weight);
  font-size: var(--hero-font-size);
  line-height: var(--hero-line-height);
  letter-spacing: var(--hero-letter-spacing);
  color: var(--hero-text-color);
  margin-bottom: 1.5rem;
}

/* Hero subtitle styles */
.hero-subtitle {
  font-family: var(--hero-subtitle-font-family);
  font-weight: var(--hero-subtitle-font-weight);
  font-size: var(--hero-subtitle-font-size);
  line-height: var(--hero-subtitle-line-height);
  letter-spacing: var(--hero-subtitle-letter-spacing);
  color: var(--hero-subtitle-color);
  margin-bottom: 2rem;
}

/* Analysis card styles */
.analysis-card {
  background: var(--bg-surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Analysis content container */
.analysis-content {
  padding: 3rem 2rem 2rem 2rem;
  position: relative;
}

/* Input container for switching between input types */
.input-container {
  position: relative;
}

.input-container .analysis-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.input-container .analysis-input.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* File input wrapper styling */
.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.file-input-wrapper input[type='file'] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-placeholder {
  color: var(--text-placeholder);
  flex: 1;
  pointer-events: none;
  z-index: 1;
}

.file-icon {
  width: 32px;
  height: 32px;
  margin-top: 0.25rem;
  pointer-events: none;
  z-index: 1;
}

/* Image Preview Styles */
.image-preview-container {
  padding: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 2px solid var(--border-primary);
}

.image-preview-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  min-height: 120px;
  max-height: 200px;
  overflow: hidden;
}

.image-preview {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
}

.remove-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  color: black;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.remove-image-btn:hover {
  background: #f8f9fa;
  transform: scale(1.1);
}

.image-info {
  padding: 0.75rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.image-filename {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  margin-right: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-size {
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Footer text styles */
.footer .text-secondary {
  font-size: 12px;
  line-height: 1.4;
}

.analysis-tabs {
  display: flex;
  background: #f8f8f4;
  border-radius: 8px;
  padding: 0.5rem;
  margin: 2rem 2rem 0 2rem;
}

.analysis-tab {
  flex: 1;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  color: #cdcdcd;
  font-family: 'Noto Serif', serif;
  font-weight: bold;
  font-size: 18px;
  line-height: 100%;
  letter-spacing: -4%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.analysis-tab.active {
  background: #40a5d8;
  color: white;
}

.analysis-tab:hover:not(.active) {
  background: var(--bg-cool);
  color: var(--text-primary);
}

.analysis-input {
  background: var(--text-primary);
  border: none;
  border-radius: 8px;
  color: white;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 0.75rem;
  height: 56px; /* Fixed height for consistent sizing */
  box-sizing: border-box;
}

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

.analysis-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--alpha-blue);
}

.analysis-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.info-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  margin-left: 0.5rem;
}

.info-toggle img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-top: -0.125rem;
}

.info-toggle:hover {
  background: var(--bg-cool);
  color: var(--text-primary);
}

.features-list {
  list-style: disc; /* Use native bullets for consistent alignment */
  padding: 0 0 0 1.25rem; /* Indent list text to align with bullets */
  margin: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.features-list.show {
  max-height: 200px;
  opacity: 1;
  margin-top: 1rem;
}

.features-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.analyze-button {
  background: var(--alpha-green);
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  width: 100%;
}

.analyze-button:hover {
  background: #4ee213;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.analyze-button:disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.analyze-button:disabled:hover {
  background: #e5e7eb !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .analysis-content {
    padding: 1.5rem;
  }

  .analysis-tab {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .analyze-button {
    padding: 0.875rem 1.5rem;
  }
}

/* Agreement page styles */
.agreement-section-item {
  margin-bottom: 1.5rem !important;
}

.agreement-section-number {
  background: #40a5d8 !important;
  color: white !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
  margin-right: 0.75rem !important;
}

.agreement-section-heading {
  color: var(--text-primary) !important;
  font-weight: bold !important;
  margin: 0.5rem 0 1rem 0 !important;
  font-size: 16px !important;
}

.agreement-content {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.agreement-content::-webkit-scrollbar {
  display: none !important;
}

.agreement-disclaimer {
  background: #f4fef0 !important;
  border: 1px solid #b9f99f !important;
  color: #45ac1b !important;
}

.agreement-disclaimer-icon {
  color: #45ac1b !important;
}

.agreement-terms-header {
  color: var(--text-primary) !important;
  font-weight: bold !important;
  margin-bottom: 0.5rem !important;
}

.agreement-effective-date {
  color: var(--text-placeholder) !important;
  font-size: 0.875rem !important;
  margin-bottom: 0 !important;
}

.agreement-content-area {
  padding: 1.5rem !important;
  border: 1px solid var(--border-primary) !important;
  border-radius: 8px !important;
  background: var(--bg-surface) !important;
}

.agreement-checkbox-container {
  background: var(--bg-cool) !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-primary) !important;
}

.agreement-checkbox-input {
  border-color: var(--text-secondary) !important;
  background-color: var(--bg-surface) !important;
}

.agreement-checkbox-label {
  color: var(--text-cool) !important;
  font-weight: 500 !important;
}

/* Fix checkbox overflow in agreement sections */
.agreement-checkbox-container {
  overflow: hidden !important;
  position: relative !important;
  background: #f4fef0 !important;
  border: 1px solid #b9f99f !important;
  color: #45ac1b !important;
}

.agreement-checkbox-container .form-check-input {
  position: relative !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  border-color: #45ac1b !important;
}

.agreement-checkbox-container .form-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
  width: 100% !important;
}

.agreement-checkbox-label {
  color: #45ac1b !important;
  font-weight: 500 !important;
}

/* Ensure the agreement checkbox shows a colored checked state despite other !important rules */
.agreement-checkbox-input:checked {
  background-color: var(--alpha-blue) !important;
  border-color: var(--alpha-blue) !important;
}

/* Force visible checkmark for the agreement checkbox */
.agreement-checkbox-input[type='checkbox']:checked {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3.5 8.5l3 3 6-6'/%3e%3c/svg%3e") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 12px 12px !important;
}

/* Scroll progress indicator */
.scroll-progress {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 120px !important;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.9),
    transparent
  ) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
  pointer-events: none !important;
  z-index: 10 !important;
  /* margin-top: -40px !important; */
}

.scroll-progress-text {
  background: rgba(255, 255, 255, 0.8) !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 1rem !important;
  margin-top: 80px !important;
}
