.fixed-pin-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.fixed-pin-btn {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(185, 149, 255, 0.3);
  border-radius: 9px;
  color: rgba(205, 181, 255, 0.58);
  background: rgba(185, 149, 255, 0.055);
  cursor: pointer;
  transition: 160ms ease;
}

.fixed-pin-btn:hover:not(:disabled),
.fixed-pin-btn:focus-visible {
  border-color: rgba(185, 149, 255, 0.72);
  color: #d7c2ff;
  background: rgba(185, 149, 255, 0.13);
  outline: none;
  box-shadow: 0 0 11px rgba(185, 149, 255, 0.22);
}

.fixed-pin-btn.is-pinned {
  border-color: #b995ff;
  color: #e3d4ff;
  background: linear-gradient(145deg, rgba(185, 149, 255, 0.2), rgba(118, 75, 190, 0.11));
  box-shadow: 0 0 8px rgba(185, 149, 255, 0.26);
}

.fixed-pin-btn.is-forced:disabled {
  cursor: default;
  opacity: 1;
}

.fixed-row-actions {
  display: flex;
  direction: rtl;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fixed-pin-form-field {
  grid-area: pin;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 149, 255, 0.25);
  border-radius: 13px;
  background: rgba(185, 149, 255, 0.055);
}

.fixed-pin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.fixed-pin-checkbox-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fixed-pin-checkbox {
  position: relative;
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(185, 149, 255, 0.62);
  border-radius: 6px;
  background: rgba(3, 10, 20, 0.55);
  transition: 160ms ease;
}

.fixed-pin-checkbox-label input:checked + .fixed-pin-checkbox {
  border-color: #b995ff;
  background: linear-gradient(145deg, #b995ff, #7953bd);
  box-shadow: 0 0 12px rgba(185, 149, 255, 0.42);
}

.fixed-pin-checkbox-label input:checked + .fixed-pin-checkbox::after {
  content: "✓";
  color: #07101c;
  font-size: 0.9rem;
  font-weight: 950;
}

.fixed-pin-checkbox-label input:focus-visible + .fixed-pin-checkbox {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.fixed-pin-form-field small {
  padding-inline-start: 32px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.4;
}

.fixed-pin-form-field.is-forced {
  border-color: rgba(185, 149, 255, 0.42);
}

.fixed-pin-form-field.is-forced .fixed-pin-checkbox-label {
  cursor: default;
}

.fixed-pin-toast.is-visible.is-add {
  border-color: rgba(255, 178, 67, 0.58);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), 0 0 24px rgba(255, 178, 67, 0.17);
}

.fixed-pin-toast.is-visible.is-unpinned {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.fixed-pin-toast-icon {
  border-color: rgba(255, 178, 67, 0.52) !important;
  color: #ffc56f !important;
  background: rgba(255, 178, 67, 0.14) !important;
}

.fixed-pin-indicator {
  display: none;
}

@media (min-width: 761px) {
  .all-table-add-modal .variable-expense-form-grid {
    grid-template-areas:
      "date date"
      "description subcategory"
      "amount secondary";
  }

  .fixed-card .actions-heading,
  .fixed-card .action-cell {
    width: 76px;
  }

  .fixed-row-actions .delete-btn {
    border-color: rgba(255, 116, 127, 0.62);
    color: #ff909a;
    background: linear-gradient(145deg, rgba(255, 116, 127, 0.2), rgba(145, 35, 53, 0.12));
    box-shadow: 0 0 9px rgba(255, 116, 127, 0.25);
  }

  .fixed-row-actions .delete-btn:hover,
  .fixed-row-actions .delete-btn:focus-visible {
    border-color: rgba(255, 116, 127, 0.88);
    color: #ffd5d8;
    background: rgba(255, 86, 101, 0.22);
    box-shadow: 0 0 13px rgba(255, 116, 127, 0.38);
  }

  .all-table-add-modal .amount-field .fixed-pin-form-field {
    grid-area: auto;
    gap: 3px;
    margin-top: 2px;
    padding: 8px 10px;
  }

  .all-table-add-modal .amount-field .fixed-pin-checkbox-label {
    gap: 8px;
    font-size: 0.82rem;
  }

  .all-table-add-modal .amount-field .fixed-pin-checkbox {
    flex-basis: 19px;
    width: 19px;
    height: 19px;
  }

  .all-table-add-modal .amount-field .fixed-pin-form-field small {
    padding-inline-start: 27px;
    font-size: 0.68rem;
    line-height: 1.25;
  }
}

@media (max-width: 760px) {
  #fixedBody tr[data-id] {
    position: relative;
    -webkit-touch-callout: none;
  }

  .fixed-pin-indicator {
    position: absolute;
    z-index: 2;
    top: 4px;
    right: 66px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: #ffb23f;
    filter: drop-shadow(0 0 5px rgba(255, 166, 45, 0.38));
    pointer-events: none;
  }

  .fixed-pin-indicator .fixed-pin-icon {
    width: 13px;
    height: 13px;
  }

  .fixed-pin-form-field {
    grid-column: 1 / -1;
    grid-area: auto;
  }

}
