@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap");

/*  */
* {
  box-sizing: border-box;
}
body {
  background: var(--bg-color) !important;
  margin: 0;
  font-family: "Google Sans";
  color: var(--primary-text-color);
}
body.cursor-e-resize {
  cursor: e-resize !important;
}
ul {
  padding: 0;
  list-style-type: none;
}

.result-input-wrapper > input,
input[type="number"],
textarea {
  color: var(--primary-text-color);
  background-color: var(--text-box-bg);
}

input[type="number"]:focus,
textarea:focus {
  box-shadow: none;
}

input[type="number"]:focus,
textarea:focus {
  box-shadow: 0 0 0 2px var(--primary-color) !important;
}

/* header */
header {
  height: 64px;
  background: var(--header-bg-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5%;
}
.header-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  color: var(--primary-text-color);
  font-family: "Google sans", sans-serif;
  font-size: 1.2rem;
}
.header-logo > img {
  margin-right: 12px;
  width: 32px;
  height: 32px;
}

/* settings */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
details[open] summary::before {
  content: "";
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--curtain-color);
  animation: fade-in 0.2s forwards;
}
summary::marker {
  content: "";
  display: none !important;
}
.summary-inner {
  cursor: pointer;
  list-style: none;
  padding: 8px;
  border-radius: 50%;
}
.summary-inner:hover {
  background: var(--hover-bg-color);
}
.settings-summary::-webkit-details-marker {
  display: none;
}
.settings-summary svg {
  height: 24px;
  width: 24px;
  vertical-align: bottom;
}
.settings-summary path {
  fill: var(--primary-text-color);
}
@keyframes show-settings {
  from {
    transform: translateY(3%);
    opacity: 0;
  }
  to {
    transform: translateX(0%);
    opacity: 1;
  }
}
.settings-box[open] > .settings-menu {
  animation: show-settings 0.3s forwards;
}
.settings-box > .settings-menu {
  border-right: none;
  width: 320px;
  position: absolute;
  top: 60px;
  right: 0px;
  background: var(--popup-bg-color);
  z-index: 100;
  padding: 24px 0;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
}
.setting-title {
  padding: 0px 0 8px 24px;
  margin: 0;
  font-weight: normal;
  font-size: 1.2rem;
  font-weight: 100;
}
.menu-radio-box > label {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  font-size: 1.1rem;
  color: var(--secondary-text-color);
  cursor: pointer;
  padding: 10px 0;
}
.menu-radio-box > label:hover {
  background: var(--settings-hover-bg-color);
}
.scheme-icon {
  margin-left: auto;
  margin-right: 24px;
}
.scheme-icon > svg {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}
.scheme-icon > svg > path {
  fill: var(--secondary-text-color);
}
.menu-radio-box input {
  margin: 0 12px 0 24px;
  cursor: pointer;
}

