/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory 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 bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  --primary-color-raw: 50, 67, 132;
  --primary-color: rgb(var(--primary-color-raw));
  --alt-text-color: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

  &:hover {
    text-decoration: underline;
  }
}

body {
  background-color: var(--primary-color);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
}


.main_header {
  padding: 1em 1.5em;
}

.main_header .container {
  align-items: center;
  display: flex;
}

.main_header h1 {
  color: var(--alt-text-color);
  font-size: 2.8em;
  margin: 0;
}

.main_header nav {
  margin-left: auto;
}

.main_header ul {
  margin: 0;
  padding: 0;
}

.main_header li {
  display: inline;
  list-style: none;
}

.main_header a {
  color: var(--alt-text-color);
  display: inline-block;
  font-size: 1.2em;
  font-weight: bold;
  padding: 1.2em 1em;
  text-decoration: none;
}

.main_header a:hover, .main_header a:active {
  color: var(--alt-text-color);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.main_content {
  background-color: white;
  padding: 2em 0;
}

.main_footer {
  color: var(--alt-text-color);
  width: 100%;
}

.main_footer .container {
  display: flex;
  justify-content: space-between;
  padding: 2em 1.5em;
}

.contact_details {
  text-align: right;
}

.footer_logo {
  display: inline-block;
  height: auto;
  margin-top: 1.5em;
  max-width: 180px;
}

.hero {
  margin-top: -2em;
  width: 100%;
}

.index {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

.index,
.showroom {
  padding: 0 1.5em;
}

#map {
  background-color: rgba(var(--primary-color-raw), .2);
  height: 400px;
  margin: -2em 0 2em;
  width: 100%;
}

.car {
  display: flex;
  flex-direction: row;
  margin-bottom: 1em;
  padding: 1.5em 0;
  width: 100%;
}

.car__images img {
  max-width: 100%;
}

.car__images--primary {
  margin-bottom: 1em;
  width: 100%;
}

.car__images img:not(.car__images--primary) {
  max-width: 46%;
}

.car__details {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-left: 2em;
}

.car__header {
  display: flex;
  flex-direction: row;
}

.car__title,
.car__price p {
  margin: 0;
}

.car__price {
  margin: .5em 0;
}

.car__title {
  margin-top: 0;
  width: 100%;
}

.car__meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.car__price {
  font-size: 1.5em;
  padding-right: 2em;
}

.car__price p {
  margin-top: .1em;
}

.car__registration,
.car__milage,
.car__year {
  margin-bottom: .5em;
}

.car--featured {
  background-color: rgba(var(--primary-color-raw), .1);
  margin: -2em 0 3em;
}

.car--individual {
  padding: 2em 1.5em;
}

.car__images {
  flex: 1 1 40%;
}

.car__details {
  flex: 1 1 60%;
}

.index .featured_car {
  flex: 0 0 50%;
}

.index .car--featured {
  margin: 0;
  padding: 1em;
}

.index .car__header {
  flex-direction: column;
}

.index .car__title,
.index .car__price p {
  margin: 0;
}

.index .car__price {
  margin-bottom: .5em;
}

.showroom .car--featured .car__images {
  padding-left: 1.5em;
}

.showroom .car__images {
  width: 35%;
}

form {
  display: flex;
  flex-direction: row;
  gap: 2em;
  margin: 2em 0;
}

form .left,
form .images {
  flex: 1 0 50%;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: .5em;
}

.field label {
  line-height: 2em;
}

form footer {
  margin-top: 3em;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

.row .field {
  flex: 1;
}

input:not([type="file"]),
textarea {
  padding: .5em;
  outline: 0;
  border: 1px solid #ccc;
  border-radius: 3px;
}

textarea {
  min-height: 300px;
}

input:focus,
textarea:focus {
  border: 1px solid #303030;
}

form button {
  background-color: var(--primary-color);
  border: 0;
  color: var(--alt-text-color);
  margin: 0 auto;
  font-size: 1em;
  padding: 0.8em 1.6em;
}


/*   &#new_user { */
/*     flex-direction: column; */
/*     width: 50%; */

/*     br { */
/*       display: none; */
/*     } */

/*     .field { */
/*       width: 100%; */
/*     } */
/*   } */

/*   &.edit_car_image { */
/*     flex-direction: column; */
/*     width: 50%; */

/*     footer { */
/*       margin-top: 0; */

/*       button { */
/*         margin: 0; */
/*       } */
/*     } */
/*   } */

.left {
  padding-right: 2em;
}

.images .field {
  margin-top: 1.5em;
}


table {
  background-color: white;
  width: 100%;
}

table th {
  text-align: left;
}

th,
td {
  padding: .5em;
}

tbody tr:nth-child(odd) {
  background-color: rgba(var(--primary-color-raw), 0.1);
}

.button {
  background-color: var(--primary-color);
  color: var(--alt-text-color);
  padding: .5em .75em;
}


@media only screen and (max-width: 767px) {
  .main_header {
    padding: .5em;
  }

  .main_header .container {
    flex-direction: column;
  }

  .main_header h1, .main_header nav {
    margin-left: 0;
    text-align: center;
  }

  .main_content {
    padding: 1em 1em;
  }

  .main_footer .container {
    flex-direction: column-reverse;
    padding: 1em 0;
    text-align: center;
  }

  .main_footer .contact_details {
    text-align: center;
  }

  .index {
    display: block;
    padding: 0 1em;
  }

  .car.car--featured .car__details {
      padding: 0 1.5em;
  }

  #map {
    height: 250px;
  }

  .contact {
    padding: 0 1em;
  }

  .car {
    display: block;
    flex-direction: column;
  }

  .index .car--featured {
    padding: 0;
  }

  .showroom .car__images {
    padding: 0;
    width: 100%;
  }

  .showroom .car--featured .car__images {
    padding: 0;
  }

  .car .car__details {
    margin-left: 0;
  }

  .car .car__header {
    flex-direction: column;
  }

  .car .car--individual {
    padding: 1em 1.5em;
  }

  .car .car__footer {
    text-align: center;
  }

  form {
    flex-direction: column;
  }
}
