/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Email styles need to be inline */

/* View Controls Semantic */
.view-controls-semantic {
  display: flex;
  align-items: center;
  /* Remove min-width to prevent layout conflicts */
}

.view-controls-semantic .button-group {
  display: flex;
  border-radius: 0.375rem; /* rounded-md */
  overflow: hidden;
  border: 1px solid #d1d5db; /* border border-gray-300 */
}

.view-controls-semantic button {
  padding: 0.375rem 0.75rem; /* px-3 py-1.5 */
  display: flex;
  align-items: center;
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #374151; /* text-gray-700 */
}

.view-controls-semantic button:hover {
  background-color: #f9fafb; /* hover:bg-gray-50 */
}

.view-controls-semantic button:not(:first-child) {
  border-left: 1px solid #d1d5db; /* border-l border-gray-300 */
}

.view-controls-semantic svg {
  height: 1rem; /* h-4 */
  width: 1rem; /* w-4 */
  margin-right: 0.25rem; /* mr-1 */
}

/* Document Badges */
.document-type-badge-semantic,
.document-entity-badge-semantic {
  background-color: #f3f4f6; /* bg-gray-100 */
  color: #1f2937; /* text-gray-800 */
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
}

/* Custom style for document-focused to ensure it's visible when clicking */
.document-card-semantic.document-focused {
  outline: 2px solid #3b82f6 !important; /* Using outline instead of border */
  outline-offset: -1px; /* Slightly inset to avoid layout shifts */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  z-index: 1;
}

/* Table view focus style */
.document-table-row-semantic.document-focused {
  background-color: rgba(59, 130, 246, 0.1) !important;
  box-shadow: inset 3px 0 0 #3b82f6 !important; /* Inset border doesn't affect layout */
}

.document-entity-badge-semantic {
  margin-left: 0.5rem; /* ml-2 */
}

/* Search Form Styling */
.search-form-semantic {
  width: 100%;
}

.search-wrapper-semantic {
  width: 100%;
}

.search-container-semantic {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  background-color: #f3f4f6;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
  height: 2.25rem;
}

.search-container-semantic:hover,
.search-container-semantic:focus-within {
  background-color: #e5e7eb;
}

