@import url('https://www.nerdfonts.com/assets/css/webfont.css');

:root {
  /*===== Colors =====*/ 
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);

  /*===== Font and typography =====*/ 
  --body-font: 'Pretendard-Regular';
  --h1-font-size: 1.75rem; 
  --normal-font-size: 1rem;
  --small-font-size: .814rem;

  /*===== Font weight =====*/ 
  --font-medium: 500;
} /* end of :root */

@font-face {
  font-display: swap;
  font-family: 'Pretendard';
  src: url(../css/font/Pretendard-Regular.woff) format('woff'),
       url(../css/font/Pretendard-Medium.woff) format('woff'),
       url(../css/font/Pretendard-Bold.woff) format('woff'),
       url(../css/font/Pretendard-Light.woff) format('woff'),
       url(../css/font/Pretendard-Thin.woff) format('woff'),
       url(../css/font/Pretendard-SemiBold.woff) format('woff'),
       url(../css/font/Pretendard-ExtraBold.woff) format('woff'),
       url(../css/font/Pretendard-ExtraLight.woff) format('woff'),
       url(../css/font/Pretendard-Black.woff) format('woff');
}

/*===== Font weight =====*/ 
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
} /* end of * */

body, input, button {
  font-size: var(--normal-font-size);
  font-family: var(--body-font);
} /* end of body, input, button */

input, button {
  border: none;
  outline: none;
} /* end of input, button */

a {
  text-decoration: none;
} /* end of a */ 

img {
  max-width: 100%;
  height: auto;
} /* end of img */ 

/*===== LOGIN =====*/ 
.login {
  position: relative;
  height: 100vh;
  display: grid;
  align-items: center;
} /* end of .login */

.login__img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit:cover;
  object-position: center;
} /* end of .login__img */ 

.login__form {
  position: relative;
  background-color: hsla(0, 0%, 10%, .1);
  border: 2px solid var(--white-color);
  margin-inline: 1.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: 1rem;
  backdrop-filter: blur(8px);
} /* end of .login__form */ 

.login__title {
  text-align: center;
  font-size: var(--h1-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 2rem;
  color: var(--white-color);
} /* end of .login__title */ 

.login__content, .login__box {
  display: grid;
} /* end of .login__content, .login__box */

.login__content {
  row-gap: 1.75rem; 
  margin-bottom: 1.5rem;
  color: var(--white-color);
} /* end of ..login__content */ 

.login__box {
  grid-template-columns: max-content 1fr;
  align-items: center;
  column-gap: .75rem;
  border-bottom: 2px solid var(--white-color);
} /* end of ..login__box */ 

.login__icon, .login__eye {
  font-size: 1.25rem;
} /* end of .login__icon, .login__eye */

.login__input {
  width: 100%;
  padding-block: .8rem;
  background: none;
  column-gap: var(--white-color);
  position: relative;  
  z-index: 1; 
  color: var(--white-color);
} /* end of .login__input */ 

.login__box-input {
  position: relative;
} /* end of .login__box-input */

.login__label {
  position: absolute;
  left: 0;
  top: 13px;
  font-weight: var(--font-medium);
  transition: top .3s, font-size .3s;
} /* end of .login__label */ 

.login__eye {
  position: absolute;
  right: 0;
  top: 18px;
  z-index: 10;
  cursor: pointer;
} /* end of ..login__eye */ 

.login__box:nth-child(2) input {
  padding-right: 1.8rem;
} /* end of .login__box:nth-child(2) input */ 

.login__check, .login__check-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
} /* end of .login__check, .login__check-group */ 

.login__check {
  margin-bottom: 1.5rem;
} /* end of ..login__check */

.login__check-label, .login__forgot, .login__register {
  font-size: var(--small-font-size);
} /* end of .login__check-label, .login__forgot, .login__register */ 

.login__check-group {
  column-gap: .5rem;
} /* end of ..login__check-group */ 

.login__check-input {
  width: 16px;
  height: 16px;
} /* end of .login__check-input */ 

.login__forgot {
  color: var(--white-color);
} /* end of .login__forgot */

.login__forgot:hover {
  text-decoration: underline;
} /* end of ..login__forgot */ 

.login__button {
  width: 100%;
  padding: 0.5rem;
  border-radius: .5rem;
  background-color: var(--white-color);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  border: 0.19rem solid var(--white-color);
  transition: all .3s ease-in-out;
} /* end of .login__button */ 

