@font-face {
  src: url(../fonts/IBMPlexSansThai/IBMPlexSansThai-Regular.ttf);
  font-family: "IBMPlexSansThai";
}

@font-face {
  src: url(../fonts/IBMPlexSansThai/IBMPlexSansThai-Medium.ttf);
  font-family: "IBMPlexSansThai-Medium";
}

@font-face {
  src: url(../fonts/IBMPlexSansThai/IBMPlexSansThai-SemiBold.ttf);
  font-family: "IBMPlexSansThai-Bold";
}

@font-face {
  src: url(../fonts/IBMPlexSansThai/IBMPlexSansThai-Thin.ttf);
  font-family: "IBMPlexSansThai-Thin";
}

* {
  margin: 0;
  padding: 0;
}

html {
  height: auto !important;
}

body {
  font-family: "IBMPlexSansThai";
  background-image: url("/stereochemistry/assets/background.svg"),
    url("/stereochemistry/assets/graphic_bottom.svg");
  background-size: 100%, 100%;
  background-repeat: repeat, no-repeat;
  background-position: center, bottom 100px center;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: 1em;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "IBMPlexSansThai-Bold";
}

nav ul {
  list-style: none;
}

button {
  font-family: "IBMPlexSansThai";
}

.homepage {
  background-color: #f7dfed;
  color: #df5c8e;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.homepage img {
  height: 80px;
}

.homepage > div {
  margin: 10px;
}

.homepage button {
  font-family: "IBMPlexSansThai-Bold";
  font-size: 1.2em;
}

.videoWrapper {
  width: 50vw;
}

.videoBox {
  position: relative;
  padding-top: 56.25%;
}

.videoBox iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

nav {
  background-color: #f7dfed;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-image: url("/stereochemistry/assets/graphic_top.svg");
  background-repeat: no-repeat;
  background-size: auto 120%;
  background-position: right;

  overflow: hidden;
}

nav img {
  height: 70px;
}

nav > div {
  padding: 25px 40px;
}

nav > div:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.page-container {
  position: relative;
  min-height: 100vh;
}

.content-wrap {
  padding-bottom: 12em;
}

.dropdown {
  width: 40%;
  float: left;
  overflow: hidden;
  text-align: left;
}

.dropdown .dropbtn {
  font-family: "IBMPlexSansThai-Medium";
  font-size: 1em;
  border: none;
  outline: none;
  border: 2px solid #df5c8e;
  color: #df5c8e;
  background-color: transparent;
  width: 100%;
  padding: 10px 20px;
  margin: 0;
  cursor: pointer;
  transition: 0.3s ease-in;
}

.dropdown .dropbtn::after {
  font-family: "Font Awesome 5 Free";
  content: "\f0d7";
  font-weight: 900;
  position: absolute;
  vertical-align: middle;
  top: 50%;
  right: 10px;
  transform: translate(-10px, -50%);
}

.navbar a:hover,
.dropdown:hover .dropbtn {
  background-color: #df5c8e;
  color: #f7dfed;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f7dfed;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 10000;
}

.dropdown-content a {
  float: none;
  color: #df5c8e;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: #f7d0e7;
}

label {
  cursor: pointer;
}

.text-chula {
  font-family: "ChulaBold";
}

.text-chula-light {
  font-family: "ChulaRegular";
}

.text-newchula {
  font-family: "ChulaNewBold";
}

.text-newchula-light {
  font-family: "ChulaNewRegular";
}

.text-darkpink {
  color: #df5c8e;
}

.bold {
  font-family: "IBMPlexSansThai-Bold";
}

.container > h1 {
  text-indent: 1em;
}

.container-split {
  display: grid;
  grid-template-columns: 20% 75%;
  grid-auto-rows: 1fr;
  grid-gap: 40px;
  margin-top: 20px;
  justify-content: center;
}

.submenu {
  font-family: "IBMPlexSansThai-Medium";
  background-color: #f7dfed;
  height: 100%;
}