.search-icon-container-semantic {
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.search-icon-semantic {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
}

.search-input-semantic {
  flex: 1;
  height: 100%;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0 1rem 0 2.5rem;
  font-size: 0.875rem;
  color: #1f2937;
  outline: none;
}

.search-submit-semantic {
  position: absolute;
  right: 0.5rem;
  top: 0;
  bottom: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.visually-hidden-semantic {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.inbox-count-badge-semantic {
  @apply ml-auto bg-red-500 text-white text-xs rounded-full px-1.5 py-0.5 font-medium !important;
}

/* Entity Count Badge */
.entity-count-badge-semantic,
.todos-count-badge-semantic {
  margin-left: auto; /* ml-auto */
  background-color: #9ca3af; /* bg-gray-400 - lighter gray */
  color: white;
  font-size: 0.75rem; /* text-xs */
  border-radius: 9999px; /* rounded-full */
  padding: 0.125rem 0.375rem; /* py-0.5 px-1.5 - same as inbox badge */
  font-weight: 500; /* font-medium */
  min-width: 1.5rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Todo Count Badge - special styling */
.todos-count-badge-semantic {
  background-color: #1e40af; /* Dark blue to match the todo icon */
}

/* Entity name truncation */
.nav-entity-text-semantic {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 75%;
}

/* Global Badge */
.global-badge-semantic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background-color: #1e40af; /* Dark blue */
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.user-badge-semantic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background-color: #6b7280; /* Gray */
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Tag Container and Search Area */
.tags-container {
  border: 1px solid #d1d5db; /* border border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  background-color: white; /* bg-white */
  overflow: visible;
}

.tags-list-area {
  padding: 0.5rem; /* p-2 */
  min-height: auto; /* Remove fixed min-height */
  max-height: 120px; /* max-h-[120px] */
  overflow-y: auto;
  border-bottom: 1px solid #e5e7eb; /* border-b border-gray-200 */
}

.tags-list-area > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem; /* gap-2 */
}

.tag-search-area {
  overflow: visible;
}

.tag-search-area > div {
  position: relative;
  overflow: visible;
}

.tag-search-area input {
  width: 100%; /* w-full */
  padding: 0.5rem 0.75rem; /* px-3 py-2 */
  border-radius: 0.375rem; /* rounded-md */
}

.tag-search-area .suggestions {
  background-color: white; /* bg-white */
  border: 1px solid #d1d5db; /* border border-gray-300 */
  border-radius: 0.375rem; /* rounded-md */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
  max-height: 200px; /* max-h-[124px] */
  overflow: auto;
}

/* Content Tab Container */
.content-tab-container {
  padding: 1rem; /* p-4 */
}

.content-tab-container h2 {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700; /* font-bold */
  margin-bottom: 1rem; /* mb-4 */
}

.content-tab-container .content-area {
  background-color: #f9fafb; /* bg-gray-50 */
  padding: 1.25rem; /* p-5 */
  border-radius: 0.375rem; /* rounded-md */
  overflow: auto;
  max-height: 600px; /* max-h-[600px] */
  color: #374151; /* text-gray-700 */
}

.metadata-content-tab-container {
  background-color: #f9fafb; /* bg-gray-50 */
  padding: 1.25rem; /* p-5 */
  border-radius: 0.375rem; /* rounded-md */
  overflow: auto;
  color: #374151; /* text-gray-700 */
}

.content-tab-container .empty-content {
  background-color: #f9fafb; /* bg-gray-50 */
  padding: 1.25rem; /* p-5 */
  border-radius: 0.375rem; /* rounded-md */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 16rem; /* h-64 */
}

.content-tab-container .empty-content p {
  color: #6b7280; /* text-gray-500 */
}

/* Metadata Grid */
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr)); /* grid-cols-2 */
  gap: 1rem; /* gap-4 */
}

.metadata-field-semantic {
  margin-bottom: 1rem;
}