.login__button:hover {
  background-color: transparent;
  color: var(--white-color);
} /* end of .login__button */

.login__register {
  text-align: center;
  color: var(--white-color);
} /* end of ..login__register */ 

.login__register a {
  color: var(--white-color);
  font-weight: var(--font-medium);
} /* end of .login__register a */ 

.login__register a:hover {
  text-decoration: underline;
} /* end of .login__register a:hover */ 

/* Input focus move up label */ 
.login__input:focus + .login__label {
  top: -12px;
  font-size: var(--small-font-size);
} /* end of .login__input:focus + .login__label */ 

/* Input focus sticky top label */ 
.login__input:not(:placeholder-shown).login__input:not(:focus) + .login__label {
  top: -12px;
  font-size: var(--small-font-size);
} /* end of .login__input:not(:placeholder-shown).login__input:not(:focus) + .login__label */ 

/*========== 팝업 ==========*/ 
.modal {
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: none;
} /* end of #idModal */ 

.modal.open {
  display: block;
} /* end of .modal.open */

.modal.open .content { 
  animation: modal .5s ease; 
} 

@keyframes modal { 
  0%{transform: translateY(-100%);}
  100%{transform: translateY(0%);}
}

.modal .content {
  background-color: #fff;
  max-width: 30rem;
  margin: 10rem auto;
  border-radius: 1rem;
} /* end of #idModal .content */

.modal .header {
  border-bottom: 1px solid #ccc;
  height: 3.2rem;
  background-color: #8d76b2;
  border-radius: 1rem 1rem 0 0;
} /* end of #modal .header */

.modal .header h4 {
  color: white;
  font-size: 1.2rem;
} /* end of .modal .header h4 */

:is(.modal) :is(.header, .body, .footer) {
  padding: 1.2rem;
  position: relative;
} /* end of :is(#idModal), :is(.header, .body, .footer) */

.modal .header .close-modal {
  position: absolute;
  height: 1.8rem;
  width: 1.8rem;
  z-index: 101;
  color: #fff;
  text-align: center;
  line-height: 2rem;
  right: 0.5rem;
  top: 50%;
  margin-top: -1rem;
} /* end of .modal .header .close-modal */

.modal .footer {
  height: 2rem;
  background-color: #8d76b2;
  border-radius: 0 0 1rem 1rem;
} /* end of #idM */

.modal .content .body .title {
  margin-bottom: 2rem;
} /* end of .modal .content .body .title */

.modal .content .body .input {
  display: grid;
  grid-template-columns: 8fr 2fr;
  gap: 0.5rem;
} /* end of .modal .content .body .input */

.modal .content .body .input .email-input .email3 {
  height: 2.5rem;
  width: 100%;
  border: 0.19rem solid #cdcdcd;
  border-radius: 0.5rem;
  padding: 0 1rem;
} /* end of .modal .content .body .input #emal */

.modal .content .body .input .btn button {
  background-color: #4682B4;
  height: 2.5rem;
  width: 100%;
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all .3s ease-in-out;
  border: 0.19rem solid #4682b4;
  font-weight: 500;
} /* end of .modal .content .body .input #email */

.modal .content .body .input .btn button:hover {
  background-color: #fff;
  color: #4682b4;
} /* end of .modal .content .body .input .btn button:hover */

.modal .content .body .input #password {
  position: relative;
} /* end of .modal .content .body .input  */

.modal .content .body .input #password i {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  font-size: 1.5rem;
  color: #4682b4;
  cursor: pointer;
} /* end of .modal .content .body .input #password i */

.modal .content .body #answer {
  margin: 1rem 0;
  color: blue;
} /* end of .modal .content .body #answer */

.modal .content .body #answer {
  margin-bottom: 0.5rem;
  border-bottom: 0.19rem solid #cdcdcd;
} /* end of .modal .content .body #pass2 */

/*=================== 반응형 ====================*/ 
/* For medium devices */ 
@media screen and (min-width: 576px) {
  .login {
    justify-content: center;
  } /* end of ..login */

  .login__form {
    width: 432px;
    padding: 4rem 3rem 3.5rem;
    border-radius: 1.5rem;
  } /* end of ..login__form */

  .login__title {
    font-size: 2rem;
  } /* end of ..login__title */
}

/* 모바일 */ 
@media (min-width: 360px) and (max-width: 574px){
  .modal .content .body .title p .br1 {
    display: none;
  } /* end of .modal .content .body .title p .br1 */
}
