/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  height: 100%;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* end of css reset */

/* fonts */

@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300&display=swap");

/* colors */

:root {
  --header-background: #f5f5f5;
  --send-invoice-btn-backgound: #3770ed;
  --main-header-color: #f0a502;
  --main-hover-color: #f0b100;
}

.container {
  margin: 0 auto;
  padding-bottom: 3em;
  max-width: 1000px;
  font-family: "Roboto", sans-serif;
  position: relative;
}

.inner-container {
  display: none;
  padding: 0 1em;
}

header {
  padding: 2em;
  background-color: var(--header-background);
  text-align: center;
}

header h1 {
  text-transform: uppercase;
  font-weight: 700;
  color: var(--main-header-color);
}

header p {
  font-size: 0.825rem;
  font-weight: 300;
  color: darkgrey;
}

.user-details-container {
  margin-top: 2em;
  display: flex;
  justify-content: space-between;
  text-align: start;
}

.item-input-box {
  margin-top: 2em;
  display: flex;
  width: 100%;
  text-align: center;
}

.input-left {
  padding: 0.6em;
  width: 90%;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  border: 1px solid lightgray;
}

.input-currency {
  width: 40%;
  border: 1px solid lightgray;
  padding-left: 0.5em;
}

.input-quantity {
  width: 20%;
  border: 1px solid lightgray;
  text-align: center;
}

.add-inputs {
  width: 15%;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  border: 1px solid #f0a502;
  cursor: pointer;
  background-color: var(--main-header-color);
  color: white;
  font-weight: 900;
  transition: 0.4s;
}

.add-inputs:hover {
  background-color: var(--main-hover-color);
  border: 1px solid #f0b100;
  transition: 0.4s;
}

.add-inputs:active {
  background-color: darkblue;
  border: 1px solid darkblue;
}

input::placeholder {
  opacity: 0.6;
}

.currency-select {
  position: relative;
  cursor: pointer;
}

.currency-select option {
  position: absolute;
  top: 90%;
  left: 0;
}

.currency-select,
.currency-select option {
  border: 1px solid lightgray;
}

/* INPUT SECTION */

.btn {
  font-size: 0.825rem;
  border: 1px solid gray;
  border-radius: 5px;
  padding: 0.5em 1em;
  background-color: #fff;
  cursor: pointer;
  transition: 0.4s;
}

.btn:hover {
  background-color: lightgray;
  transition: 0.4s;
}

.top-headlines {
  margin-top: 2em;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* display: flex;
  justify-content: space-between; */
}

.top-headlines h3 {
  color: #808080;
  text-align: center;
}

.total-summary-box {
  border-top: 1px solid grey;
  padding-top: 1em;
  margin-top: 2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-output-box h3,
.total-summary-box h3 {
  font-size: 0.825rem;
  text-transform: uppercase;
  color: grey;
}

.send-invoice-btn {
  margin-top: 2em;
  margin-top: 2em;
  border-radius: 5px;
  color: #fff;
  padding: 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: var(--main-header-color);
  cursor: pointer;
  transition: 0.4s;
}

.send-invoice-btn:hover {
  background-color: var(--main-hover-color);
  transition: 0.4s;
}

/* html output elements */

.item-output {
  margin-top: 0.5em;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.5em;
}

/* total output */
#note-output {
  margin-top: 1em;
  font-size: 0.8rem;
}

.adjust-class {
  margin-top: 1em;
  text-align: end;
  padding-right: 0.8em;
}

.item-flex {
  margin-top: 0.5em;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 0.5em; */
}

.item-flex div:first-child,
.top-headlines h3:first-child {
  text-align: start;
}

.item-flex div:nth-child(2),
div:nth-child(3) {
  text-align: center;
}

.item-flex div:last-child,
.top-headlines h3:last-child {
  text-align: end;
}

.item-holder {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
}

.item-holder p {
  font-size: 0.725rem;
}

/* remove item select element */

.remove-item p {
  color: lightgray;
}

.remove-item:hover {
  cursor: pointer;
}

.currency-adjust {
  margin-right: 0;
}

#total-output {
  margin-top: 1em;
  display: flex;
  justify-content: end;
}

.total-amount-box {
  display: block;
}

.total-amount-box p {
  font-size: 0.8rem;
}

