/*
 * Dashboard login (/dashboard/login): same look as the public /contact page.
 * Self-contained copy of the rules it needs from frontend/public/styles/style.css
 * (header.header-plain background, section.contact-form card, form.contact fields,
 * .error-message / .success-message), so it loads from /dashboard/assets/** on the local
 * Spring server (8080), through the Vite proxy (5173/4173) and through the Firebase
 * /dashboard/** rewrite alike. The background image is a copy of
 * frontend/public/images/brat/image2.png. Keep in sync if the contact page changes.
 * Breakpoints as the public site: 481px tablet, 769px laptop, 1025px desktop, 1200px tv.
 */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,400;8..144,600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lobster&display=swap");

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

body {
  font-size: 100%;
  overflow-x: hidden;
  font-family: "Roboto Flex", sans-serif;
  background-color: #000000;
}

/* ---- header = page background (public header.header.header-plain) ---- */
header.header.header-plain {
  display: flex;
  flex-direction: column;
  min-height: max(100vh, 1040px);
  background-image: radial-gradient(circle at 0% 50%, rgba(0, 0, 0, 0.9) 30%, rgba(0, 0, 0, 0.4) 90%), url("../images/login-background.png");
  background-size: 100% 100%, cover; /* gradient full size; image covers the width (square image) */
  background-position: 60% bottom;
  background-repeat: no-repeat;
}

/* Top bar with the logo only (public header-main-section: 90px, dotted line). */
header.header .header-main-section {
  border-bottom: 1px #CCCCCC dotted;
}
header.header .header-main-section .header-basic {
  height: 90px;
  display: flex;
  align-items: center;
  margin-left: 20px;
}
header.header .company {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #DDDDDD;
}
header.header .company > * {
  color: inherit;
}
.logo-font {
  font-family: "Lobster", cursive;
  font-size: 24px;
  text-decoration: none;
}
.logo-font.small {
  font-size: 16px;
}

/* ---- card (public section.contact-form) ---- */
section.contact-form {
  position: relative;
  margin-top: 20px;
  padding: 0 16px;
}
section.contact-form div.contact-form-container {
  width: 330px;
  max-width: 100%;
  margin: 0 auto;
  padding: 30px;
  position: relative;
  left: 0; /* public: -30px; kept at 0 on phones so the card never leaves a 320px screen */
  border-radius: 20px;
  background-color: #F2EBDE;
}
section.contact-form div.text {
  font-size: 16px;
}
section.contact-form div.text h3 {
  font-size: 0.875em;
  color: #666666;
  margin-bottom: 20px;
}
section.contact-form div.text h1 {
  font-size: 3em;
  margin-bottom: 30px;
}
section.contact-form div.contact-form-container article > p {
  font-weight: bold;
  margin-top: 50px;
  margin-bottom: 30px;
  color: #222222;
  font-size: 1em;
}

/* ---- form (public form.contact; username / password share one style and height) ---- */
form.contact {
  display: grid;
  grid-template-columns: repeat(1, 100%);
  grid-template-areas: "username" "password" "submit";
  grid-column-gap: 20px;
}
form.contact div.username {
  grid-area: username;
}
form.contact div.password {
  grid-area: password;
}
form.contact div.submit {
  grid-area: submit;
}
form.contact div {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  min-width: 0;
}
form.contact div.submit {
  align-items: center;
  justify-content: center;
}
form.contact div label {
  align-self: start;
  font-size: 0.75em;
  color: #666666;
  margin-bottom: 5px;
}
form.contact div input[type=text],
form.contact div input[type=password] {
  width: 100%;
  height: 2.25em;
  padding: 5px;
  border-radius: 5px;
  border: 1.5px #CCCCCC solid;
  background-color: #FFFFFF;
  color: #222222;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}
form.contact div input[type=text]:focus,
form.contact div input[type=password]:focus {
  outline: 2px solid #222222;
  outline-offset: 1px;
}
form.contact div input[type=submit] {
  font-family: inherit;
  font-size: 0.875em;
  border: 1.5px #222222 solid;
  background-color: #F2EBDE;
  color: #222222;
  padding: 10px;
  margin-top: 20px;
  width: 200px;
  cursor: pointer;
}

/* ---- messages (public .error-message / .success-message) ---- */
.error-message {
  width: 90%;
  margin: 0 auto 20px auto;
  border-left: #33000a 10px solid;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 1px 1px rgba(255, 153, 172, 0.2);
  background-color: #ff99ac;
}
.success-message {
  width: 90%;
  margin: 0 auto 20px auto;
  border-left: #053300 10px solid;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 1px 1px rgba(163, 255, 153, 0.2);
  background-color: #a3ff99;
}

@media screen and (min-width: 481px) {
  /* tablet */
  header.header.header-plain {
    background-position: 50% bottom;
  }
  section.contact-form div.contact-form-container {
    width: 70%;
    padding: 30px;
    left: -30px;
  }
}

@media screen and (min-width: 769px) {
  /* laptop */
  header.header.header-plain {
    background-position: 40% bottom;
  }
  header.header .header-main-section .header-basic {
    margin-left: 50px;
  }
  section.contact-form {
    padding: 0;
  }
  section.contact-form div.contact-form-container {
    width: 700px;
    padding: 80px;
    left: -100px;
  }
  section.contact-form div.text h1 {
    font-size: 4em;
  }
  /* Same row layout as e-mail / tel on the contact form. */
  form.contact {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* public: 50% 50% + gap overflows by 20px */
    grid-template-areas: "username password" "submit submit";
  }
}

@media screen and (min-width: 1025px) {
  /* desktop */
  header.header.header-plain {
    background-position: 0 90%;
  }
}

@media screen and (min-width: 1200px) {
  /* tv */
  header.header.header-plain {
    background-image: radial-gradient(circle at 0% 50%, rgb(0, 0, 0) 50%, rgba(0, 0, 0, 0.4) 90%), url("../images/login-background.png");
    background-position: right 40%;
  }
}
