/* 
CONTENTS
1. CSS Reset
2. Base Elements
3. Containers & Wrappers
4. Inputs & Labels
5. Button Styling
6. Footer
7. Output Wrapper
8. Media Queries
*/

/*******1. CSS Reset******/
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/*******2. Base Elements******/
html,
body {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  background: #be93c5;
  background: linear-gradient(to right, #7bc6cc, #be93c5);
  position: relative;
}

h1 {
  color: #fff;
  font-weight: 500;
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

span {
  font-size: 1.4rem;
  font-weight: 500;
}

p {
  font-size: 0.7rem;
  color: #000;
  font-weight: 500;
}

i {
  margin-right: 0.4rem;
  color: rgb(29, 155, 240);
}

/*******3. Containers & Wrappers******/

.card-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45%;
  min-width: 500px;
  background-color: #00000087;
  border-radius: 6px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.4);
}

.line-break {
  height: 2px;
  width: 100%;
  background-color: #fff;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.main-grid {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.date-of-birth-wrapper,
.calculation-date-wrapper {
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0.25rem auto;
  width: 50%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.calculate-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*******4. Inputs & Labels******/

input {
  padding: 2px 10px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
}

label {
  margin-right: 0.75rem;
  font-size: 1rem;
}

/*******5. Button Styling******/

button {
  border: none;
  border-radius: 6px;
  background-color: #ffffff;
  color: #000;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 2px 10px;
  margin-bottom: 1rem;
  transition: 0.3s;
  cursor: pointer;
}

button:hover {
  background-color: rgb(222, 222, 222);
}

/*******6. Footer******/

.author {
  position: relative;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding-bottom: 1px;
  float: right;
  margin: 0.5rem;
  margin-right: 0;
}

.author:after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 0.4px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.author:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/*******7. Ouput Wrapper******/

.output-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.output-wrapper div {
  height: 4rem;
  width: 4rem;
  background-color: #fff;
  border-radius: 5px;
  color: #000;
  display: grid;
  place-items: center;
  border-radius: 6px;
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.4);
  margin-left: 0.3rem;
  margin-right: 0.3rem;
  padding: 5px;
}

.output-wrapper div:hover {
  background-color: rgb(222, 222, 222);
}

/*******8. Media Queries******/

@media (max-width: 1372px) {
  .main-grid label {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 530px) {
  .card-container {
    min-width: 350px;
  }

  .main-grid {
    flex-direction: column;
    row-gap: 0.5rem;
  }

  button {
    margin-top: 0;
    margin-bottom: 0;
  }

  h1 {
    font-size: 1.2rem;
  }

  label {
    margin-right: 0.3rem;
  }

  .card-container {
    top: 25%;
    left: 50%;
    margin-top: 1rem;
  }

  .output-wrapper div {
    margin-bottom: 1rem;
  }

  #calculate-btn {
    margin-bottom: 1rem;
  }
}