.total-amount-el {
  text-align: end;
}

.submit-details-btn {
  margin-top: 3em;
  padding: 0.5em 2em;
  font-size: 1.2rem;
  border: none;
  border-radius: 5px;
  color: white;
  background-color: var(--main-header-color);
  cursor: pointer;
  transition: 0.4s;
}

.submit-details-btn:hover {
  background-color: var(--main-hover-color);
  transition: 0.4s;
}

/* user details */

.user-details {
  margin-top: 0.5em;
  padding: 1em;
}

.user-flex {
  margin-top: 1em;
  text-align: start;
}

.user-flex h4 {
  color: var(--main-header-color);
}

.due-date-style {
  color: red;
}

.due-date-border {
  border: 1px solid darkgrey;
  padding: 0.2em;
}

.flex {
  margin-top: 0.5em;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.flex-bottom {
  margin-top: 1.5em;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.flex-bottom-left-col {
  text-align: start;
}

.flex-bottom-left-col h4 {
  margin-top: 1em;
  color: var(--main-header-color);
}

/* ********** */
/* FORM STYLE */
/* ********** */

#form-area {
  display: none;
}

form {
  padding: 1em;
  margin: 0 auto;
  max-width: 1000px;
}

form h2 {
  color: var(--main-header-color);
  font-weight: 900;
}

form {
  color: darkgrey;
}

label {
  margin-top: 1em;
}

.form-headline {
  text-align: center;
}

fieldset {
  display: flex;
  flex-direction: column;
  border: none;
}

.fieldset-1 {
  padding: 1em;
  margin-top: 2em;
}

.fieldset-2,
.fieldset-3 {
  padding: 1em;
  margin-top: 1em;
}

fieldset legend {
  color: var(--main-header-color);
}

.fieldset-1 input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="tel"] {
  border: 1px solid lightgrey;
  padding: 0.5em 1em;
  background-color: #f9f9f9;
  cursor: pointer;
}

.fieldset-2 input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="email"] {
  border: 1px solid lightgrey;
  padding: 0.5em 1em;
  background-color: #f9f9f9;
}

.fieldset-3 input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="email"] {
  border: 1px solid lightgrey;
  padding: 0.5em 1em;
  background-color: #f9f9f9;
}

legend {
  font-size: 1.5rem;
}

#submit-form-button {
  border-radius: 10px;
  border: none;
  margin-top: 2em;
  padding: 1em 2em;
  width: 100%;
  cursor: pointer;
  color: white;
  background-color: var(--main-header-color);
  transition: 0.4s;
}

#submit-form-button:hover {
  background-color: var(--main-hover-color);
  transition: 0.4s;
}

@media (min-width: 800px) {
  fieldset {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
    border: none;
  }
}

/* ************** */
/* POP UP STYLING */
/* ************** */

.popup-wrapper {
  margin: 1em;
  padding: 1em;
  border: 1px solid lightgray;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
}

/* Classlist hide/show */

.show {
  display: block;
}

.hide {
  display: none;
}

@media only screen and (max-width: 768px) {
  .popup-wrapper {
    width: 90%;
    height: 70%;
    top: 15%;
    left: 1.5%;
    transform: none;
  }
}

@media only screen and (max-width: 512px) {
  .popup-wrapper {
    height: 75%;
  }
}

@media only screen and (max-width: 413px) {
  .popup-wrapper {
    height: 82%;
  }
}

.popup-wrapper h2 {
  text-align: center;
  color: var(--main-header-color);
}

.popup-wrapper h4 {
  padding: 1em;
  margin-top: 1em;
  text-align: center;
  color: darkgrey;
}

.popup-wrapper p {
  margin-top: 1em;

  color: darkgrey;
}

.popup-btn-box {
  margin-top: 1em;
  display: flex;
  justify-content: center;
}

.popup-btn {
  border-radius: 10px;
  border: none;
  margin-top: 2em;
  padding: 1em 2em;
  width: 100%;
  cursor: pointer;
  color: white;
  background-color: var(--main-header-color);
  transition: 0.4s;
}

.popup-btn:hover {
  background-color: var(--main-hover-color);
  transition: 0.4s;
}

/* ACCOUNT DETAILS BOX */

.pdf-adjust {
  margin-top: 0;
}

.hide {
  display: none;
}
