/* Global */
:root {
  /* Color */
  --color-pure-white: #ffffff;
  --color-white: #f8f8f8;
  --color-light-white: #f8f8f8b0;
  --color-dark-white: #9c9c9c;
  --color-dark-grey: #515151;
  --color-grey: #616161;
  --color-light-grey: #7a7a7a;
  --color-transparent-grey: #7a7a7a18;
  --color-blue: #2196f3;
  --color-yellow: #fff7d1;
  --color-orange: #feb546;
  --color-black: #000000;
  --color-teal: #138d81;
  --color-light-teal: #4ebaaa;
  --color-dark-teal: #118374;
  --color-white-teal: #def3f1;
  --color-background: #f7efe4;
  --color-border: #cacace36;

  --color-primary: #7a7a7a;
  --color-secondary: #8c8d96;
  --color-tertiary: #b2b3b9;

  /* Font size */
  --font-large: 34px;
  --font-medium: 28px;
  --font-regular: 20px;
  --font-small: 16px;
  --font-micro: 14px;

  /* Font weight */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semi-bold: 600;
  --weight-bold: 700;

  /* Font line-height */
  --line-height-size: 1.8rem;

  /* icon */
  --icon-tab-size: 28px;

  /* Animation */
  --animation-duration: 0.3s;

  /* Etc */
  --border-radius-small: 5px;
  --border-radius-large: 20px;
}

/* Typography */
h1 {
  font-family: 'NanumSquare', sans-serif;
  font-weight: 800;
  font-size: var(--font-large);
  color: var(--color-white-teal);
  margin: 4px 0;
}

h2 {
  font-size: var(--font-regular);
  font-weight: var(--weight-semi-bold);
  color: var(--color-light-grey);
  margin: 0px;
}

h3 {
  font-size: var(--font-micro);
  font-weight: var(--weight-regular);
  color: var(--color-light-grey);
  margin: 0px;
}

p {
  font-size: var(--font-regular);
  font-weight: var(--weight-regular);
  color: var(--color-black);
  margin: 0px;
}

/* Universal tags */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  cursor: default;
}

/* 태그 스타일 초기화 */
a {
  text-decoration: none;
  color: var(--color-black);
}

ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

button {
  background-color: transparent;
  outline: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

input {
  outline: none;
  border: 0;
}

textarea {
  border: 0;
  outline: none;
}

.fa-solid,
.fa-regular {
  pointer-events: none;
}

i {
  pointer-events: none;
}

#page {
  max-width: 500px;
  height: 100vh;
  position: relative;
  overflow-x: hidden;
  margin: 0 auto;
  background-color: var(--color-background);
  padding: 0 20px;
}

#page::-webkit-scrollbar {
  display: none;
}

/* 헤더 영역 */
.header {
  background-color: var(--color-teal);
  padding: 20px;
  position: relative;
  margin-left: -20px;
  margin-right: -20px;
}

.header::after {
  content: '';
  background-color: var(--color-teal);
  position: absolute;
  left: 0;
  width: 100%;
  height: 230px;
  border-radius: 0 0 34% 34%;
  z-index: 0;
}

.header__message {
  color: var(--color-white-teal);
  font-size: 1rem;
}

.search-form {
  position: relative;
}

.search-form > i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 12px;
  color: var(--color-light-grey);
  font-size: 1.1rem;
}

.search-form > input {
  width: 100%;
  padding: 8px;
  font-size: 1.1rem;
  border-radius: 12px;
  padding-left: 38px;
  height: 37px;
  line-height: 42px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
}

/* 메인 영역 */
.content {
  position: relative;
}

.home__tab {
  display: block;
  margin-top: 50px;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px 10px 10px 10px;
  box-shadow: 0px 5px 15px 0px rgba(0, 0, 0, 0.25);
}

.home__tab--search {
  height: 170px;
  border-radius: 10px 10px 70px 10px;
  position: relative;
}

.home__tab--search::after {
  content: '';
  width: 70px;
  height: 70px;
  background: url(../asset/image/icon/home_search-tab.svg);
  position: absolute;
  right: 24px;
  bottom: 20px;
}

.home__tab--calendar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home__tab--calendar > i {
  font-size: 2.4rem;
  color: rgb(221, 201, 18);
}

