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

h1,
h2,
h3 {
  max-inline-size: initial;
}
h1 {
  font-size: var(--font-size-5);
}
h2 {
  font-size: var(--font-size-4);
}
h3 {
  font-size: var(--font-size-3);
}

input,
select {
  width: 100%;
}

label + input,
label + select {
  margin-block-start: var(--size-2);
}
table {
  border: none;
}

:root {
  --shadow-bottom-4:
    0 -2px 8px -1px rgba(0, 0, 0, 0.2), 0 -4px 20px -2px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --shadow-bottom-4:
      0 -2px 8px -1px rgba(0, 0, 0, 0.4), 0 -4px 20px -2px rgba(0, 0, 0, 0.3);
  }
}

/* Category color utilities */
.text--bank {
  color: var(--green-6);
}
.text--investment {
  color: var(--blue-6);
}
.text--asset {
  color: var(--purple-6);
}
.text--liability {
  color: var(--orange-6);
}

/* Border color utilities for categories */
.border--bank {
  border-color: var(--green-6);
}
.border--investment {
  border-color: var(--blue-6);
}
.border--asset {
  border-color: var(--purple-6);
}
.border--liability {
  border-color: var(--orange-6);
}

/*Generic page layout*/
.page-wrapper {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
  overflow: hidden;
}
.page {
  overflow-y: auto;
  padding: var(--size-4);
}
@media (max-width: 768px) {
  .page {
    padding: var(--size-1);
  }
}
.page-content--form {
  align-self: center;
  margin-inline: auto;
  max-width: var(--size-content-3);
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--size-2);
  h1 {
    margin: 0;
  }
  .page-header__logo {
    color: var(--text-1);
    text-decoration: none;
    transition: color 0.2s var(--ease-2);

    &:hover {
      color: var(--blue-6);
    }
  }
  .page-header__actions {
    display: flex;
    gap: var(--size-3);
    align-items: center;
  }
}
