html {
  scroll-behavior: smooth;
}

::selection {
  background: #ffffff;
  color: #000000;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.nav-active {
  color: #ffffff;
}

.nav-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, #0066b1, #1c69d4, #e22718);
}

.profile-menu-button,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 42px;
  border: 1px solid #3c3c3c;
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.profile-menu-button {
  width: 100%;
  justify-content: flex-start;
  background: #0d0d0d;
  color: #bbbbbb;
}

.profile-menu-button:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.profile-menu-button--danger:hover {
  border-color: #e22718;
  color: #ffffff;
}

.action-button--light {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.action-button--light:hover {
  background: transparent;
  color: #ffffff;
}

.action-button--dark {
  background: #0d0d0d;
  color: #ffffff;
}

.action-button--dark:hover {
  border-color: #ffffff;
}

.search-button {
  height: 3rem;
  min-height: 3rem;
  padding-top: 0;
  padding-bottom: 0;
}

#profileModal,
#exportModal {
  overscroll-behavior: contain;
}

#profileModal > div,
#exportModal > div {
  animation: modal-enter 160ms ease-out;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#profileMenu {
  animation: menu-enter 120ms ease-out;
}

@keyframes menu-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#profileButton {
  justify-content: flex-end;
}

#headerProfileName,
#headerProfileJob {
  text-align: right;
}

@media (max-width: 767px) {
  #mainNav {
    display: none;
  }
}

@media (max-width: 640px) {
  #siteHeader > div {
    min-height: 68px;
    gap: 12px;
  }

  main {
    padding-top: 68px;
  }

  #dashboard,
  #transaction,
  #history {
    scroll-margin-top: 68px;
  }

  #transactionForm button,
  #searchTransactionForm button {
    width: 100%;
  }
}

#profileModal,
#exportModal {
  pointer-events: auto;
}

#profileModal > div,
#exportModal > div {
  pointer-events: auto;
  isolation: isolate;
}

#profileSubmitButton {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