.search-page__header {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 12px 0;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.search-page__btn {
  padding: 10px;
  padding-left: 0;
}

.search-page__btn i {
  font-size: 1.8rem;
}

.search-page__content {
  padding-bottom: 0;
}

.search-page__title {
  color: var(--color-black);
  margin: 20px 0;
  font-size: 2rem;
}

.search-page__form {
  position: relative;
}

.search-page__form > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-light-grey);
}

.search-page__input {
  width: 100%;
  font-size: 1.1rem;
  padding: 8px;
  padding-left: 36px;
  border-radius: 10px;
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.15);
}

.search-list {
  margin: 30px 0;
}

.search-item {
  display: flex;
  margin: 65px 0;
  background-color: var(--color-white);
  padding: 5px 10px;
  position: relative;
  top: 26px;
  cursor: pointer;
}

.search-item__thumbnail {
  width: 87px;
  height: 84px;
  margin-right: 14px;
  position: relative;
}

.search-item__thumbnail > img {
  display: block;
  width: 85px;
  height: 126px;
  position: absolute;
  top: -48px;
  border-radius: 6px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
}

.search-item__description {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.search-item__title {
  width: 200px;
  color: var(--color-black);
  font-size: 1rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-item__description > div {
  display: flex;
  flex-direction: column;
}

.search-item__authors {
  font-size: 0.92rem;
  color: var(--color-light-grey);
  margin-bottom: -1px;
}

.search-item__publisher {
  font-size: 0.92rem;
  color: var(--color-dark-white);
}

.home__search-page--save {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  visibility: hidden;
  z-index: 999;
  padding: 22px 0px;
  background-color: var(--color-background);
}

.home__search-page--save > header {
  position: sticky;
  top: 10px;
  left: 0;
  display: flex;
  justify-content: space-between;
}

.home__search-page--save > header > button {
  padding: 12px 18px;
  background-color: #ffffff;
  border-radius: 0 26px 26px 0;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
}

.home__search-page--save > header i {
  font-size: 1.8rem;
}

.home__search-page--save > div {
  padding: 20px 14px;
}

.search-page--save__container h1 {
  color: var(--color-black);
  margin: 20px 0;
}

#book-thumbnail {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

#book-thumbnail > img {
  width: 100px;
  height: 145px;
  border-radius: 10px;
}

.search-page--save__form > label {
  display: block;
  margin-bottom: 4px;
}

.search-page--save__form > input {
  margin-bottom: 14px;
  font-size: 1rem;
  background-color: rgba(128, 128, 128, 0.15);
  padding: 5px;
  position: relative;
  border-radius: 4px;
  width: 100%;
}

.search-page--save__form > button {
  font-size: 1rem;
  padding: 10px;
  display: block;
  float: right;
  background-color: #fff;
  color: black;
  border-radius: 16px;
  border-radius: 26px 0 0 26px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
  margin-top: 24px;
  position: relative;
  transform: translateX(14px);
}

.search-page--save__form > button > i {
  font-size: 1.5rem;
  color: teal;
  margin-right: 6px;
  transform: translateY(2px);
}

.main {
  padding: 10px;
  padding-top: 0;
}

.button--sort {
  color: var(--color-white-teal);
  font-size: 16px;
  margin-top: 45px;
}

.button--sort::before {
  content: '\f884';
  display: inline-block;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 5px;
}

.book-list {
  margin-top: 75px;
  display: flex;
  flex-wrap: wrap;
}

.book-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 31%;
  background-color: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
  margin-right: 10px;
  margin-bottom: 70px;
  padding: 4px;
  padding-bottom: 8px;
  cursor: pointer;
}

.book-item:nth-child(3n) {
  margin-right: 0;
}

.book-item__img {
  width: 80%;
  height: 74px;
}

.book-item__img > img {
  width: 80%;
  height: 120px;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translate(-50%);
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
}

