* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #fff;
  color: #1f2024;
  justify-content: center;
  align-items: center;
}

.chat {
  width: 375px;
  min-height: 812px;
  background-color: white;
  position: relative;
  margin: 0 auto;
  color: #71727a;
}

.hidden {
  display: none;
  visibility: hidden;
}

.inactive {
  opacity: 0.5;
}
.disabled {
  cursor: not-allowed;
}

.chat .menu {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  margin-top: 20px;
  background-color: #f1f1f1;
}

.chat .menu a {
  color: #71727a;
  font-size: 24px;
  text-decoration: none;
}

.chat .menu a:hover {
  color: #000;
}

.chat h1,
.greeting {
  font-size: 18px;
  color: #71727a;
  text-align: center;
  padding-top: 20px;
}

.chat h3,
.greeting {
  font-size: 14px;
  color: #71727a;
  text-align: center;
  padding-top: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 343px;
  padding: 12px 16px;
  position: relative;
  top: 20px;
  left: 16px;
  background-color: #f8f9fe;
  border-radius: 24px;
}

.search-bar .search-icon {
  width: 16px;
  height: 16px;
  background-color: #006ffd;
  border-radius: 50%;
}

.search-bar input {
  border: none;
  outline: none;
  flex-grow: 1;
  font-size: 14px;
  color: #8f9098;
  background: none;
}

.filters {
  display: flex;
  gap: 16px;
  width: 343px;
  padding: 12px 16px;
  position: relative;
  /* top: 30px; */
  left: 16px;
  margin: 10px;
  background-color: #f8f9fe;
  border-radius: 24px;
}

.filters select {
  flex-grow: 1;
  padding: 8px;
  border: 1px solid #c5c6cc;
  border-radius: 8px;
  font-size: 14px;
  color: #71727a;
  background-color: white;
}

.filters label {
  margin: 0 20px; /* Optional: Add some spacing between labels */
}

.chats {
  width: 100%;
  /* padding-top: 40px; */
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.answers {
  width: 100%;
  /* padding-top: 20px; */
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
}

.list-item .icon {
  width: 20px;
  height: 20px;
  background-color: #006ffd;
}

.list-item .content {
  flex: 1;
}

.list-item .content .title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2024;
}

.list-item .content .description {
  font-size: 16px;
  color: #71727a;
  line-height: 20px;
  letter-spacing: 0.12px;
}

.checkbox {
  width: 24px;
  height: 24px;
  border: 1.5px solid #454648;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox.checked {
  background-color: #006ffd;
  border-color: #006ffd;
}

.checkbox.checked::before {
  content: '';
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 2px;
}

.blue-button {
  width: 50%;
  padding: 12px;
  background-color: #006ffd;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  width: 50%;
  margin: 0 auto;
  text-align: center;
}
.blue-button:hover,
.blue-button:active {
  background-color: #0056cc;
}

.red-button {
  width: 50%;
  padding: 12px;
  background-color: #ff616d;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  width: 50%;
  margin: 0 auto;
  text-align: center;
}
.red-button:hover,
.red-button:active {
  background-color: #ed3241;
}

.yellow-button {
  width: 50%;
  padding: 12px;
  background-color: #ffb37c;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  width: 50%;
  margin: 0 auto;
  text-align: center;
}
.yellow-button:hover,
.yellow-button:active {
  background-color: #e86339;
}

.button-placeholder {
  display: flex;
  gap: 16px;
  width: 343px;
  padding: 12px 16px;
  position: relative;
  /* top: 30px; */
  left: 16px;
  margin: 10px;
  border-radius: 24px;
}
#show-all-question {
  flex: 2;
}
#play-pause-button {
  flex: 1;
}
.custom-text {
  font-style: italic;
  font-size: smaller;
  text-align: center;
  padding-top: 10px;
}

#control-btn-title {
  float: right;
  background: none;
  border: none;
  cursor: pointer;
}

#control-icon-title {
  font-size: 1.5em;
}
#control-icon-description {
  font-size: 1.5em;
}

.flex-container {
  display: flex;
  align-items: center; /* Center vertically */
  justify-content: space-between; /* Space between elements */
}

.content {
  flex-grow: 1; /* Allow content to take up remaining space */
}

.right-align {
  display: flex;
  align-items: center; /* Center vertically */
}

#control-btn-description {
  margin-right: 5px; /* 5px gap between button and checkbox */
}

.checkbox {
  margin-left: 5px; /* 5px gap between button and checkbox */
}

#countdown-timer {
  position: absolute;
  right: 5px;
  margin-left: 10px; /* Adjust the spacing as needed */
  color: red;
}
.grey-background {
  background-color: grey;
  text-align: center;
  color: white;
}
.blue-background {
  background-color: blue;
  text-align: center;
  color: white;
}

