.favorites-header-group {
  position: relative;
}

.favorites-compare-link {
  position: absolute !important;
  right: 100%;
  top: 50%;
  margin-right: 8px;
  transform: translateY(-50%) translateX(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
  background: #f18918;
  border-radius: 4px;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 8px 10px !important;
  white-space: nowrap;
}

.favorites-header-group.has-compare .favorites-compare-link:not(.is-disabled),
.favorites-header-group:hover .favorites-compare-link:not(.is-disabled),
.favorites-header-group:focus-within .favorites-compare-link:not(.is-disabled) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.favorites-header-group.has-compare .favorites-compare-link i {
  --tw-text-opacity: 1;
  color: #fff !important;
}

.favorites-header-group.has-compare.open .favorites-compare-link {
  background: #020202 !important;
}

.favorites-header-group.has-compare.open .favorites-compare-link i {
  --tw-text-opacity: 1;
  color: rgb(241 137 24 / var(--tw-text-opacity, 1)) !important;
}

.favorites-header-group .favorites-toggle-link i,
.favorites-header-group .favorites-compare-link i,
.favorites-compare-header-actions button i,
.favorites-compare-footer button i,
.favorites-slot-inquiry input,
.favorites-compare-open i {
  margin-right: 4px;
  --tw-text-opacity: 1;
  color: rgb(241 137 24 / var(--tw-text-opacity, 1)) !important;
}

.favorites-compare-header-actions button.btn-warning i,
.favorites-compare-footer button.btn-warning i,
button.favorites-compare-open.btn-warning i,
.favorites-compare-link.btn-warning i {
  color: #fff !important;
}

.favorites-compare-link.is-disabled {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.favorites-dropdown-menu {
  min-width: 280px;
}

.favorites-dropdown-title {
  border-bottom: 1px solid #efefef;
  color: #222;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
}

.favorites-dropdown-title .favorites-dropdown-count {
  color: #7f7f7f;
  font-weight: 400;
}

.favorites-empty-state {
  color: #666;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px 14px;
  white-space: normal;
}

.favorites-compare-modal .modal-dialog {
  width: 96%;
  max-width: 1220px;
}

.favorites-compare-modal .modal-content {
  border-radius: 10px;
}

.favorites-compare-modal .modal-header {
  border-bottom: 1px solid #efefef;
  overflow: hidden;
}

.favorites-compare-modal .modal-title {
  font-size: 20px;
  font-weight: 700;
}

.favorites-compare-subtitle {
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

.favorites-compare-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  float: right;
  /* Matches the close button box so both sit on one baseline. */
  min-height: 32px;
}

.favorites-compare-header-actions .btn {
  font-size: 12px;
}

/* Bootstrap's default close is a bare 21px glyph with no hit area. */
.favorites-compare-modal .modal-header .close {
  align-items: center;
  display: flex;
  float: right;
  font-size: 20px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin: 0 0 0 10px;
  opacity: 0.55;
  padding: 0;
  width: 32px;
}

.favorites-compare-modal .modal-header .close:hover,
.favorites-compare-modal .modal-header .close:focus {
  opacity: 1;
}

.favorites-compare-toolbar {
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 16px;
}

.favorites-compare-diff-toggle {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 10px;
  margin: 0;
  user-select: none;
}

.favorites-compare-diff-toggle-label {
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

.favorites-compare-diff-toggle-input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.favorites-compare-diff-toggle-track {
  background: #ccc;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  height: 22px;
  position: relative;
  transition: background 0.2s ease;
  width: 44px;
}

.favorites-compare-diff-toggle-track::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  content: "";
  height: 18px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 0.2s ease;
  width: 18px;
}

.favorites-compare-diff-toggle-input:checked + .favorites-compare-diff-toggle-track {
  background: #f18918;
}

.favorites-compare-diff-toggle-input:checked + .favorites-compare-diff-toggle-track::after {
  transform: translateX(22px);
}

.favorites-compare-toolbar .favorites-compare-selection-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.favorites-compare-url-preview {
  background: #f7f7f7;
  border: 1px solid #ececec;
  border-radius: 4px;
  color: #777;
  font-family: monospace;
  font-size: 11px;
  padding: 7px 9px;
  width: 100%;
}

.favorites-compare-table-wrap {
  max-height: 60vh;
  overflow: auto;
}

.favorites-compare-table {
  table-layout: fixed;
  width: 100%;
}

.favorites-compare-table th,
.favorites-compare-table td {
  border-bottom: 1px solid #f1f1f1;
  vertical-align: top;
}

.favorites-compare-table th:first-child,
.favorites-compare-table td:first-child {
  background: #fff;
  border-right: 1px solid #f1f1f1;
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 2;
}

.favorites-compare-table .compare-col-header {
  min-width: 220px;
  padding: 10px;
}

.favorites-compare-col-empty {
  background: #fafafa;
}

.favorites-slot-placeholder {
  color: #8d8d8d;
  font-size: 11px;
  font-weight: 400;
}

.favorites-slot-photo {
  background: #f2f2f2;
  border-radius: 4px;
  display: block;
  margin-bottom: 8px;
  overflow: hidden;
  /* The source thumbnail is 3:2; the 16:9 frame the design asks for is cropped
     here so no extra sorl geometry has to be generated for the catalogue. */
  aspect-ratio: 16 / 9;
  width: 100%;
}

.favorites-slot-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.favorites-slot-photo-fallback {
  align-items: center;
  color: #c4c4c4;
  display: flex;
  font-size: 22px;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.favorites-slot-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  overflow-wrap: anywhere;
}

a.favorites-slot-title {
  color: #0d6ea8;
}

a.favorites-slot-title:hover,
a.favorites-slot-title:focus {
  color: #f18918;
  text-decoration: underline;
}

.favorites-slot-type {
  color: #8d8d8d;
  font-size: 11px;
  margin-bottom: 8px;
}

.favorites-slot-header-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  /* Without an explicit minimum the select is sized by its widest option and
     pushes the column wider than the table cell. */
  min-width: 0;
}

.favorites-slot-header-controls .form-control {
  font-size: 12px;
  height: 32px;
}

.favorites-slot-header-controls .favorites-slot-select {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorites-slot-remove {
  align-items: center;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  color: #666;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-width: 32px;
}

.favorites-slot-inquiry {
  color: #666;
  font-size: 11px;
  font-weight: 600;
  margin-top: 7px;
}

.favorites-compare-category-row td {
  background: #f8f8f8 !important;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.favorites-compare-spec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.favorites-compare-price-unit {
  font-size: 11px;
  height: 28px;
  margin-top: 6px;
  max-width: 100%;
  padding: 2px 6px;
}

.favorites-compare-price-line + .favorites-compare-price-line {
  color: #666;
  font-size: 12px;
}

.favorites-facility-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.favorites-facility-pill {
  background: #f1f1f1;
  border-radius: 3px;
  color: #444;
  display: inline-block;
  font-size: 11px;
  line-height: 1.4;
  padding: 2px 7px;
  white-space: nowrap;
}

.favorites-facility-pill-more {
  background: #e6e6e6;
  cursor: help;
  font-weight: 600;
}

.favorites-facility-pill-more:focus {
  outline: 2px solid #f18918;
  outline-offset: 1px;
}

.favorites-row-handle {
  color: #a7a7a7;
  cursor: grab;
  display: inline-grid;
  flex: 0 0 auto;
  gap: 2px;
  grid-template-columns: repeat(2, 3px);
  grid-template-rows: repeat(3, 3px);
  min-height: 24px;
  min-width: 18px;
  padding: 4px;
  touch-action: none;
  user-select: none;
}

body.favorites-compare-row-dragging,
body.favorites-compare-row-dragging .favorites-compare-table-wrap {
  cursor: grabbing;
  user-select: none;
}

.favorites-compare-spec-label-cell {
  user-select: none;
}

.favorites-compare-spec-row.is-dragging .favorites-row-handle {
  cursor: grabbing;
}

.favorites-compare-category-row.drag-over-category td {
  box-shadow: inset 0 -3px 0 #f18918;
}

.favorites-row-handle span {
  background: currentColor;
  border-radius: 50%;
  display: block;
  height: 3px;
  width: 3px;
}

.favorites-compare-spec-row.is-dragging {
  opacity: 0.45;
}

.favorites-compare-spec-row.drag-over-top td {
  box-shadow: inset 0 3px 0 #f18918;
}

.favorites-compare-spec-row.drag-over-bottom td {
  box-shadow: inset 0 -3px 0 #f18918;
}

.favorites-description-toggle,
.favorites-expandable-toggle {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.favorites-expandable-toggle i {
  color: #f18918 !important;
  margin-right: 4px;
}

.favorites-description-body {
  font-size: 12px;
  line-height: 1.45;
}

.favorites-compare-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid #efefef;
  display: flex;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  padding: 12px 16px;
  z-index: 3;
}

.favorites-compare-footer .selected-count {
  font-size: 14px;
  font-weight: 700;
}

.favorites-compare-step {
  display: none;
  --tw-text-opacity: 1;
  /* color: rgb(241 137 24 / var(--tw-text-opacity, 1)); */
  /* font-weight: 700; */
}

.favorites-compare-step.is-active {
  display: block;
}

.favorites-compare-step.is-active i {
  margin-right: 4px;
}

.favorites-inquiry-selected-list {
  border: 1px solid #ececec;
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}

.favorites-inquiry-selected-item {
  border-bottom: 1px solid #f1f1f1;
  font-size: 13px;
  padding: 9px 12px;
}

.favorites-inquiry-selected-item .favorites-inquiry-address {
  display: inline-block;
  font-weight: 600;
}

.favorites-inquiry-selected-item .favorites-inquiry-provider {
  color: #777;
  display: inline-block;
  font-size: 12px;
  margin-top: 2px;
  float: right;
}

.favorites-inquiry-selected-item:last-child {
  border-bottom: 0;
}

.favorites-compare-status {
  color: #666;
  font-size: 12px;
  margin-top: 8px;
}