.container-split > div:first-child {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-gap: 30px;
}

.container-split > div:first-child > div:first-child > a > .btn {
  border-radius: 20px;
}

.container-split .title {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.container-split > div:first-child > div {
  border-radius: 20px;
}

.container-split > div:last-child {
  background-color: #f7dfed;
  border-radius: 20px;
}

.btn-video {
  font-family: "IBMPlexSansThai-Bold";
  font-size: 1em;
  padding: 15px 40px;
}

.title {
  font-family: "IBMPlexSansThai-Bold";
  background-color: #df5c8e;
  color: #ffffff;
  padding: 15px 40px;
  font-size: 1em;
}

.bg-pink {
  background-color: #f7dfed;
}

.bg-darkpink {
  background-color: #df5c8e;
}

.submenu li {
  position: relative;
  overflow: hidden;
  padding: 15px 20px;
  border-bottom: 1px solid #f1f1f1;
}

.submenu li:hover {
  background-color: #f7e8f1;
}

.submenu a {
  text-decoration: none;
  color: #df5c8e;
  font-size: 1em;
}

li span {
  position: absolute;
  background-color: #ffffff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  animation: btn_animate 1s linear infinite;
}

video {
  width: 80%;
  margin: 20px auto;
  outline: none;
  cursor: pointer;
}

footer {
  position: absolute;
  bottom: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

footer > div {
  padding: 20px;
}

footer > div > div:last-child {
  margin-top: 1em;
}

.panel > div:first-child {
  font-family: "IBMPlexSansThai-Bold";
  background-color: #df5c8e;
  color: #ffffff;
  border-radius: 50px;
  padding: 12px 30px;
  font-size: 1em;
}

.sort {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translate(-10%, -50%);
}

.animate_controls {
  margin: 10px;
}

.btn-animate_control {
  background-color: #ffffff;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  align-items: center;
  border-radius: 50px;
  transition: 0.8s;
  cursor: pointer;
  color: #df5c8e;
}

.btn-animate_control:hover {
  filter: brightness(0.95);
}

.btn-animate_control > div:first-child {
  min-width: 45px;
  min-height: 45px;
  background-color: #df5c8e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 50%;
}

.btn-animate_control > div:last-child {
  margin-right: 10px;
}

.active-animation {
  background-color: #f7d0e7;
}

.waves {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.waves span {
  position: absolute;
  background-color: #f7d0e7;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  animation: btn_animate 1s linear infinite;
}

.control-panel {
  background-color: #f7d0e7;
  border-radius: 20px;
}

.control-panel-horizontal {
  margin: 0px 20px;
}

.control-range {
  display: grid;
  grid-template-columns: 30% 50% 20%;
  gap: 0.5rem;
}

.control-range input {
  width: 100%;
}

.panel-menu {
  padding: 20px 40px;
}

.panel-menu-horizontal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.panel-menu select {
  background: none;
  outline: none;
  border: none;
  padding: 7px 20px;
  border: 1px solid #df5c8e;
  border-radius: 7px;
  color: #df5c8e;
  transition: 0.3s ease-in;
  cursor: pointer;
}

.panel-menu option {
  background-color: #ffffff;
  color: #000000;
  cursor: pointer;
}

.panel-menu select:hover {
  background: #df5c8e;
  color: #ffffff;
}

/* switch */
/* The switch - the box around the slider */
.switch {
  position: relative;
  width: 40px;
  height: 22px;
}

/* Hide default HTML checkbox */
.switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input[type="checkbox"]:checked + .slider {
  background-color: #df5c8e;
}

input[type="checkbox"]:focus + .slider {
  box-shadow: 0 0 1px #df5c8e;
}

input[type="checkbox"]:checked + .slider:before {
  -webkit-transform: translateX(17px);
  -ms-transform: translateX(17px);
  transform: translateX(17px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.label-menu {
  margin-left: 10px;
}

.panel-menu > div {
  margin-bottom: 10px;
}

input[type="range"] {
  transform: translateY(-1px);
  -webkit-appearance: none;
  background-color: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  background: #cccccc;
  border: none;
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  border: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #df5c8e;
  margin-top: -4px;
}

input[type="range"]:focus {
  outline: none;
}

.title-box {
  display: flex;
  flex-direction: row;
}

.title-box > div:first-child {
  white-space: nowrap;
}

.title-box > div:last-child {
  font-family: "IBMPlexSansThai";
  width: 100%;
  text-align: right;
}

.experiment-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  margin: 20px 0px;
}

.experiment-box .panel {
  max-width: 400px;
  margin: 0 auto;
}

a {
  text-decoration: none;
  color: inherit;
}

.sortup {
  position: relative;
}

.sortdown {
  position: relative;
}

.sortdown::after {
  font-family: "Font Awesome 5 Free";
  content: "\f0d7";
  font-weight: 900;
  position: absolute;
  vertical-align: middle;
  top: 50%;
  right: 10px;
  transform: translate(-10px, -50%);
}
.sortup::after {
  font-family: "Font Awesome 5 Free";
  content: "\f0d8";
  font-weight: 900;
  position: absolute;
  vertical-align: middle;
  top: 50%;
  right: 10px;
  transform: translate(-10px, -50%);
}

#isomers div {
  margin: 5px;
  text-align: center;
}

.folder {
  background-color: #f7d0e7;
  border-radius: 20px;
}

.folder > div:first-child {
  background-color: #df5c8e;
  color: #ffffff;
  padding: 10px 30px;
  border-radius: 50px;
  cursor: pointer;
}

.folder > div:last-child {
  padding: 10px 20px;
}

.control-reset,
#controls_reset_atomsize,
#controls_reset_bondsize i {
  color: #df5c8e;
  font-size: 0.8em;
  cursor: pointer;
}

.btn-sm {
  padding: 5px 20px;
  border-radius: 20px;
}

.num-sub {
  font-size: 0.7em;
}

.info-box {
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
  width: 100%;
  height: 100%;
  z-index: 100000;
  display: none;
}

.info-box > div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 80%;
  background-color: #ffffff;
}

.info-box > div > div {
  padding: 20px 40px;
  align-items: center;
  height: 90%;
}

.info-box .close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 1.6em;
  cursor: pointer;
}