.txt-white {
  color: white;
}
.txt-blue {
  color: #0056cc;
}
.txt-red {
  color: #f44336;
}
.txt-dark-red {
  color: #660000;
}
.txt-orange {
  color: #ff9800;
}
.txt-green {
  color: #4caf50;
}
.txt-grey {
  color: #71727a;
}

.txt-sm {
  font-size: 12px;
}

.txt-md {
  font-size: 14px;
}

.txt-lg {
  font-size: 16px;
}

.txt-xl {
  font-size: 18px;
}

.txt-bold {
  font-weight: 700;
}
.txt-italic {
  font-style: italic;
}
.txt-label {
  font-size: 12px;
  padding: 5px;
  margin: 0 5px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
}

.bg-blue {
  background-color: #0056cc;
}
.bg-red {
  background-color: #f44336;
}
.bg-dark-red {
  background-color: #660000;
}
.bg-green {
  background-color: #4caf50;
}
.bg-orange {
  background-color: #ff9800;
}

.block-container {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  gap: 10px; /* Add space between blocks */
}
.course-block-container {
  margin: 10px;
}
.course-block {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  color: white;
  text-decoration: none;
  border-radius: 8px 8px 0 0;
  transition: transform 0.2s;
  cursor: pointer;
}
.course-listing .course-block {
  border-radius: 8px;
  text-align: center;
}
.course-listing .inactive .course-block {
  cursor: not-allowed;
}

.course-block:hover {
  transform: scale(1.05);
}

.course-block i {
  font-size: 2em; /* Adjust icon size */
  margin-bottom: 10px; /* Space between icon and text */
}

.course-block p {
  margin: 0;
}

.content-wrapper {
  margin: 0 15px; /* Adjust the margin as needed for spacing */
}

.page-content {
  padding: 0 15px;
  line-height: 1.5;
}

.page-content p {
  line-height: 1.5;
}

.page-content ul {
  list-style-type: disc; /* Use disc for top-level lists */
  margin-left: 20px; /* Indent top-level lists */
}

.page-content ul ul {
  list-style-type: circle; /* Use circle for second-level lists */
  margin-left: 20px; /* Indent second-level lists */
}

.page-content ul ul ul {
  list-style-type: square; /* Use square for third-level lists */
  margin-left: 20px; /* Indent third-level lists */
}

.btn {
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-outline {
  border: 1px solid #71727a;
  background: none;
}

.btn:hover {
  transform: scale(1.05);
  transition-duration: 0.2s;
}

.start-learning-btn {
  margin-top: 20px; /* Space above the button */
}

.start-learning-btn:disabled {
  background-color: #ccc; /* Gray background for disabled button */
  color: #666; /* Darker gray text */
  cursor: not-allowed; /* Change cursor to indicate it's not clickable */
  border: none; /* Remove border */
}

.start-learning-btn:disabled:hover {
  background-color: #ccc; /* No hover effect */
}

.start-learning-btn.back-to-course {
  background-color: #28a745; /* Green background */
  color: white; /* White text */
}

.start-learning-btn.back-to-course:hover {
  background-color: #218838; /* Darker green on hover */
}

.button-container {
  display: flex; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  margin-top: 20px; /* Space above the button container */
}

.course-levels-heading {
  text-align: center;
  font-size: 16px;
  margin: 20px 10px;
  color: #71727a;
  font-weight: bold;
}

.course-levels-heading i {
  margin-right: 10px; /* Space between icon and text */
  color: #006ffd; /* Color for the icon */
  font-size: 28px; /* Adjust icon size */
}

.lesson-level-heading {
  font-size: 16px; /* Increase font size */
  font-weight: bold; /* Make text bold */
  text-transform: uppercase; /* Capitalize text */
  border-radius: 10px; /* Rounded corners */
  padding: 20px; /* Increase padding for a larger block */
  display: flex;
  flex-direction: column; /* Stack icon and text vertically */
  align-items: center; /* Center align the content */
  justify-content: center; /* Center align the content */
  text-align: center; /* Center align the text */
  background-color: #f8f9fe;
}

.lesson-level-heading i {
  font-size: 32px; /* Make the icon larger */
  color: #4caf50; /* Icon color */
  margin-bottom: 10px; /* Space between icon and text */
}

.level-text {
  font-size: 16px;
  color: white;
  background-color: #4caf50;
  padding: 5px 10px;
  border-radius: 5px;
}

.lesson-list {
  list-style-type: none; /* Remove default list styling */
  padding: 0;
}

.lesson-item {
  background-color: #f9f9f9; /* Light background for items */
  border: 1px solid #ddd; /* Border for items */
  border-radius: 5px; /* Rounded corners */
  margin: 10px 0; /* Space between items */
  padding: 10px;
  display: flex;
  align-items: center;
}

.lesson-item i {
  margin-right: 10px; /* Space between icon and text */
  color: #71727a; /* Icon color */
}

.lesson-item a {
  text-decoration: none; /* Remove underline */
  color: #333; /* Text color */
}

.lesson-item a:hover {
  color: #000;
}

.lesson-view h3.lesson-title {
  margin: 20px 0; /* Add space above and below the title */
  text-align: center; /* Center the title */
}

.lesson-content {
  margin-top: 20px; /* Add some space above the lesson content */
}

.context-section {
  background-color: #f0f0f0;
  border-radius: 10px;
  padding: 15px;
  margin: 15px;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: left;
}

.context-section-header {
  border-radius: 5px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  font-size: 14px;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 10px;
}

.context-section-header .header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  font-weight: 700;
}

