@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap");

:root {
  --color-main: #71c6dd;
  --color-main-light: #e1f6fb;
  --color-dark: #3f4156;
  --color-dark-medium: #51546e;
  --color-dark-light: #696d97;
  --color-light: #e5e5e5;
  --color-gray: #8b8b8b;
  --color-light-gray: #b2bdbd;
  --color-bg: #2d2d39;
  --color-success: #5dd693;
  --color-error: #fc4b0b;
  --color-lighter: #f7f4f4;
}

/*========== base styles ==========*/

* {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  /* color: inherit; */
  font-size: inherit;
}

html {
  font-size: 56.25%;
}

@media only screen and (min-width: 1200px) {
  html {
    font-size: 62.5%;
  }
}

@media only screen and (min-width: 2100px) {
  html {
    font-size: 75%;
  }
}

body {
  line-height: 1.6;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-light-gray);
  background-color: var(--color-bg);
  min-height: 100vh;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

img {
  width: 100%;
}

a {
  display: inline-block;
  color: var(--color-main);
  text-decoration: none;
}

/*========== components ==========*/
.container {
  /* max-width: 120rem; */
  width: 90%;
  margin: auto;
}

.btn {
  background-color: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all ease-in-out 0.3s;
  padding: 1rem 2rem;
  border-radius: 5px;
  box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}

.btn--link {
  border-radius: 0;
  padding: 0;
  color: var(--color-main);
  box-shadow: none;
}

.btn--link:hover {
  text-decoration: underline;
}

.btn--main {
  background-color: var(--color-main);
  color: var(--color-dark);
}

.btn:hover {
  opacity: 0.9;
}

.btn--dark {
  background-color: var(--color-dark-light);
  color: var(--color-light);
}

.btn > svg {
  fill: currentColor;
  width: 1.6rem;
  height: 1.6rem;
}

.btn--pill {
  border-radius: 10rem;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 6px 2.5rem;
  color: var(--color-main);
  background: transparent;
  border: 2px solid var(--color-main);
}

