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

:root {
  color-scheme: dark;
}

html,
body {
  overscroll-behavior-y: contain;
}

.app-shell {
  background-color: #000;
  color: #fff;
  font-family: sans-serif;
  margin: 0;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app-navigation,
.app-form {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

.app-navigation {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.5rem 0;
}

.app-navigation__link {
  color: #93c5fd;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.app-navigation__logout {
  margin: 0;
}

#flash {
  box-sizing: border-box;
  max-width: 600px;
  pointer-events: none;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  top: max(1rem, env(safe-area-inset-top));
  width: min(600px, calc(100% - 2rem));
  z-index: 1;
}

.app-flash {
  box-sizing: border-box;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1.5rem;
}

.app-flash--notice { background-color: #14532d; }
.app-flash--alert { background-color: #991b1b; }

.app-form {
  padding: 1.5rem;
}

.app-form__field,
.app-thought-input {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
}

.app-form__field {
  margin-bottom: 0.75rem;
  width: 100%;
}

.app-button,
.app-actions button,
.app-actions input[type="submit"] {
  min-height: 44px;
}

.app-button {
  background: #2563eb;
  border: 0;
  border-radius: 0.25rem;
  color: #fff;
  padding: 0.5rem 0.75rem;
}

.app-button--secondary {
  background: transparent;
  border: 1px solid #6b7280;
}

.app-actions,
.app-page-header,
.app-page-header__links {
  flex-wrap: wrap;
}

.app-actions form {
  margin: 0;
}

@media (max-width: 480px) {
  .app-navigation,
  .app-form {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .app-page-header {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .app-actions > form,
  .app-actions > button,
  .app-page-header__links {
    flex: 1 1 auto;
  }
}