.translation-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
  justify-content: flex-start;
  font-size: 14px;
  width: 100%;
}

.checkboxes {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 10px 0;
}

.player-container {
  width: 100%;
  margin-top: 10px;
}

.back-to-questions {
  text-align: center;
  margin: 2rem 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #71727a;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3sease;
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

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

.switch .slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}

.switch .slider.round {
  border-radius: 24px;
}

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

.switch input:checked + .slider {
  background-color: #0056cc;
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}
/* end of switch styling */

/* transcript section */
.transcript-section {
  max-height: 420px;
  overflow-y: auto;
  padding: 0 10px;
  width: 100%;
}

.transcript-section::-webkit-scrollbar {
  width: 0.2em;
}
.transcript-section::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}
.transcript-section::-webkit-scrollbar-thumb {
  background-color: #71727a;
  outline: 1px solid slategrey;
}

.trans {
  margin-bottom: 10px;
}

.trans-item {
  background-color: #e0f7fa;
  border-radius: 5px;
  padding: 10px;
  max-width: 90%;
  position: relative;
  margin: 5px 0;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.trans-item.hidden {
  display: none;
}

.trans-item .vol-block {
  cursor: pointer;
  text-transform: uppercase;
  color: #0056cc;
}
.trans-item .txt-block {
  width: 80%;
}

.trans-item.char-a {
  align-self: flex-start;
  margin-right: auto;
  background-color: #e0f7fa;
}

.trans-item.char-b {
  align-self: flex-end;
  margin-left: auto;
  background-color: #bbdefb;
}

.trans-item.char-b .vol-block {
  color: #660000;
}

.trans-item.en {
  font-weight: 700;
}

.trans-item.vi {
  font-style: italic;
}

.trans-header {
  border-top: 1px solid #71727a;
  margin: 20px 0 10px;
  padding-top: 15px;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.trans-header i {
  margin-right: 5px;
}
/* end of transcript section */

/* POPUP */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease;
}

.popup.show {
  visibility: visible;
  opacity: 1;
}

.popup-title {
  margin-bottom: 10px;
}

.popup-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  min-height: 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Popup footer */
.popup-footer {
  display: flex;
  justify-content: space-evenly;
  margin-top: 20px;
}

/* end of popup */

.play-config {
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  margin: 10px;
}

/* checkbox choices */
.checkbox-choice input[type='radio'] {
  appearance: none;
  background-color: #fff;
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 5px;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}
.checkbox-choice label {
  cursor: pointer;
}

.checkbox-choice input[type='radio']::before {
  content: '';
  width: 10px;
  height: 10px;
  transform: scale(0);
  transform-origin: bottom left;
  background-color: #fff;
  clip-path: polygon(13% 50%, 34% 66%, 81% 2%, 100% 18%, 39% 100%, 0 71%);
}

.checkbox-choice input[type='radio']:checked::before {
  transform: scale(1);
}
.checkbox-choice input[type='radio']:checked {
  background-color: #0056cc;
  border: 2px solid #0056cc;
}
/* end of checkbox choices */

.accordion {
  position: relative;
  padding: 10px 10px 30px;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.accordion-content {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s ease-in-out, filter 0.6s ease-in-out;
}

.accordion.collapsed .accordion-content {
  max-height: 45px;
}

.accordion.collapsed .accordion-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 1) 100%
  );
  filter: blur(2px);
  transition: opacity 0.6s ease-in-out;
}

.accordion.expanded .accordion-content {
  filter: none;
}
.accordion.expanded .accordion-content::after {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.accordion-control {
  position: absolute;
  width: 95%;
  text-align: center;
  bottom: 10px;
  cursor: pointer;
}

.accordion.collapsed .collapsed-control {
  display: none;
}

.accordion.expanded .expanded-control {
  display: none;
}