.book-item__title {
  width: 80%;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 노트 영역 */
.note__tab-container {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.note__tab-item {
  width: 42vw;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  position: relative;
}

.note__tab-item > h2 {
  font-weight: 400;
  color: var(--color-white-teal);
}
.note__tab-item > h3 {
  color: var(--color-white-teal);
}

.note__tab-item::before {
  content: '';
  position: absolute;
}

.note__tab-item--random::before {
  background: url(../asset/image/note/img-notes.png) no-repeat center center;
  background-size: contain;
  width: 55px;
  height: 55px;
  top: -32px;
  left: 15px;
}

.note__tab-item--favorite::before {
  background: url(../asset/image/note/img-love.png) no-repeat center center;
  background-size: contain;
  width: 65px;
  height: 65px;
  top: -36px;
  left: 12px;
  transform: rotate(-10deg);
}

.note-list {
  margin-top: 70px;
  margin-bottom: 70px;
}

.note-item {
  border-radius: 10px;
  padding: 14px;
  background-color: #f8f8f8;
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2);
  margin-top: 32px;
}

.note-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.note-item__header::before {
  content: '';
  background: url(../asset/image/note/img-quotation-mark.png) no-repeat center center;
  background-size: contain;
  width: 58px;
  height: 58px;
  position: absolute;
  top: -6px;
  left: 4px;
  opacity: 0.6;
}

.note-item__label {
  padding: 3px 20px;
  background-color: #6fb5ee;
  color: #f8f8f8;
  opacity: 0.9;
  text-align: center;
  align-self: flex-end;
  transform: translate(-20px, -2px);
}

.note-item__label > i {
  font-size: 0.4rem;
  transform: translateY(-1px);
  margin-right: 5px;
}

.note-item__book-informaion {
  display: flex;
  justify-content: flex-end;
}

.note-item__book-informaion > div {
  text-align: right;
  flex-shrink: 0;
}

.note-item__book-title {
  width: 100px;
  color: var(--color-black);
  font-size: 1rem;
  text-align: right;
  margin-bottom: -4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.note-item__book-author {
  color: var(--color-light-grey);
  font-size: 0.9rem;
  text-align: right;
}

.note-item__book-thumbnail {
  width: 52px;
  height: 78px;
  flex-shrink: 0;
  margin-left: 10px;
  border-radius: 6px;
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
}

.note-item__created-at {
  color: var(--color-dark-white);
  font-size: 0.8rem;
  text-align: right;
  margin-top: 5px;
}

.note-item__text {
  padding: 40px 0;
  font-family: 'Iropke Batang', serif;
  font-size: 1rem;
  text-align: left;
  white-space: pre-line;
}

.note-item__text + div {
  height: 21px;
  display: flex;
  justify-content: space-between;
}

.note-item__read-count {
  color: var(--color-light-grey);
  font-size: 0.9rem;
}

.note-item__page {
  font-family: 'Iropke Batang', serif;
  color: var(--color-dark-grey);
  font-size: 1rem;
}

.note-item__footer {
  position: relative;
  margin-top: 6px;
  margin-bottom: -6px;
}

.note-item__btns {
  position: relative;
}

.note-item__btn {
  padding: 4px;
  padding-bottom: 0;
}

.note-item__btn > i {
  font-size: 1.2rem;
  color: var(--color-dark-white);
  color: rgb(190, 190, 190);
}

.note-item__btn > .fa-check.active {
  color: var(--color-teal);
}

.note-item__btn > .fa-heart {
  transition: 0.5s;
}

.note-item__btn > .fa-heart.active {
  transform: rotateX(360deg);
  color: red;
}

.note-item__btn--options {
  position: absolute;
  bottom: 10px;
  right: 4px;
}

/* detail-page 영역 */
.detail-page__header {
  background-color: var(--color-teal);
  position: relative;
  border-radius: 0 0 25% 0;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.4);
  padding: 20px;
  margin-left: -20px;
  margin-right: -20px;
}

.detail-page__btns {
  display: flex;
  justify-content: space-between;
}

.detail-page__btn {
  padding: 10px;
}

.detail-page__btn:nth-child(1) {
  margin-left: -10px;
}

.detail-page__btn:nth-child(2) {
  padding-right: -10px;
}

.detail-page__btn > i {
  color: var(--color-white-teal);
  font-size: 1.3rem;
}

.detail-page__title {
  margin-top: 30px;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.detail-page__information {
  margin-top: 14px;
  display: flex;
}

.detail-page__thumbnail {
  width: 98px;
  height: 110px;
}

.detail-page__thumbnail > img {
  width: 100px;
  height: 154px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
}

.detail-page__description {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}

.detail-page__authors {
  color: #def3f1;
}

.detail-page__publisher {
  color: #def3f1d8;
  margin-top: 2px;
}

.detail-page__btn--add {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background-color: var(--color-white);
  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2);
  position: absolute;
  right: 16%;
  bottom: 0;
  transform: translateY(50%);
}

.detail-page__btn--add > i {
  font-size: 26px;
  color: var(--color-dark-teal);
}

.detail-page__content .button--sort {
  color: var(--color-grey);
}

.detail-page__not-found-message {
  color: var(--color-grey);
  margin-top: 30px;
}

/* 노트 편집기 영역 */
.editor__header {
  padding: 4px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-tertiary);
}