.action-button {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.avatar {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid var(--color-main);
}

.avatar img {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.avatar::after {
  content: "";
  display: block;
  position: absolute;
  background-color: var(--color-gray);
  z-index: 111;
  border-radius: 50%;
  border: 0.3rem solid var(--color-dark);
}

.avatar.active::after {
  background-color: var(--color-success);
}

.avatar.avatar--small img {
  width: 2.8rem;
  height: 2.8rem;
}

.avatar.avatar--small:after {
  width: 0.7rem;
  height: 0.7rem;
  bottom: 0px;
  right: -6px;
}

.avatar.avatar--medium img {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
}

.avatar.avatar--medium:after {
  width: 0.7rem;
  height: 0.7rem;
  bottom: 0px;
  right: -6px;
}

.avatar.avatar--large img {
  display: block;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
}

.avatar.avatar--large:after {
  width: 1rem;
  height: 1rem;
  bottom: 2px;
  right: 3.5px;
}

.dropdown-menu {
  z-index: 111;
  position: absolute;
  top: 5rem;
  right: 0.5rem;
  background: var(--color-dark-light);
  border-radius: 5px;
  box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu a {
  padding: 1.2rem 4rem;
  display: block;
  color: var(--color-light) !important;
  font-weight: 500;
  font-size: 1.4rem;
}

.dropdown-menu a:hover {
  background-color: var(--color-dark-medium);
}

.dropdown-menu > a:not(:last-child) {
  border-bottom: 1px solid var(--color-dark-medium);
}

.dropdown-menu a svg {
  fill: var(--color-light);
}

.mobile-menu {
  margin-bottom: 3rem;
}

.mobile-menuItems {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media screen and (min-width: 500px) {
  .mobile-menu {
    display: none;
  }
}

/*==============================
=>  Header Section
================================*/

.header {
  padding: 1.5rem;
  background-color: var(--color-dark);
}

.header > .container {
  display: flex;
  gap: 9.5rem;
}

.header__logo,
.header__user {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.header__logo > img {
  /* height: 4.2rem; */
  width: 8rem;
}

.header__logo > h1 {
  font-weight: 700;
  font-size: 2rem;
  color: var(--color-light);
}

.header__search > label {
  background-color: var(--color-dark-medium);
  padding: 1.3rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 4px;
}

.header__search svg {
  fill: var(--color-gray);
  width: 2rem;
  height: 2rem;
  margin-left: 1rem;
}

.header__search input {
  width: 30rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-light);
}

@media screen and (max-width: 800px) {
  .header__search input {
    width: 20rem;
  }

  .header > .container {
    gap: 3rem;
  }
}

@media screen and (max-width: 700px) {
  .header__logo h1 {
    display: none;
  }
}

@media screen and (max-width: 500px) {
  .header__search {
    display: none;
  }
}

.header__menu {
  margin-left: auto;
  position: relative;
}

.header__menu a {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-light);
}

.header__menu img {
  height: 3.6rem;
}

.header__menu p {
  line-height: 1.2;
}

.header__menu span {
  color: var(--color-main);
  font-weight: 500;
  font-size: 1.4rem;
  display: block;
}

.header__menu svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: var(--color-dark-light);
}

.dropdown-button {
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
}

.dropdown-button:hover svg {
  fill: var(--color-main);
}

/*==============================
=>  Layout
================================*/

.layout {
  margin-top: 2.4rem;
}

.layout > .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.layout--3 > .container > div:first-child {
  flex-basis: 18%;
  max-width: 22.5rem;
}

.layout--3 > .container > div:nth-child(2) {
  flex-basis: 50%;
}

.layout--3 > .container > div:last-child {
  flex-basis: 25%;
}

.layout--2 > .container > div:first-child {
  flex-basis: 72%;
}

.layout--2 > .container > div:last-child {
  flex-basis: 25%;
}
/*========== Layout Box ==========*/

.layout__box {
  width: 90%;
  max-width: 48rem;
  min-height: 40rem;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -46%);
  background-color: var(--color-dark);
  border-radius: 1rem;
  box-shadow: 1px 1px 6px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.layout__boxHeader {
  display: flex;
  padding: 1.5rem;
  background-color: var(--color-dark-light);
}

.layout__boxTitle {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.layout__boxTitle h3 {
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-light);
}

.layout__boxTitle svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: var(--color-main);
}

.layout__body {
  margin: 3rem;
}

/* Upload Form */

.upload-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 15px auto 0;
  padding: 20px;
}

.upload-layout-init {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  align-items: center;
  min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
  padding: 20px;
  position: relative;
}

.upload-layout-init::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("/static/images/bg.jpg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 0;
}

form,
h1 {
  position: relative;
  z-index: 1;
}

.upload-layout h2,
.upload-layout-init h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

/* Styling the form */
.upload-layout form,
.upload-layout-init form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 500px;
  background-color: var(--color-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 1px 1px 6px 3px rgba(0, 0, 0, 0.1);
}

/* Adjusting form elements' look */
.upload-layout form p,
.upload-layout-init form p {
  width: 100%;
  margin-bottom: 15px;
}

/* Additional form input styling */
.upload-layout input[type="file"],
.upload-layout input[type="text"],
.upload-layout input[type="password"],
.upload-layout textarea,
.upload-layout-init input[type="file"],
.upload-layout-init input[type="text"],
.upload-layout-init input[type="password"],
.upload-layout-init textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

/* Home heading */

.home-heading {
  font-size: 250%;
  padding: 40px;
  /* margin-bottom: 30px; */
  font-weight: bolder;
  color: var(--color-lighter);
}

/* File info */
.file-info-layout {
  justify-content: center;
  text-align: center;
  margin-top: 0px;
  background-color: var(--color-bg);
  padding: 20px;
  border-radius: 10px;
  /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); */
}

.file-info {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 0px;
  color: var(--color-accent);
}

