/* ******************* VARIABLES *********************** */
/* ***************************************************** */

:root {
  --surface: lightgray;
  --subdued-surface: rgb(202, 197, 197);

  --primary: coral;
  --primary-subdued: rgb(158, 76, 47);
}

/* **************** GENERAL STYLES ********************** */
/* ****************************************************** */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  font-size: 14px;
}

/* ************** TITLES AND TEXTS ************************* */
/* *********************************************** */

h1,
h2,
h3 {
  font-family: "Permanent Marker", cursive;
  margin-bottom: 16px;
}

h1 {
  font-size: 28px;
}

h2 {
  font-weight: 500;
}

p {
  font-size: 16px;
}

.author {
  font-family: "Roboto", sans-serif;
}

/* ******************* BUTTONS ************************** */
/* ****************************************************** */

.button {
  font-family: inherit;
  cursor: pointer;
  width: 70%;
  max-width: 336px;
  padding: 12px 4px;
  border-width: 0;
  border-radius: 10px;
  margin-bottom: 16px;
}

.primary-button {
  background-color: var(--primary);
  color: white;
}

.secondary-button {
  background-color: white;
}

.button:active {
  position: relative;
  top: 1px;
  background-color: var(--primary-subdued);
}

/* ************** SECTIONS ************************** */
/* ************************************************** */

main {
  width: 100%;
  max-width: 1000px;
  background-color: var(--surface);
  padding: 20px;
  border-radius: 20px;
  display: grid;
  justify-items: center;
}

.section {
  width: 100%;
  display: grid;
  justify-items: center;
}

.random-dogs-section {
  margin-bottom: 50px;
}

.images-container {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 20px;
}

hr {
  width: 100%;
  border: 1px solid var(--subdued-surface);
  margin-bottom: 24px;
}

/* ************** FORM *********************** */

.form-section {
  display: grid;
  justify-items: center;
  width: 100%;
  margin-bottom: 20px;
  text-align: center;
  background-color: var(--primary);
  padding: 12px;
  border-radius: 20px;
}

.form-section p:nth-child(2) {
  margin-bottom: 20px;
}

#form {
  width: 100%;
  display: grid;
  justify-items: center;
}

#choose-btn {
  display: grid;
  place-items: center;
}

#file {
  display: none;
}

.message-container {
  width: 70%;
  max-width: 336px;
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 20px;
}

#wait-message-container {
  background-color: dodgerblue;
}

#success-message-container {
  background-color: green;
}

#error-message-container {
  background-color: red;
}

.message {
  color: white;
}

#preview-img {
  display: none;
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
}

/* ************** IMAGES *********************** */

.img-container {
  width: 100%;
  background-color: white;
  padding: 16px;
  border-radius: 20px;
}

.dog-img {
  width: 100%;
  height: 90%;
  border-radius: 20px;
  object-fit: cover;
}

.heart-icon {
  cursor: pointer;
  width: 25px;
}

/* *********************** MEDIA QUERIES ********************** */
/* ************************************************************ */

@media (min-width: 425px) {
  h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 28px;
  }
}

@media (min-width: 768px) {
  h1 {
    font-size: 48px;
  }
  button {
    margin-bottom: 24px;
  }
  .images-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .images-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