.info-box > div > div > h1 {
  padding-right: 30px;
  border-bottom: 1px solid #777777;
  padding-left: 10px;
}

.info-box > div > div > div:last-child {
  padding: 20px 40px;
  height: 90%;
  overflow: auto;
}

.info-box ul {
  margin-left: 30px;
}

.instruction_jsme > div > div > div:last-child {
  display: grid;
  grid-template-columns: 45% 45%;
  grid-gap: 3em;
}

.instruction_jsme img {
  width: 100%;
}

#ex-box {
  display: none;
}

.bars-menu {
  display: none;
}

.bars-side {
  display: none;
  background-color: #f7dfed;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000000;
}

.bars-side ul {
  list-style: none;
}

.bars-side div:nth-child(2) {
  padding: 20px 40px;
  padding-top: 40px;
  font-family: "IBMPlexSansThai-Bold";
  color: #df5c8e;
  font-size: 1.2em;
}

.bars-side li {
  position: relative;
  overflow: hidden;
  color: #df5c8e;
  padding: 10px 40px;
}

.bars-side li:hover {
  background-color: #f7d0e7;
}

.bars-side .close {
  font-size: 1.4em;
  color: #df5c8e;
  position: absolute;
  top: 20px;
  right: 25px;
}

.swal2-container {
  z-index: 100000000;
}

/* Quiz Container */

.quiz-container {
  margin: 20px;
  text-align: center;
}

.quiz-container h3 {
  margin-bottom: 20px;
}

.btn-choice-image-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  margin: 20px;
}

