

.hide {
  display: none !important;
}

.btn-icon {
  margin: 0;
  font-family: inherit;
  line-height: 0;
  display: inline-block;
  white-space: nowrap;
  border: none !important;
  outline: none !important;
  border-radius: 3px;
  background-color: transparent !important;
  color: #777 !important;
  padding: 0.2rem 0.3rem;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}


.btn-tooltip {
  background: transparent !important;
  color: #fff;
  border: none !important;
  outline: none !important;
  cursor: pointer;
  /* margin: 0 0.5rem; */
  position: relative;
  line-height: 0;
}

.btn-tooltip .tooltip {
  color: #333;
  background-color: #fff;
  padding: 0.7rem 1rem;
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  border: solid 2px #bbb;
  border-radius: 5px;
  font-size: 1rem;
  white-space: nowrap;
  display: none;
  line-height: 1.5;
}



/* ----------------    toast   ----------------- */

.toast {
  position: fixed;
  /* z-index: 1030; */
  z-index: 10001;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 20px;
  width: 300px;
  max-width: 300px;
  display: none;
  text-align: center;
  font-size: 15px;
  direction: rtl;
}

.toast .toast-content {
  border-radius: 5px;
  overflow: hidden;
  border-width: 1px;
  border-style: solid;
  background-color: #fff;
  border-color: #c4c8cb;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast.toast-success .toast-content {
  color: #0a3622;
  background-color: #d1e7dd;
  border-color: #a3cfbb;
}

.toast.toast-error .toast-content {
  color: #58151c;
  background-color: #f8d7da;
  border-color: #f1aeb5;
}

/* .toast.toast-info .toast-content {
  border-color: #ffd569;
} */

.toast .toast-body {
  padding: 0.8rem 1.5rem;
}

.toast .toast-progress-bar {
  height: 5px;
  background-color: #c4c8cb;
  width: 100%;
}

.toast.is-running .toast-progress-bar {
  animation-name: toast-anime;
  animation-timing-function: linear;
  /* animation-play-state: paused; */
}

.toast.toast-success .toast-progress-bar {
  background-color: #a3cfbb;
}

.toast.toast-error .toast-progress-bar {
  background-color: #f1aeb5;
}

/* .toast.toast-info .toast-progress-bar {
  background-color: #ffd569;
} */

@keyframes toast-anime {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}


/* ----------------    droptop   ----------------- */

.droptop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  direction: rtl;
}

.droptop .droptop-menu {
  position: absolute;
  bottom: calc(100% + 5px);
  right: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  display: block;
  border-radius: 4px;
  /* box-shadow: 0 1px 2px 0 rgba(174, 184, 193, 0.67), 0 11px 22px 0 rgba(0, 0, 0, 0.08); */
  background: #333;
  color: #fff;
  transform: translateY(0.25rem);
  transition: all 0.3s;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #aaa;
}

.droptop.open .droptop-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.droptop .droptop-menu li {
  list-style: none;
  padding: 0.8rem 2rem;
  width: 270px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.droptop .droptop-menu li:hover {
  background-color: #222;
}

.droptop .droptop-menu li:not(:last-child) {
  border-bottom: 1px solid #aaa;
}



/* ----------------    modal   ----------------- */

.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,.3);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4rem 1rem 3rem 1rem;
  display: none;
  direction: rtl;
  user-select: none;
  -webkit-user-select: none;
}

.modal.show {
  display: block;
}

.modal .dialog-box {
  background-color: #333;
  color: #eee;
  max-width: 500px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 5px;
  position: relative;
  border: 1px solid #aaa;
}

.modal .btn-modal-close {
  box-sizing: content-box;
  width: 60px;
  height: 60px;
  background-size: 17px;
  padding: 0;
  color: #000;
  opacity: 0.4;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  cursor: pointer;
}

.modal .btn-modal-close:hover,
.modal .btn-modal-close:focus-visible {
  opacity: 0.75;
}