.editor__btn--esc {
  padding: 10px;
}

.editor__btn--esc > i {
  font-size: 24px;
}

.editor__btn--save {
  padding: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-teal);
}

.editor__content {
  padding: 14px;
}

.editor__note-information > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.editor__btn--label {
  padding: 4px 16px;
  border-radius: 12px;
  color: var(--color-white);
  background-color: var(--color-blue);
}

.editor__btn--label > i {
  margin-right: 2px;
  font-size: 11px;
  transform: translateY(-1px);
}

.editor__btn--page {
  padding: 4px 16px;
  border: 1px solid var(--color-transparent-grey);
  border-radius: 12px;
  color: var(--color-dark-grey);
  background-color: var(--color-pure-white);
}

.editor__created-at {
  display: inline;
  font-size: 15px;
  color: var(--color-primary);
  position: relative;
}

.editor__created-at::after {
  content: '';
  width: 100%;
  height: 7px;
  position: absolute;
  left: 0;
  bottom: 0;
  background-color: var(--color-transparent-grey);
}

.editor__input {
  width: 100%;
  min-height: 200px;
  margin: 20px 0;
  padding: 20px;
  line-height: 20px;
  resize: none;
}

/* 모달 영역 */
#modal {
  position: fixed;
  top: 0;
  left: 50%;
  width: 500px;
  height: 100%;
  visibility: hidden;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  overflow: hidden;
  transform: translateX(-50%);
}

#modal.show {
  visibility: visible;
}

.modal__content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 350px;
  background-color: #f8f8f8;
  text-align: center;
  border-radius: 20px 20px 0 0;
  transform: translateY(350px);
  transition: transform 0.4s;
  cursor: pointer;
}

.modal__content.list-1 {
  height: calc(1 * 50px + 50px);
  transform: translateY(1 * 50px + 50px);
}

.modal__content.list-2 {
  height: calc(2 * 50px + 50px);
  transform: translateY(2 * 50px + 50px);
}

.modal__content.list-4 {
  height: calc(4 * 50px + 50px);
  transform: translateY(4 * 50px + 50px);
}

.modal__content.form {
  height: 100px;
  transform: translateY(100px);
}

.modal__content.alert {
  width: 280px;
  height: 50px;
  border-radius: 10px;
  margin: 0 auto;
  left: calc(50% - 140px);
  top: calc(50% - 25px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: none;
}

.modal__content.show-up {
  transform: translateY(0);
}

.modal__title {
  height: 50px;
  padding: 10px 0;
  font-size: 1.2rem;
}

.modal__tab-item {
  display: block;
  width: 100%;
  height: 50px;
  padding: 10px 0;
  font-size: 1.1rem;
  color: var(--color-grey);
  border-top: 1px solid var(--color-transparent-grey);
}

.modal__form {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-pure-white);
}

.modal__input {
  width: 100%;
  height: 100%;
  padding: 10px;
  font-size: 1.05rem;
}

.modal__btn {
  width: 50px;
  height: 100%;
  padding: 10px;
  position: relative;
}

.modal__icon {
  margin-right: 5px;
  color: var(--color-dark-white);
}

.modal__icon--btn {
  font-size: 22px;
  color: var(--color-dark-white);
}

/* 네비게이션 영역 */
#navigation {
  width: 500px;
  height: 50px;
  border-radius: 20px 20px 0 0;
  background-color: #f8f8f8;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0px 0px 7px 0px rgba(179, 179, 179, 0.9);
  -webkit-box-shadow: 0px 0px 7px 0px rgba(179, 179, 179, 0.9);
  -moz-box-shadow: 0px 0px 7px 0px rgba(179, 179, 179, 0.9);
}

#navigation.hide {
  display: none;
}

.navigation__tab-link {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.navigation__tab-icon {
  font-size: var(--icon-tab-size);
  color: var(--color-dark-white);
  pointer-events: none;
  position: relative;
  transition: 0.5s;
}

.navigation__tab-link::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  transition: 0.5s;
  background-color: teal;
}

.navigation__tab-link.active:before {
  height: 100%;
}

.navigation__tab-link.active > i {
  color: var(--color-white);
  transform: rotateY(360deg);
}

@media screen and (max-width: 500px) {
  #navigation {
    width: 100%;
  }
}