.btn-choice-image {
  display: inline-block;
  background-color: #ffffff;
  position: relative;
  padding-top: 100%;
  text-align: center;
  border-radius: 20px;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.btn-choice-image .label-container {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #df5c8e;
  color: #ffffff;
  z-index: 2;
}

.btn-choice-image .label-container > div {
  padding: 10px;
}

.btn-choice-image .image-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.btn-choice-image .image-container img {
  max-height: 100%;
  max-width: 100%;
}

.btn-choice-hover {
  filter: brightness(0.9);
}

.btn-choice-image:hover {
  filter: brightness(0.9);
}

.btn-next-prev-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 40px 20px;
}

.btn-choice-text-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1em;
  margin: 20px;
}

.btn-choice-text-group .btn-animate_control {
  transition: 0.3s ease-in-out;
}

input[type="radio"] {
  display: none;
}

.finalScore {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 40vh;
}

.quiz .finalScore,
.quiz #number2,
.quiz #number3,
.quiz #number4,
.quiz #number5,
.quiz #number6 {
  display: none;
}

.img-problem img {
  max-width: 50%;
  max-height: 150px;
}

.topbar {
  background-color: #df5c8e;
  color: #ffffff;
}

.topbar > div {
  margin: 0 auto;
  text-align: right;
  padding: 4px 40px;
  font-size: 0.8em;
}

.disable-rotation {
  position: relative;
}

.disable-rotation::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 1000000;
}

.jmol-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gwt-DecoratedPopupPanel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.btn-alternate {
  padding: 10px 30px;
  border-radius: 999px;
}

.description-box {
  display: grid;
  grid-template-columns: auto auto;
  row-gap: 1em;
  margin-bottom: 1em;
}