.metadata-label-semantic {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.metadata-value-semantic {
  font-size: 0.875rem;
  color: #0f172a;
}

/* Auth styles */
.login-button-semantic {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
  text-decoration: none;
  margin-right: 0.75rem;
}

.login-button-semantic:hover {
  background-color: #2563eb;
}

.login-icon-semantic {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

.login-text-semantic {
  font-weight: medium;
}

.header-right-semantic {
  display: flex;
  align-items: center;
}

.user-profile-container-semantic {
  display: flex;
  align-items: center;
  margin-right: 0.25rem;
  gap: 0.75rem;
}

.user-initials-semantic {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.logout-button-semantic {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
}

.logout-button-semantic:hover {
  color: white;
  background-color: rgba(239, 68, 68, 0.15);
}

/* Table Styles for ML Dashboard and Entity pages */
.entities-table-container-semantic {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.entities-table-title-semantic {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

.entities-table-semantic {
  width: 100%;
  border-collapse: collapse;
}

.table-header-semantic {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.table-header-cell-semantic {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}

.table-row-semantic {
  border-bottom: 1px solid #e5e7eb;
}

.table-row-semantic:last-child {
  border-bottom: none;
}

.table-cell-name-semantic,
.table-cell-count-semantic,
.table-cell-date-semantic,
.table-cell-actions-semantic {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #374151;
}

.table-cell-name-semantic {
  font-weight: 500;
}

.entity-link-semantic {
  color: #1e3a8a;
  font-weight: 500;
  text-decoration: none;
}

.entity-link-semantic:hover {
  text-decoration: underline;
}

.table-actions-container-semantic {
  display: flex;
  gap: 0.5rem;
}

.view-button-semantic,
.download-button-semantic,
.restore-button-semantic,
.delete-button-semantic {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.view-button-semantic,
.download-button-semantic {
  color: #1f2937;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
}

.view-button-semantic:hover, .download-button-semantic:hover {
  background-color: #e5e7eb;
}

.action-icon-semantic {
  width: 0.875rem;
  height: 0.875rem;
}

.action-text-semantic {
  font-size: 0.75rem;
}

/* Entities page specific styles */
.entities-manage-semantic {
  width: 100%;
}

.entities-header-semantic {
  margin-bottom: 1.5rem;
}

.entities-content-semantic {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.entity-form-semantic {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.entity-form-title-semantic {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

.entity-form-container-semantic {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-errors-semantic {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.errors-list-semantic {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.error-item-semantic {
  color: #b91c1c;
  font-size: 0.875rem;
}

.form-field-semantic {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label-semantic {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-input-semantic {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.form-input-semantic:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.form-actions-semantic {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.create-button-semantic {
  background-color: #1e3a8a;
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.create-button-semantic:hover {
  background-color: #1e40af;
}

.delete-button-semantic {
  color: #991b1b;
  background-color: #fee2e2;
  border: 1px solid #fecaca;
}

.delete-button-semantic:hover {
  background-color: #fecaca;
}

.delete-button-disabled-semantic {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: not-allowed;
}

.restore-button-semantic {
  color: #166534;
  background-color: #dcfce7;
  border: 1px solid #86efac;
}
.restore-button-semantic:hover {
  background-color: #86efac;
}

.empty-entities-semantic {
  text-align: center;
  padding: 2rem 0;
}

.empty-text-semantic {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Override container background */
.app-container-semantic {
  background-color: white !important;
}

/* Upload form disabled button styling */
.upload-submit-button-semantic:disabled {
  background-color: #9ca3af !important; /* Gray background */
  cursor: not-allowed;
  opacity: 0.7;
}

/* Todo indicator styling */
.todo-indicator-semantic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-color: #1e40af; /* Dark blue background to match form */
}

.todo-check-icon-semantic {
  width: 1rem;
  height: 1rem;
  color: white; /* White icon */
}

/* Tab styling */
.document-tabs-nav-semantic a {
  color: #94a3b8; /* Light gray text for inactive tabs */
  transition: all 0.2s ease;
  border-bottom: 2px solid #e2e8f0; /* Light gray border for all tabs */
  padding-bottom: 6px; /* Add some space below the text */
}

.document-tab-details-semantic.active, .document-tab-content-semantic.active, .document-tab-metadata-semantic.active, .document-tab-actions-semantic.active {
  border-bottom: 2px solid #2563eb; /* Blue border for active tab */
  color: #1e293b; /* Dark text for active tab */
  font-weight: 500;
}

.document-tab-content-semantic, .document-tab-details-semantic {
  cursor: pointer;
  opacity: 1.0 !important; /* Ensure these tabs are fully visible */
}

.document-tab-metadata-semantic, .document-tab-actions-semantic {
  cursor: pointer;
  opacity: 1.0 !important; /* Ensure these tabs are fully visible */
}

.document-tab-permissions-semantic {
  opacity: 0.5;
  cursor: default;
}

/* Add a slight hover effect */
.document-tab-content-semantic:hover, .document-tab-details-semantic:hover, .document-tab-metadata-semantic:hover, .document-tab-actions-semantic:hover {
  color: #1e293b;
}

/* Make keyboard shortcut tooltips non-clickable */
.keyboard-shortcut-tooltip-semantic,
.form-shortcut-tooltip-semantic {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Document type confidence styling */
.document-type-confidence-semantic {
  font-size: 0.875rem;
  color: #94a3b8;
  text-align: right;
}

.confidence-value-semantic {
  font-weight: 400;
  color: #94a3b8;
}

/* Todo toggle styling - with border like tags */
.todo-toggle-container {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.todo-toggle-wrapper {
  display: flex;
  align-items: center;
}

.todo-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.todo-toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.todo-toggle-bordered {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  background-color: white;
  border: 1px solid #d1d5db; /* Gray border */
  transition: all 0.2s ease;
  width: 100%;
}

.todo-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem; /* Prevent icon from shrinking */
  border-radius: 50%;
  background-color: white;
  border: 1px solid #d1d5db; /* Light gray border */
  margin-right: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.todo-check-icon {
  width: 1rem;
  height: 1rem;
  color: #2563eb;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Hover state */
.todo-toggle-label:hover .todo-toggle-bordered {
  border-color: #9ca3af;
  background-color: #f9fafb;
}

.todo-toggle-label:hover .todo-toggle-icon {
  border-color: #9ca3af;
}

/* Checked state */
.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-bordered {
  background-color: #2563eb;
  border-color: #1d4ed8;
  color: white; /* Ensure text is white */
}

.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-icon {
  background-color: #1e40af;
  border-color: transparent; /* Remove border when active */
}

.todo-checkbox-input:checked + .todo-toggle-label .todo-check-icon {
  opacity: 1;
  color: white;
}

/* Ensure all text inside the toggle is white when checked */
.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-text,
.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-status-active,
.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-status-inactive {
  color: white;
}

/* Focus state */
.todo-checkbox-input:focus + .todo-toggle-label .todo-toggle-bordered {
  box-shadow: 0 0 0 2px #93c5fd;
}

/* Active state */
.todo-toggle-label:active .todo-toggle-icon {
  transform: scale(0.95);
}

.todo-toggle-text {
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  height: 1.25rem;
  min-width: 8rem;
  flex-grow: 1; /* Allow text container to fill available space */
}

.todo-toggle-status-inactive,
.todo-toggle-status-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.todo-toggle-status-inactive {
  opacity: 1;
  transform: translateY(0);
  color: #4b5563; /* Gray text for default state */
  transition: all 0.2s ease;
}

.todo-toggle-status-active {
  opacity: 0;
  transform: translateY(-5px);
  color: white; /* White text when active to match the blue background */
  font-weight: 600;
  transition: all 0.2s ease;
}

/* Fix for text changing when toggled - updated selectors */
.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-status-inactive {
  opacity: 0;
  transform: translateY(5px);
}

.todo-checkbox-input:checked + .todo-toggle-label .todo-toggle-status-active {
  opacity: 1;
  transform: translateY(0);
}

/* Disabled state for todo checkbox */
.todo-checkbox-input:disabled + .todo-toggle-label {
  cursor: not-allowed;
  opacity: 0.6;
}

.todo-checkbox-input:disabled + .todo-toggle-label .todo-toggle-bordered {
  background-color: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #9ca3af !important;
}

.todo-checkbox-input:disabled + .todo-toggle-label .todo-toggle-icon {
  background-color: #f3f4f6 !important;
  border-color: #d1d5db !important;
}

.todo-checkbox-input:disabled + .todo-toggle-label .todo-check-icon {
  color: #d1d5db !important;
}

.todo-checkbox-input:disabled + .todo-toggle-label .todo-toggle-status-inactive,
.todo-checkbox-input:disabled + .todo-toggle-label .todo-toggle-status-active {
  color: #9ca3af !important;
}

/* Disable hover effects when disabled */
.todo-checkbox-input:disabled + .todo-toggle-label:hover .todo-toggle-bordered {
  border-color: #d1d5db !important;
  background-color: #f3f4f6 !important;
}

.todo-checkbox-input:disabled + .todo-toggle-label:hover .todo-toggle-icon {
  border-color: #d1d5db !important;
  transform: none !important;
}

/* Create new tag styling */
.create-new-tag {
  display: flex;
  align-items: center;
  background-color: #f0f9ff !important; /* Light blue background */
  color: #0284c7 !important; /* Blue text */
  border-left: 3px solid #0284c7;
  font-weight: 500;
}

.create-new-tag:hover, .create-new-tag.highlighted {
  background-color: #e0f2fe !important;
}

.create-tag-icon {
  margin-right: 6px;
  font-weight: bold;
  font-size: 16px;
}

/* Tag suggestions dropdown styling */
.suggestions {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;

}

.document-type-selector-suggestions-semantic {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;
  position: relative;
  padding-top: -100px;
  left: 0;
  right: 0;
  margin-top: 2px;
}


.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.suggestion-item:hover, .suggestion-item.highlighted {
  background-color: #f8fafc;
}

.suggestion-header {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f8fafc;
}

/* Custom styles for empty selects */
.empty-select {
  border: 2px solid #374151 !important;
  background-color: rgba(243, 244, 246, 0.3) !important;
}

/* Read-only date display styling */
.document-date-readonly-semantic {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Add a subtle animation to draw attention */
@keyframes borderPulse {
  0% { border-color: #6B7280; }
  50% { border-color: #374151; }
  100% { border-color: #6B7280; }
}

.empty-select {
  animation: borderPulse 2s infinite;
}

/* Document Type Selector Styles */
.selected-document-type-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 10001; /* Higher than suggestions dropdown */
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background-color: white;
  min-height: 2.5rem;
  box-sizing: border-box;
}

.selected-document-type-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.selected-type-name {
  color: inherit;
  flex: 1;
}

.clear-selection-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  margin-left: 0.5rem;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
  flex-shrink: 0;
  z-index: 10002; /* Ensure clear button is above everything */
  position: relative;
}

.clear-selection-btn:hover {
  color: #374151;
  background-color: #f3f4f6;
}

/* Document type selector wrapper with proper overflow and z-index */
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] {
  position: relative;
  z-index: 1;
}

/* Make arrow icon clickable for document type selector */
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .select-arrow-container-semantic {
  cursor: pointer;
  z-index: 10001;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: auto;
  display: flex;
  align-items: center;
  padding-right: 0.5rem;
}

/* Document type selector input styling to match other selects */
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .document-entity-select-semantic {
  padding-right: 2.5rem; /* Make room for the arrow */
}

/* Document type selector suggestions - ensure proper layering */
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10000;
  background-color: white;
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  max-height: 320px;
  overflow-y: auto;
  margin-top: 2px;

  position: relative;
  top: 38px !important;
  left: 0;
  right: 0;
  border-top: none !important;
}

.suggestions-empty-semantic {
  border-left: 3px solid #101828 !important;
  border-right: 3px solid #101828 !important;
  border-bottom: 3px solid #101828 !important;
}

/* Ensure suggestion items are clickable */
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestion-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  color: #374151;
}

/* None option uses same styling as other options */

.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestion-item:hover,
.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestion-item.highlighted {
  background-color: #f3f4f6;
}

.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestion-item.no-results {
  cursor: default;
  color: #6b7280;
  font-style: italic;
}

.document-entity-select-wrapper-semantic[data-controller="document-type-selector"] .suggestion-item.no-results:hover {
  background-color: transparent;
}

/* Filter dropdown search styles */
.dropdown-search-semantic {
  padding: 0.5rem;
}

.dropdown-search-input-semantic {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #374151;
  background-color: white;
}

.dropdown-search-input-semantic:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.dropdown-search-input-semantic::placeholder {
  color: #9ca3af;
}

/* Loading progress bar animation */
@keyframes progress {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Ensure table rows can contain positioned elements */
.document-table-row-semantic {
  position: relative;
}

/* Magnifying Glass Styles */
.magnifying-glass {
  position: fixed !important;
  border: 3px solid #ffffff;
  border-radius: 50%;
  cursor: none;
  pointer-events: none;
  z-index: 9999 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  background-color: #ffffff;
  overflow: hidden;
  display: none;
}

.magnifying-lens {
  display: none;
}

.document-preview-container-semantic img {
  max-width: 100%;
  height: auto;
  cursor: crosshair;
}

/* Hide scrollbar while keeping scrollable functionality */
.scrollbar-none {
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-none::-webkit-scrollbar {
  display: none;  /* Safari and Chrome */
}
