/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *


 */

/* universal */

:root {
  --color-background-accent: #eee;
  --color-background-danger: #630;
  --color-background-info: #036;
  --color-background-primary: #006;
  --color-background-success: #063;
  --color-background: #fff;
  --color-button-text: #fff;
  --color-h1: #063;
  --color-text: #000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background-accent: #111;
    --color-background: #000;
    --color-h1: #096;
    --color-text: #fff;
  }
  a {
    color: #ccf;
  }
  a:visited {
    color: #fcf;
  }
}

html {
  overflow-y: scroll;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  margin: 0;
  font-size: 16px;
}

main {
  display: block;
  margin: 0 auto;
  max-width: 96vw;
  min-height: 75vh;
}

label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 4px;
  font-weight: bold;
}

textarea {
  resize: both;
  width: 80%;
  height: 100px;
}

.center {
  text-align: center;
}

.pull-left {
  float: left;
  text-align: left;
}

.pull-right {
  float: right;
  text-align: right;
}

header {
  background-color: var(--color-background-accent);
  color: var(--color-text);
  margin-bottom: 8px;
  padding: 8px;
}
header a {
  text-decoration: none;
}
header nav {
  line-height: 1.5;
}
header nav ul {
  margin: 0;
}
header nav ul li {
  display: inline;
}
header nav ul li a.active {
  font-weight: bold;
}
header .header-first-row {
  display: flex;
  justify-content: space-between;
}
header .header-first-row nav ul li {
  display: list-item;
}
header #logo {
  float: left;
  display: inline;
  font-size: 2em;
  font-weight: bold;
  letter-spacing: -1px;
  line-height: 1;
  margin-right: 10px;
  text-transform: uppercase;
}
header #logo:hover {
  color: var(--color-background-info);
  text-decoration: none;
}

/* typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1;
}
h1 {
  color: var(--color-h1);
  font-size: 3em;
  font-weight: bold;
  letter-spacing: -2px;
  margin-bottom: 30px;
  text-align: center;
}
h2 {
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: -1px;
  text-align: center;
}
p {
  font-size: 1.1em;
  line-height: 1.7em;
}

/* navigation */
nav ul {
  list-style-type: none;
  padding-inline-start: 0;
}
nav ul li {
  font-size: 1.1em;
  display: inline;
  padding-right: 6px;
}

/* posts */
.post {
  background-color: var(--color-background-accent);
  margin: 0 auto;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.post .row {
  margin: 2px;
  overflow-x: auto;
}

/* comments */
.comment {
  margin-left: 25%;
  margin-right: 25%;
  word-wrap: break-word;
}

/* footer */
footer {
  border-top: 1px solid #eee;
  display: block;
  width: 100%;
}
footer nav {
  display: inline-flex;
}
footer nav li {
  margin: 2px;
}

/* buttons */
.btn {
  border-radius: 8px;
  display: inline-block;
  padding: 10px;
  text-decoration: none;
}
.btn.btn-lg {
  padding: 10px 16px;
  font-size: 1.2em;
  line-height: 1.4;
  border-radius: 6px;
}
.btn.btn-primary {
  background-color: var(--color-background-primary);
  color: var(--color-button-text);
}
.btn.btn-info {
  background-color: var(--color-background-info);
  color: var(--color-button-text);
}
.btn.btn-success {
  background-color: var(--color-background-success);
  color: var(--color-button-text);
}
.btn.btn-danger {
  background-color: var(--color-background-danger);
  color: var(--color-button-text);
}
.btn-group {
  display: inline-block;
}

/* fields */
input {
  font-size: 1em;
  padding: 2px;
}
.field {
  padding-bottom: 8px;
}
.field_with_errors label {
  padding: 2px;
  background-color: var(--color-background-danger);
  color: var(--color-button-text);
}
.field_with_errors input[type="text"] {
  padding: 3px 2px;
  border: 2px solid #f00;
}