/* main */
main {
  width: 95%;
  max-width: 800px;
  margin: 56px auto;
}
/* result section */
.result-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}
.result-input-wrapper {
  flex-grow: 1;
  height: 100%;
  position: relative;
}
.result-input-box {
  width: 100%;
  height: 100%;
  padding-left: 12px;
  font-size: 1.2rem;
  border-radius: 4px;
  outline: none;
  border: none;
  font-family: "Roboto Mono", Courier, monospace;
  word-spacing: 3px;
  -webkit-appearance: none;
}
.result-input-box[type="password"] {
  font-family: Verdana !important;
  letter-spacing: 0px;
}
@keyframes result-input-effect {
  from {
    color: var(--text-box-bg);
  }
}
.result-input-wrapper.e input[type="password"] {
  animation: result-input-effect 1.4s forwards;
  color: var(--primary-text-color);
}
.result-visibility-btn-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: absolute;
  right: 0px;
  top: 4px;
  background: var(--text-box-bg);
  border: none;
  width: 70px;
  height: 42px;
  border-radius: 4px;
  background: linear-gradient(
    to right,
    transparent 10%,
    var(--text-box-bg) 30%,
    var(--text-box-bg) 100%
  );
}
.result-visibility-btn {
  cursor: pointer;
  padding: 0;
  border: none;
  padding: 8px;
  border-radius: 50%;
  margin-right: 4px;
  background: var(--text-box-bg);
}
.result-visibility-btn:hover {
  background: var(--on-text-box-hover-bg-color);
}
@keyframes visibility-off {
  from {
    top: 17px;
    right: 30px;
    width: 0;
    height: 0;
  }
  to {
    width: 24px;
  }
}
input[type="password"]
  + .result-visibility-btn-box
  > .result-visibility-btn::after {
  animation: visibility-off 0.15s forwards;
  content: "";
  height: 1px;
  background: inherit;
  border-bottom: 2.3px solid var(--secondary-text-color);
  position: absolute;
  top: 18.7px;
  right: 11.5px;
  z-index: 10;
  transform: rotate(40deg);
}
.result-visibility-btn > svg {
  vertical-align: bottom;
}
.result-visibility-btn path {
  fill: var(--secondary-text-color);
}
/* buttons */
.btn-wrapper {
  height: 100%;
}
.copy-btn,
.submit-btn {
  width: 60px;
  margin-left: 10px;
  height: 100%;
  background: var(--primary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  border: solid var(--primary-color) 3px;
}
.copy-btn > svg,
.submit-btn > svg {
  width: 20px;
}
@keyframes submit-clicked {
  to {
    transform: rotate(-360deg);
  }
}
.submit-btn.clicked > svg {
  animation: submit-clicked 0.4s;
}
@keyframes submit-clicked-path {
  from {
  }
}
.submit-btn.clicked > svg > path {
  animation: submit-clicked-path 0.8s;
}
@keyframes submit-clicked-btn {
  from {
    background: rgb(147, 182, 242);
  }
  to {
    background: var(--primary-color);
  }
}
.submit-btn.clicked {
  animation: submit-clicked-btn 0.8s;
}
@keyframes copy-clicked-icon {
  from {
    fill: white;
  }
  10% {
    fill: var(--primary-color);
  }
  to {
    fill: var(--primary-color);
  }
}
.copy-btn.clicked > svg > path {
  animation: copy-clicked-icon 1s;
}
@keyframes copy-clicked-btn {
  from {
    background: var(--bg-color);
  }
  to {
    background: var(--bg-color);
  }
}
.copy-btn.clicked {
  animation: copy-clicked-btn 1s;
}

/* tooltip */
.submit-btn .popup-tooltip {
  display: none;
}
@media (min-width: 600px) {
  .popup-tooltip {
    position: absolute;
    border-radius: 4px;
    background: rgba(136, 136, 136, 0.58);
    color: white;
    left: 50%;
    top: 0px;
    transform: translateX(-50%);
    padding: 8px;
    width: 0px;
    height: auto;
    opacity: 0;
    font-size: 0rem;
  }
  @keyframes hide-tooltip {
    from {
      top: -42px;
      width: 85px;
      font-size: 1rem;
      opacity: 1;
    }
    50% {
      width: 85px;
      top: -48px;
      opacity: 0;
      font-size: 1rem;
      opacity: 1;
    }
    to {
      width: 0px;
      opacity: 0;
    }
  }
  .copy-btn:not(.clicked) .popup-tooltip {
    animation: hide-tooltip 0.4s;
  }
  @keyframes copy-hover-copied-text {
    from {
      top: -34px;
    }
    to {
      top: -42px;
    }
  }
  .copy-btn.hover .popup-tooltip,
  .copy-btn.clicked .popup-tooltip {
    width: 85px;
  }
  .copy-btn.hover .popup-tooltip {
    font-size: 1rem;
    display: block;
    animation: copy-hover-copied-text 0.2s forwards;
    opacity: 1;
  }
  .copy-btn.clicked .popup-tooltip {
    font-size: 1rem;
    display: block;
    top: -42px;
    opacity: 1;
  }
}
/* option section */
.opt-left-container,
.opt-right-container {
  width: 50%;
}
.opt-right-container {
  height: 60%;
}
h2 {
  margin: 28px 0 8px;
  font-family: "Yu Gothic", sans-serif;
  font-weight: normal;
  color: var(--primary-text-color);
  opacity: 0.8;
}
.option-section li {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 40px;
  /* background:skyblue; */
}
.option-section li + li {
  margin-top: 16px;
}
/* check btn */
.opt-cb {
  position: relative;
  width: 1px;
  height: 1px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-right: 70px;
}
@keyframes cb-before-unchecked {
  from {
    background: var(--primary-color);
  }
  to {
    background: var(--light-gray);
  }
}
.opt-cb::before {
  content: "";
  width: 56px;
  height: 32px;
  border-radius: 16px;
  /* background: var(--light-gray); */
  position: absolute;
  left: 0px;
  animation: cb-before-unchecked 0.1s forwards;
}
@keyframes cb-after-unchecked {
  from {
    left: 25.9px;
  }
  to {
    left: 2.5px;
  }
}
.opt-cb::after {
  animation: cb-after-unchecked 0.1s forwards;
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 100%;
  /* top: -4.4px; */
  background: var(--check-btn-face);
  position: absolute;
  /* left: 2.5px; */
  right: auto;
}
@keyframes cb-before-checked {
  from {
    background: var(--light-gray);
  }
  to {
    background: var(--primary-color);
  }
}
.opt-cb:checked::before {
  animation: cb-before-checked 0.1s forwards;
}
@keyframes cb-after-checked {
  from {
    left: 2.5px;
  }
  to {
    left: 25.9px;
  }
}
.opt-cb:checked::after {
  animation: cb-after-checked 0.1s forwards;
}
/*  */
.option-section {
  display: flex;
  flex-direction: row;
  align-items: top;
}
.option-section label {
  font-size: 1.3rem;
  width: 102px;
  cursor: pointer;
}
.opt-length-h2 {
  user-select: none;
  cursor: pointer;
  display: inline-block;
}
body.cursor-e-resize .opt-length-h2 {
  cursor: e-resize;
}
.opt-exclusions label {
  width: auto;
  white-space: nowrap;
}
.opt-example {
  font-size: 0.9rem;
  color: var(--secondary-text-color);
  opacity: 0.7;
  margin-left: 10px;
  margin-bottom: -4px;
  font-family: "Roboto Mono", Courier, monospace;
  letter-spacing: -3px;
}
.opt-example.unwise-tip {
  display: block;
  word-spacing: -3px;
  letter-spacing: 0;
  margin: 0;
}

/* option length */
.opt-length input {
  border: none;
  border-radius: 4px;
  outline: none;
  padding-left: 8px;
  font-size: 1rem;
  font-family: "Roboto Mono", Courier, monospace;
  height: 40px;
  width: 200px;
  -webkit-appearance: none;
  display: block;
  z-index: 1;
}
.opt-length input.invalid {
  background: var(--invalid-bg);
  color: var(--invalid-text);
}

/* option custom-letters */
.opt-custom textarea {
  outline: none;
  border: none;
  border-radius: 4px;
  width: 100%;
  height: 95px;
  min-width: 200px;
  max-width: 100%;
  min-height: 40px;
  max-height: 200px;
  padding: 8px;
  font-size: 1rem;
  font-family: "Roboto Mono", Courier, monospace;
  letter-spacing: 0.5px;
  box-shadow: var(--box-shadow-1);
  -webkit-appearance: none;
}
.textarea-head {
  display: none;
}