.file-name {
  font-size: 15px;
  font-weight: 600;
  margin-top: 5px;
  margin-bottom: 0px;
  color: var(--color-accent);
}

.file-data-table {
  max-width: 800px;
}

.history-table {
  max-width: 90%;
}

.table-container {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  margin-bottom: 20px;
}

.styled-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.styled-table thead tr {
  background-color: var(--color-dark-medium);
  /* color: #ffffff; */
  text-align: left;
  font-weight: bolder;
}

.styled-table tbody tr {
  transition: background-color 0.2s ease;
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: var(--color-dark-medium);
}

.styled-table th,
.styled-table td {
  padding: 8px 15px;
  text-align: center;
}

@media screen and (max-width: 900px) {
  .activities,
  .topics {
    display: none;
  }

  .layout--3 > .container > div:nth-child(2) {
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .styled-table {
    font-size: 14px;
  }
}

/* Detect Layout */
.detect-layout {
  margin-bottom: 35px;
}

.detect-layout form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  max-width: 350px;
  background-color: var(--color-dark);
  border-radius: 10px;
  box-shadow: 1px 1px 6px 3px rgba(0, 0, 0, 0.1);
}

.contamination-percentage {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  justify-content: center;
}

.contamination-percentage .input-row {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.contamination-percentage label {
  font-size: 1.6rem;
  color: var(--color-light);
  margin-bottom: 5px;
}

.contamination-percentage input {
  width: 100%;
  max-width: 70px;
  padding: 10px;
  border: 1px solid var(--color-dark-light);
  border-radius: 5px;
  font-size: 1.5rem;
  color: var(--color-light);
  background-color: var(--color-dark);
}

.contamination-percentage input[type="number"]:focus {
  border-color: var(--color-main);
  outline: none;
}

.contamination-percentage button {
  margin-top: 20px;
  align-self: center;
  font-size: 1.6rem;
}

/*==============================
=>  Topics
================================*/

.form__group {
  margin-bottom: 2rem;
  width: 100%;
}

.form__split {
  display: flex;
  gap: 1.5rem;
}

.form__group label {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.form__group input,
.form__group textarea,
.form__group select {
  background: transparent;
  border: 1px solid var(--color-dark-light);
  padding: 1rem;
  border-radius: 3px;
  width: 100%;
  color: var(--color-light);
  font-weight: 500;
  outline: none;
}

.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--color-main);
}

.form__group textarea {
  background: transparent;
  height: 10rem;
  resize: none;
}

.form__group select {
  color: var(--color-gray);
  font-weight: 400;
}

.form__group select option {
  background-color: var(--color-dark-light);
  color: var(--color-light);
  padding: 0 10rem;
}

.form__action {
  display: flex;
  justify-content: flex-end;
  gap: 3rem;
}

.form__hide {
  position: absolute;
  left: -9999px;
}

.form__avatar label {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--color-main);
  cursor: pointer;
}

.form__avatar label:hover {
  text-decoration: underline;
}

/*==============================
=>  Update Account
================================*/

.update-account.layout .layout__box {
  max-width: 68rem;
}

/*==============================
=>  Delete Item
================================*/

.delete-item.layout .layout__box {
  max-width: 68rem;
}

/*==============================
=>  Auth
================================*/

.auth__tagline {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-main);
  font-weight: 500;
  font-size: 1.8rem;
}
.auth .layout__boxHeader {
  text-align: center;
  justify-content: center;
}

.auth__action {
  margin-top: 3rem;
  text-align: center;
}

.login-button {
  display: flex;
  justify-content: center;
}
/*==============================
=>  Profile
================================*/
.profile {
  margin-bottom: 3rem;
}

.profile__avatar {
  text-align: center;
}

.profile__info {
  text-align: center;
}

.profile__info h3 {
  font-size: 2rem;
  color: var(--color-light);
  font-weight: 400;
}

.profile__info p {
  color: var(--color-main);
  font-weight: 500;
  margin-bottom: 1rem;
}

