/* Admin styles */

/* Fix for Trix editor in admin area */
trix-editor {
  min-height: 15rem;
  max-height: 40rem;
  overflow-y: auto;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  background-color: white;
}

trix-toolbar {
  padding: 0.5rem 0;
}

trix-toolbar .trix-button-group {
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
}

trix-toolbar .trix-button {
  border: none;
  background-color: white;
}

trix-toolbar .trix-button.trix-active {
  background-color: #e2e8f0;
}

/* Fix avatar in admin area */
.avatar .rounded-full {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1f2937;
  color: white;
  font-weight: bold;
  width: 100%;
  height: 100%;
}

/* Improve tab styling */
.tabs {
  margin-bottom: 1.5rem;
}

.tab-content {
  padding-top: 0.5rem;
}

/* Ensure ticket tabs are styled correctly */
.ticket-tab-btn.active,
.ticket-tab-btn[aria-selected="true"] {
  border-color: #6366f1 !important;
  color: #4f46e5 !important;
}

.ticket-tab.active,
.ticket-tab:not(.hidden) {
  display: block !important;
}

/* Ensure table responsiveness */
.table {
  width: 100%;
}

.table th {
  white-space: nowrap;
}

/* Form refinements */
.form-control .label {
  padding-left: 0.25rem;
}

.input-bordered, .textarea-bordered, .select-bordered {
  background-color: white;
}

/* Fix checkbox alignment */
.checkbox {
  margin-right: 0.5rem;
}

/* Card improvements */
.card {
  overflow: visible;
}

/* Alert styling */
.alert {
  margin-bottom: 1rem;
}

/* Badge tweaks */
.badge {
  text-transform: capitalize;
}

/* Fix dropdown positioning */
.dropdown-content {
  z-index: 50;
}

/* Add console indicator style for admin area */
body.admin::before {
  content: 'Admin Area Active';
  position: fixed;
  bottom: 0;
  right: 0;
  background-color: #1f2937;
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  z-index: 100;
  border-top-left-radius: 0.25rem;
  opacity: 0.8;
}

/* Feature items in tickets */
.feature-item {
  transition: background-color 0.2s;
}

.feature-item:hover {
  background-color: #f9fafb;
}

.drag-handle {
  cursor: move !important;
}

/* Autosave notification */
#autosave-notification {
  z-index: 9999;
  transition: opacity 0.3s ease-in-out;
}

/* Ensure links are clearly visible in admin content areas */
.prose a,
.admin-content a:not(.btn):not([class*="bg-"]):not([class*="text-"]),
dd a,
.whitespace-pre-wrap a {
  color: oklch(0.546 0.245 262.881); /* primary color */
  text-decoration: underline;
}

.prose a:hover,
.admin-content a:not(.btn):not([class*="bg-"]):not([class*="text-"]):hover,
dd a:hover,
.whitespace-pre-wrap a:hover {
  color: oklch(0.488 0.243 264.376); /* primary/80 */
}

/* Trix editor link styling */
trix-editor a {
  color: oklch(0.546 0.245 262.881);
  text-decoration: underline;
}

trix-editor a:hover {
  color: oklch(0.488 0.243 264.376);
}

/* Action Text rendered content links */
.trix-content a {
  color: oklch(0.546 0.245 262.881);
  text-decoration: underline;
}

.trix-content a:hover {
  color: oklch(0.488 0.243 264.376);
}