.modal .modal-title {
  padding: 20px 0;
  padding-right: 20px;
  padding-left: 50px;
  border-bottom: 1px solid #555;
  font-weight: normal;
  font-size: 1.2rem;
}

.modal .modal-content {
  padding: 20px;
}

.modal .modal-buttons {
  padding: 40px 20px;
  text-align: center;
}

.modal .modal-buttons button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #767676;
  border-radius: 3px;
  background-color: #e7e7e7;
  padding: 0.5rem 1.5rem;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  margin: 0 7px;
  min-width: 90px;
}

.modal .modal-buttons button:hover {
  background-color: #EFEFEF;
}

.modal .modal-buttons button:disabled {
  background-color: #eee !important;
}

.modal .modal-buttons button:not(:disabled) {
  cursor: pointer;
  color: #000;
}


/* ----------------    modal-settings   ----------------- */

.modal#modal-settings .each-setting {
  padding: 20px;
}

.modal#modal-settings .each-setting:not(:last-child) {
  border-bottom: 1px solid #555;
}

.modal#modal-settings .each-setting label {
  display: inline-block;
  padding: 0 5px;
  margin-bottom: 0.3rem;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
  cursor: pointer;
}

.modal#modal-settings .each-setting input[type="checkbox"] {
  cursor: pointer;
}

.modal#modal-settings .group-button-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal#modal-settings .group-button-setting button {
  font-family: inherit;
  font-size: 0.9rem;
  line-height: inherit;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #767676;
  border-radius: 3px;
  background-color: #e7e7e7;
  padding: 0.5rem 1rem;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  margin: 0 10px 0 0;
  cursor: pointer;
}

.modal#modal-settings .group-button-setting button:hover {
  background-color: #fff;
}

.modal#modal-settings .box-overwrite-warning p {
  font-size: 0.7rem;
  margin-top: 1rem;
}


/* ----------------    modal-edit-note   ----------------- */

.modal#modal-edit-note .box-edit,
.modal#modal-edit-note .box-read {
  padding: 20px;
  border-bottom: 1px solid #555;
}

.modal#modal-edit-note .box-edit textarea {
  width: 100%;
  resize: vertical;
  padding: 10px;
  font-size: 1rem;
}

.modal#modal-edit-note .box-edit .box-align {
  text-align: left;
  margin-bottom: -50px;
}

.modal#modal-edit-note .box-edit .box-align button {
  opacity: 0.5;
}

.modal#modal-edit-note .box-edit .box-align button:hover {
  opacity: 1;
}

.modal#modal-edit-note .box-edit .btn-confirm-edit {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #767676;
  border-radius: 3px;
  background-color: #e7e7e7;
  padding: 0.5rem 1.5rem;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  margin: 10px 0px;
  min-width: 90px;
  cursor: pointer;
}

.modal#modal-edit-note .box-action {
  padding: 30px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal#modal-edit-note .box-action button {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: inherit;
  display: inline-block;
  white-space: nowrap;
  border: 1px solid #555;
  outline: none !important;
  border-radius: 3px;
  background-color: #2a2a2a !important;
  /* color: #777 !important; */
  color: #aaa !important;
  padding: 0.3rem 0.7rem;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.modal#modal-edit-note .box-action button:hover {
  background-color: #222 !important;
}


/* ----------------    modal-show-all-notes   ----------------- */

.modal#modal-show-all-notes .book-title {
  background-color: #444;
}

.modal#modal-show-all-notes .each-note,
.modal#modal-show-all-notes .book-title {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  cursor: pointer;
  border-bottom: 1px solid #555;
  transition: background-color 0.2s;
}

.modal#modal-show-all-notes .each-note:hover,
.modal#modal-show-all-notes .book-title:hover {
  background-color: #2a2a2a;
}

.modal#modal-show-all-notes .book-notes {
  height: 0;
  overflow: hidden;
  transition: height 0.3s;
}

.modal#modal-show-all-notes .book-box .book-title img {
  transition: transform 0.3s;
}

.modal#modal-show-all-notes .book-box.open .book-title img {
  transform: rotate(-180deg);
}

