/*
 * 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.
 */

/*= require select2_custom */

/* Additional styling for Select2 container */
.select2-container-wrapper {
  margin-bottom: 10px;
}

/* Make sure the Select2 dropdown is visible and properly positioned */
.select2-container--open .select2-dropdown {
  z-index: 9999;
}

/* Ensure the Select2 container has proper width */
.select2-container {
  width: 100% !important;
}

/* Style for the multi-select container to match terminal theme */
.user-select2 {
  background-color: #1a1b26 !important;
  color: #c0caf5 !important;
  border: 1px solid #414868 !important;
}

/* Ensure the dropdown is visible on top of other elements */
.select2-container--classic .select2-dropdown {
  z-index: 9999 !important;
}

/* Improve the display of assignees */
.ticket-assignee, .ticket-assignee-small {
  display: inline-block;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Add a hover effect to show the full list on hover */
.ticket-assignee:hover, .ticket-assignee-small:hover {
  position: relative;
  overflow: visible;
  z-index: 1000;
}

.ticket-assignee[data-assignees]:hover::after,
.ticket-assignee-small[data-assignees]:hover::after {
  content: attr(data-assignees);
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  display: block;
  background-color: #1a1b26;
  border: 1px solid #414868;
  padding: 6px 12px;
  border-radius: 4px;
  color: #c0caf5;
  white-space: normal;
  max-width: 250px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 1001;
}

.terminal-links {
  margin-top: 20px;
  border-top: 1px solid #2a2b3d;
  padding-top: 15px;
}

.terminal-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-links-list .terminal-link {
  color: #7aa2f7;
  text-decoration: none;
}

.terminal-links-list .terminal-link:hover {
  color: #bb9af7;
}

.terminal-links-list .terminal-btn {
  align-self: flex-start;
}

.terminal-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.action-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.filter-panel {
  border: 1px solid #414868;
  background: rgba(26, 27, 38, 0.6);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 20px rgba(0, 0, 0, 0.25);
}

.filter-panel-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #c0caf5;
  margin-bottom: 12px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(65, 72, 104, 0.2);
}

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.filter-toolbar-form {
  display: contents;
}

.filter-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.clear-filter-group {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.filter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a9b1d6;
}

.filter-select {
  background-color: #1a1b26;
  border: 1px solid #414868;
  color: #c0caf5;
  padding: 6px 8px;
  border-radius: 4px;
}

.terminal-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.terminal-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  line-height: 24px;
}

.terminal-toggle-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #1f2030;
  border: 1px solid #414868;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.terminal-toggle-slider::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c0caf5;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
}

.terminal-toggle-input:focus + .terminal-toggle-slider {
  box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.4);
}

.terminal-toggle-input:checked + .terminal-toggle-slider {
  background: #7aa2f7;
  border-color: #7aa2f7;
}

.terminal-toggle-input:checked + .terminal-toggle-slider::after {
  transform: translateX(20px);
  background: #1a1b26;
}

.terminal-toggle-text {
  color: #c0caf5;
  font-weight: 500;
}

.terminal-color-input {
  width: 100px;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #414868;
  border-radius: 4px;
  background: #1a1b26;
  color: #c0caf5;
}

/* Styling for the assignee list in ticket view */
.assignee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}

.assignee-item {
  background-color: #414868;
  border-radius: 4px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.assignee-item i {
  color: #7aa2f7;
}

.assignee-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #1a1b26;
}

.no-assignees {
  color: #565f89;
  font-style: italic;
}

.ticket-assignee-indicator {
  color: #7aa2f7;
  margin-left: 5px;
}