.profile__about {
  margin-top: 2rem;
}

.profile__about h3 {
  text-transform: uppercase;
  color: var(--color-dark-light);
  margin-bottom: 0.5rem;
}

.profile-page .roomList__header {
  margin-bottom: 1.5rem;
}

.profile-page .roomList__header h2 {
  color: var(--color-dark-light);
}

/* Messages */
.messages {
  list-style-type: none;
  padding: 0;
  margin: 10px 0;
}

.messages li {
  /* background-color: #ffcccc;  */
  color: #ff0000; /* Red text */
  /* padding: 10px; */
  border-radius: 5px;
  font-size: 14px;
}

/* Loader */
.loading-popup {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-content {
  background: var(--color-bg);
  padding: 40px;
  border-radius: 7px;
  text-align: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 32px 0 #fff, -32px 0 #fff;
  position: relative;
  animation: flash 0.5s ease-out infinite alternate;
  margin: 20px 0;
}

@keyframes flash {
  0% {
    background-color: #fff2;
    box-shadow: 32px 0 #fff2, -32px 0 #fff;
  }
  50% {
    background-color: #fff;
    box-shadow: 32px 0 #fff2, -32px 0 #fff2;
  }
  100% {
    background-color: #fff2;
    box-shadow: 32px 0 #fff, -32px 0 #fff2;
  }
}

/* History */

.action-history-layout {
  justify-content: center;
  text-align: center;
  margin-top: 0px;
  background-color: var(--color-bg);
  padding: 20px;
  border-radius: 10px;
  /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); */
}

.action-history-heading {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--color-accent);
}

.filter-container {
  display: flex;
  justify-content: space-between;
  margin: 15px auto;
  max-width: 90%;
  /* background-color: var(--color-dark-medium); */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-container input[type="text"] {
  padding: 10px 15px;
  font-size: 14px;
  border: 1px solid var(--color-dark-medium);
  border-radius: 20px;
  outline: none;
  transition: all 0.3s ease;
  background-color: var(--color-dark-medium);
  color: var(--color-gray);
}

.filter-container input[type="text"]::placeholder {
  color: var(--color-light-gray);
  opacity: 0.7;
}

.filter-container input[type="text"]:focus {
  border-color: var(
    --color-accent
  ); /* Accent color for focus state, e.g., a blue or green */
  box-shadow: 0 0 5px var(--color-accent);
}

/* Settings */
.settings-layout {
  justify-content: center;
  text-align: center;
  margin-top: 0px;
  background-color: var(--color-bg);
  padding: 20px;
  border-radius: 10px;
}

.settings-heading {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--color-accent);
}

.settings-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 15px auto 0;
  padding: 20px;
}

/* Styling the form */
.settings-layout form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 500px;
  background-color: var(--color-dark);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 1px 1px 6px 3px rgba(0, 0, 0, 0.1);
}

/* Adjusting form elements' look */
.settings-layout form p {
  display: flex;
  width: 100%;
  margin-bottom: 15px;
  justify-content: space-between;
  align-items: center;
}

/* Additional form input styling */
.settings-layout input[type="text"],
.settings-layout input[type="number"],
.settings-layout textarea {
  width: 15%;
  padding: 5px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

/* Footer */

.footer {
  padding: 2rem 1.5rem;
  background-color: var(--color-dark);
  text-align: center;
  color: var(--color-light);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.footer__link {
  color: var(--color-main);
  text-decoration: none;
  font-weight: 500;
}

.footer__link:hover {
  text-decoration: underline;
}

.footer__content p {
  font-size: 1.4rem;
  margin: 0;
}

.footer__content p span {
  color: var(--color-main);
}

@media screen and (max-width: 700px) {
  .footer__content {
    gap: 1rem;
  }

  .footer__content p {
    font-size: 1.4rem;
  }
}

@media screen and (max-width: 500px) {
  .footer__content p {
    font-size: 1.2rem;
  }
}
