/*
 * 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.
 */
/* app/assets/stylesheets/application.css */
:root {
  --primary-color: #0054A0;
  --contrast-color: #DB8700;
  --link-color: #0088A1;
  --red-color: #BE0A00;
  --green-color: #1A6600;
  --bg-color: #f4f7f6;
  --text-color: #333;
  --white: #ffffff;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

a {
  text-decoration: none;
  color: var(--link-color);
}

a:hover {
  color: color-mix(in srgb, white, var(--link-color));
}

nav.navbar {
  background-image: linear-gradient(to left bottom, var(--primary-color), var(--link-color));
  color: var(--white);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow);
  gap: 1rem;
}

nav.navbar .menu {
  display: flex;
  justify-content: flex-end;
  font-size: 0.875em;
  gap: 1rem;
  align-self: flex-end;
}

nav.navbar a {
  font-weight: bold;
  display: inline-block;
  color: var(--contrast-color);
}

nav.navbar a:hover {
  color: color-mix(in srgb, white, var(--contrast-color));
}

main {
  flex: 1;
  padding: 2rem;
}

div.tools a,
div.tools form {
  display: inline-block;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.date {
  font-size: 0.9rem;
  color: #999;
}

.author {
  font-weight: bold;
  font-size: 0.9rem;
  color: #555;
}

.back_link {
  margin-bottom: 10px;
}

.flex-container {
  display: flex;
  gap: 5px;
}

.error {
  color: red;
}

.pending,
.restricted {
  color: red;
  font-size: .8rem;
}

/* ID'd elements */
#page_title {
  color: var(--white);
}

#log_out_button {
  color: #DB0B00;
}

#log_out_button:hover {
  color: color-mix(in srgb, white 20%, #DB0B00);
}

textarea {
  resize: vertical;
}

textarea.short {
  width: 100%;
  max-width: 500px;
}

input[type="checkbox"] {
  margin-left: 5px;
  width: 15px;
}

form {
  display: flex;
  flex-direction: column;
  margin: 1rem 0;
  gap: 1rem;
}

form table {
  width: 100%;
}

form table input,
form table textarea {
  width: 100%;
}

form table.short-inputs input,
form table.short-inputs textarea {
  width: 100%;
  max-width: 300px;
}

form table .dropdown {
  width: 100%;
  max-width: 308px;
}

form td:first-child,
form th:first-child {
  width: 1%;
  white-space: nowrap;
}

.unverified_message {
  margin-bottom: 1rem;
  color: red;
  font-size: .8em;
}

#filters {
  gap: 1rem;
}

.filter {
  flex-direction: column;
  gap: .1rem;
}

.filter label {
  font-size: .8rem;
}

.filter select,
.filter input {
  width: 125px;
}

.info-text {
  margin-bottom: 1rem;
}

.placeholder {
  color: grey;
}

.field_with_errors input {
  border-style: solid;
  border-color: red;
}

.field_with_errors input:focus {
  outline-color: red;
}

.environment-indicator {
  background-color: var(--green-color);
  color: var(--white);
  text-align: center;
}

.responsive-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

#posts-header {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 1.5rem;
}

.welcome {
  flex-grow: 1;
  text-align: left;
}

.sorting-buttons h4 {
  display: none;
}

@media (min-width: 768px) {
  .responsive-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  #posts-header {
    flex-direction: row;
    align-items: flex-end;
  }

  .welcome {
    text-align: right;
  }

  nav.navbar {
    align-items: baseline;
  }

  nav.navbar .menu {
    align-self: unset;
  }

  .sorting-buttons {
    margin-left: 2rem;
  }

  .sorting-buttons h4 {
    display: inline-block;
  }
}