.description-box > div:nth-child(odd) {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.description-box > div:nth-child(even) {
  margin-left: 1em;
}

.description-box .highlight {
  white-space: nowrap;
  background-color: #df5c8e;
  color: #ffffff;
  padding: 0.5em 1em;
  border-radius: 1em;
  text-align: center;
}

.color {
  height: 18px;
  width: 18px;
  border: 1px solid #000;
}

.color-table {
  border: 1px solid #000000;
  margin: 20px auto;
}

.color-table td {
  padding: 5px 20px;
}

.color-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.atom_color_information > div {
  width: auto;
  height: 80%;
}

.energy-tube {
  position: relative;
  background-color: #ffffff;
  height: 100%;
  max-height: 400px;
  min-width: 50px;
  border-radius: 15px;
}

.energy-tube > div:first-child {
  position: absolute;
  background-color: #df5c8e;
  bottom: 0;
  left: 0;
  height: 5%;
  width: 100%;
  transition: all 0.8s ease-in-out;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.energy-tube > div:last-child {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.energy-tube > div:last-child::before {
  content: "";
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -5%);
  width: 70%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

.energy-tube > div:last-child::after {
  content: "";
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translate(-50%, 5%);
  width: 70%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

.energy-tube > div:last-child > div:nth-child(2) {
  content: "";
  position: absolute;
  top: 33.33%;
  left: 50%;
  transform: translate(-50%, -33.33%);
  width: 70%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

.energy-tube > div:last-child > div:nth-child(3) {
  content: "";
  position: absolute;
  top: 66.66%;
  transform: translate(-50%, -66.66%);
  left: 50%;
  width: 70%;
  height: 2px;
  background-color: rgba(0, 0, 0, 0.5);
}

.interactive-image-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem;
}

.interactive-image-group div {
  font-size: 0.85rem;
}

b {
  font-family: "IBMPlexSansThai-Bold";
}

@media screen and (max-width: 1279px) {
  .btn-choice-image > .label-container > div {
    padding: 7px;
  }
  body {
    background-position: center, bottom 200px center;
  }
  nav > div {
    padding: 20px;
    display: block;
  }
  nav img {
    width: 200px;
    height: auto;
  }
  nav > div:last-child {
    font-size: 1.4em;
    color: #df5c8e;
  }
  .dropdown {
    display: none;
  }
  .bars-menu {
    display: block;
  }
  .container {
    padding: 0px 40px;
  }
  .container h1 {
    font-size: 1.4em;
  }
  .jmol-3-cols {
    grid-template-columns: 1fr;
  }
  .exercise-box {
    margin: 0;
  }
  .container-split .title {
    border-radius: 20px;
  }
  .videoWrapper {
    width: 80vw;
  }
  .panel-menu-horizontal {
    grid-template-columns: 1fr;
  }
  .atom_color_information > div {
    width: 100%;
    height: 100%;
  }
  .info-box > div {
    width: 100%;
    height: 100%;
  }
  .info-box > div > div > h1 {
    font-size: 1.4em;
  }
  .info-box > div > div > div:last-child {
    padding: 0;
    height: 100%;
  }
  .instruction_jsme > div > div > div:last-child {
    grid-template-columns: 1fr;
    grid-gap: 0;
  }
  .instruction_jsme > div > div > div:last-child > div:first-child {
    text-align: center;
  }
  .instruction_jsme img {
    width: 80%;
  }
  .control-range {
    display: flex;
  }
  .control-panel-horizontal {
    max-width: 400px;
    margin: 0 auto;
  }
  .btn-choice-image-group {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-choice-text-group {
    grid-template-columns: 1fr;
  }
  .quiz-container img {
    max-width: 100%;
  }
  .btn-animate_control {
    font-size: 0.875em;
  }
}

@media screen and (max-width: 1023px) {
  img {
    max-width: 100%;
  }
  body {
    font-size: 1em;
    background-size: 120%, 200%;
    background-position: center, bottom 100px center;
  }
  .homepage {
    text-align: center;
  }
  .homepage h1,
  h2 {
    font-size: 1.3em;
  }
  .homepage img {
    width: 60vw;
    height: auto;
  }
  .container {
    padding: 0px 20px;
  }
  .container h1 {
    font-size: 1.6em;
    text-indent: 0;
    text-align: center;
  }
  .container-split {
    display: block;
    height: auto;
  }
  .container-split > div:first-child {
    display: flex;
    flex-direction: column-reverse;
    grid-gap: 0;
  }
  .container-split > div:first-child > div:last-child {
    margin-bottom: 30px;
  }
  .container-split > div:last-child {
    margin-top: 30px;
  }
  .container video {
    width: 100%;
  }
  .window {
    padding: 20px;
  }
  .panel {
    margin: 30px 0px;
  }
  footer {
    font-size: 0.8em;
  }
  .experiment-box {
    margin: 0;
  }
  .title-box {
    display: block;
  }
  .title-box > div:last-child {
    display: block;
    text-align: left;
    font-size: 0.8em;
    margin-top: 0px;
    line-height: 1.2em;
  }
  .interactive-menu {
    text-align: left;
  }
  .interactive-menu-box {
    display: none;
  }
  .folder > div:last-child {
    padding: 10px;
  }
  .panel-menu {
    padding: 20px 25px;
  }
  .control-panel {
    font-size: 0.9em;
  }
  .btn-animate_control > div:first-child {
    width: 40px;
    height: 40px;
  }
  .info-box > div > div > div:last-child {
    height: 90%;
  }
  .control-range {
    display: grid;
  }
  .control-panel-horizontal {
    margin: 20px auto;
  }
}

@media screen and (max-width: 767px) {
  .energy-tube {
    min-width: 40px;
  }

  .btn-choice-image .label-container > div {
    padding: 4px;
    font-size: 0.875em;
  }
  .description-box {
    grid-template-columns: auto;
  }
  .experiment-box {
    grid-template-columns: 1fr;
  }
  .btn-animate_control {
    font-size: 0.875em;
  }
  .experiment-box .panel {
    width: 100%;
  }
  .control-panel-horizontal {
    width: 100%;
  }
  .btn-choice-text-group {
    margin: 0;
  }
  .quiz-container {
    margin: 5px;
  }
}

@media screen and (max-width: 320px) {
  .dropdown {
    font-size: 0.8em;
  }
}
