/*
 * Critical visibility safeguards for interactive controls.
 *
 * These rules intentionally use narrow selectors and !important because some
 * tenant/theme combinations can override Tailwind utility backgrounds and
 * text colors after the application bundle has loaded.
 */

/* Primary blue actions, including Bookkeeping Save/New Task/Retry buttons. */
button[class~='bg-blue-600'][class~='text-white'] {
  background-color: #2563eb !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

button[class~='bg-blue-600'][class~='text-white']:hover:not(:disabled) {
  background-color: #1d4ed8 !important;
}

button[class~='bg-blue-600'][class~='text-white']:disabled {
  opacity: 0.5 !important;
}

/* Bookkeeping work-package list: keep empty inline actions readable. */
button[title='Click to change due date'],
button[title='Click to change assignee'] {
  color: #475569 !important;
  opacity: 1 !important;
}

button[title='Click to change due date'] > span,
button[title='Click to change assignee'] > span {
  color: #64748b !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

button[title='Click to change assignee']:hover > span,
button[title='Click to change due date']:hover > span {
  color: #2563eb !important;
}

/* Bookkeeping header total: prevent inherited theme colors from washing it out. */
button[title='All tasks'] {
  color: #475569 !important;
  opacity: 1 !important;
}

button[title='All tasks'] > span:first-child {
  color: #0f172a !important;
  opacity: 1 !important;
  font-weight: 900 !important;
}

button[title='All tasks'] > span:last-child {
  color: #475569 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Searchable enhancement for the Bookkeeping Assignee and Reviewer filters. */
.aoa-native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.aoa-search-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 132px;
  max-width: 220px;
  height: 34px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.aoa-search-select:focus-within,
.aoa-search-select[data-open='true'] {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.aoa-search-select[data-selected='true'] {
  border-color: #3b82f6;
  background: #eff6ff;
}

.aoa-search-select__input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0 !important;
  outline: 0 !important;
  border-radius: inherit;
  padding: 0 48px 0 10px !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.aoa-search-select[data-selected='true'] .aoa-search-select__input {
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

.aoa-search-select__input::placeholder {
  color: #0f172a !important;
  opacity: 1 !important;
}

.aoa-search-select__clear,
.aoa-search-select__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
}

.aoa-search-select__clear {
  right: 23px;
  font-size: 16px;
  line-height: 1;
}

.aoa-search-select__arrow {
  right: 2px;
  font-size: 10px;
}

.aoa-search-select__clear:hover,
.aoa-search-select__arrow:hover {
  background: rgba(148, 163, 184, 0.16);
  color: #1d4ed8;
}

.aoa-search-select__menu {
  position: fixed;
  z-index: 100000;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
}

.aoa-search-select__option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
  color: #334155;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.aoa-search-select__option:hover,
.aoa-search-select__option[data-active='true'] {
  background: #eff6ff;
  color: #1d4ed8;
}

.aoa-search-select__option[data-selected='true'] {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
}

.aoa-search-select__empty {
  padding: 12px 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
