/* ########################################## LAYOUT PAGE ########################################## */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap");

* {
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header-main {
  background-color: #6950a1;
  color: #fff;
  padding: 1vh 3vh;
  text-align: center;
  box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  gap: 30px;
}

.header-main nav a {
  text-decoration: none;
  font-size: 1.5rem;
  color: #fff;
}
.header-main nav a:hover {
  text-decoration: underline;
}

.header-main h2 {
  text-align: left;
}

.link-buttons {
  display: flex;
  flex-direction: row;
  gap: 18px;
}

.account-buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

main {
  flex: 1;
}

/* ########################################## INDEX PAGE ########################################## */

.index-section {
  display: flex;
}

.all-scripts-div {
  width: 40%;
  padding: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sub-scripts-div {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.all-scripts-div::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 2px;
  height: 90%;
  background-color: #b9b9b9;
  transform: translateY(-50%);
  border-radius: 10px;
}

.script-div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 0.35rem;
  margin: 0.5rem 0;
  cursor: pointer;
  position: relative;
}

.script-div::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 95%;
  height: 1px;
  background-color: #b9b9b9;
  transform: translateX(-50%);
  border-radius: 10px;
}

.script-div:hover .script-link:before,
.script-div:hover .script-link:after,
.script-link:hover:before,
.script-link:hover:after {
  transform: scaleX(0.3);
  transform: translateX(0);
}

.script-div:hover::after {
  opacity: 0;
}

.script-div:hover {
  background-color: #f8f8f5;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.11);
  border-radius: 10px;
}

.script-link {
  color: #0069aa;
  font-size: 1.3rem;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  padding: 0.5em;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  &:before,
  &:after {
    position: absolute;
    content: "";
    border-bottom: 3px solid #0069aa;
    border-radius: 1em;
    bottom: 0.3em;
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
  }

  &:before {
    width: 1em;
    transform-origin: left;
  }

  &:after {
    width: 82%;
    left: 1em;
    transform: translateX(110%);
  }

  &:hover:before {
    transform: scaleX(0.3);
  }

  &:hover:after {
    transform: translateX(0);
  }
}

.script-buttons-div {
  display: flex;
  gap: 10px;
}

.download-btn {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid #6950a1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition-duration: 0.3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.11);
}

.svgIcon {
  fill: rgb(214, 178, 255);
}

.icon2 {
  width: 18px;
  height: 5px;
  border-bottom: 2px solid rgb(182, 143, 255);
  border-left: 2px solid rgb(182, 143, 255);
  border-right: 2px solid rgb(182, 143, 255);
}

.tooltip {
  z-index: 1;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  opacity: 0;
  background-color: rgb(12, 12, 12);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition-duration: 0.2s;
  pointer-events: none;
  letter-spacing: 0.5px;
}

.tooltip::before {
  position: absolute;
  content: "";
  width: 10px;
  height: 10px;
  background-color: rgb(12, 12, 12);
  transform: rotate(45deg);
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  transition-duration: 0.3s;
}

.tooltip-reverse {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 10px;
}

.tooltip-reverse::before {
  left: auto;
  right: -5px;
}

.help-tooltip {
  width: 15vw;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.help-tooltip p {
  margin: 5px 0 5px;
}

.arg-b {
  color: #7c7cc0;
}

.tooltip-btn:hover .tooltip {
  opacity: 1;
  transition-duration: 0.3s;
}

.download-btn:hover {
  background-color: rgb(150, 94, 255);
  transition-duration: 0.3s;
}

.download-btn:hover .icon2 {
  border-bottom: 2px solid rgb(235, 235, 235);
  border-left: 2px solid rgb(235, 235, 235);
  border-right: 2px solid rgb(235, 235, 235);
}

.download-btn:hover .svgIcon {
  fill: rgb(255, 255, 255);
  animation: slide-in-top 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slide-in-top {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }

  100% {
    transform: translateY(0px);
    opacity: 1;
  }
}

.pagination-controls {
  display: flex;
  justify-content: center;
}

.pagination-btn {
  background-color: #6950a1;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.pagination-btn:hover {
  background-color: #57408a;
}

.page-number {
  align-self: center;
  padding: 0 0.75vw;
}

.all-info-div {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 60%;
  padding: 0.5rem;
  max-height: min-content;
}

.upload-script-div {
  padding: 2rem 5rem;
}

.script-input-file {
  font-size: 1.2vw;
}

.script-drop-title {
  font-size: 25px;
  font-weight: 500;
  text-align: center;
}

.drop-script-p {
  font-size: auto;
}

.main-info-div {
  display: flex;
  flex-direction: row;
  height: 100%;
  max-height: min-content;
}

.desc-card {
  border-radius: 10px;
  filter: drop-shadow(0 5px 10px 0 #ffffff);
  background-color: #ffffff;
  padding: 20px;
  margin: 10px 35px 20px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: 0.6s ease-in;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.11);
}

.desc-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -15px;
  right: -15px;
  background: #7952b3;
  height: 200%;
  width: 25px;
  border-radius: 32px;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: transform 0.25s ease-out;
}

.desc-card:hover::before {
  transition-delay: 0.2s;
  transform: scale(50);
}

.desc-card:hover {
  color: #ffffff;
}

.desc-card:hover .card-icon {
  fill: #ffffff;
}

.desc-card:hover li::marker {
  color: #ffffff;
}

.desc-card p {
  padding: 10px 0;
}

.card-icon {
  width: 68px;
  height: 68px;
  vertical-align: middle;
  transition: 0.6s ease-in;
}

.desc-card-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.schema-div {
  display: flex;
  flex-direction: row;
  align-items: space-between;
  gap: 10px;
}

.schema-div img {
  width: 50%;
  height: min-content;
  object-fit: contain;
  border: 2px solid #6950a1;
  border-radius: 5px;
  align-self: center;
}

.schema-div p {
  font-style: italic;
  text-align: center;
}

ul {
  list-style-type: "✓ ";
  padding-inline-start: 25px;
  font-style: italic;
}

li::marker {
  color: black;
  transition: 0.6s ease-in;
}

li {
  padding: 5px 0;
}

/* ########################################## SCRIPT PAGE ########################################## */

.script-page-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.script-page-main-div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}

.output-div {
  display: flex;
  flex-direction: column;
  margin: 20px 20px 0px;
  width: 65vw;
}

.options-div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30vw;
  margin: 20px 20px 0px;
}

.options-div form {
  flex-direction: row;
}

.view-files-container {
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.view-files-div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.view-files-btn:hover .rm-script-sub-file-svg {
  display: block;
}

.view-files-btn:hover .dl-script-sub-file-svg {
  fill: #7c7cc0;
}

.shared-div {
  display: flex;
  flex-direction: column;
  border: 2px solid #ccc;
  padding: 10px;
  gap: 10px;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  height: 15vh;
}

.upload-div {
  position: relative;
}

.upload-input {
  width: 100%;
  padding-right: 50px; /* Adjust padding to make space for the button */
}

.upload-script-sub-files-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.upload-script-sub-files-btn:hover svg {
  fill: #4747b8;
}

.dl-script-sub-file-svg {
  position: relative;
}

.rm-script-sub-file-svg {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.tags-input-wrapper{
  background: transparent;
}

.tags-input-wrapper input{
  border: none;
  background: transparent;
  outline: none;
  margin-left: 8px;
}

/* Modal styles for tag value assignment */
.variable-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.variable-modal-content {
  background-color: #fff;
  border-radius: 5px;
  padding: 20px;
  width: 400px;
  max-width: 90%;
}

.variable-modal-header {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.variable-modal-input {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.variable-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variable-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 2px 4px;
}

.variable-modal-save-btn {
  --btn-color: #ffffff;
  --btn-border-color: #28a745;
  --btn-hover-color: #28a745;
  padding: 5px 15px;
}

.variable-modal-cancel-btn {
  --btn-color: #ffffff;
  --btn-border-color: #dc3545;
  --btn-hover-color: #dc3545;
  padding: 5px 15px;
}

/* Existing tag styles enhanced */
.assign-tag {
  display: none;
}

.tag {
  display: inline-block;
  background-color: rgb(184, 184, 201);
  color: white;
  border-radius: 8px;
  padding: 0px 3px 0px 7px;
  margin-right: 5px;
  margin-bottom:5px;
  box-shadow: 0 5px 15px -2px rgba(149, 149, 196, 0.7);
  cursor: pointer;
  position: relative;
  align-items: center;
  transition: background-color 0.2s ease;
}

.tag:hover, .tag.has-value:hover {
  background-color: #7070b0;
}

.tag.has-value {
  background-color: rgb(162, 162, 196);
}

.tags-input-wrapper .tag a {
  margin: 0 7px 3px;
  display: inline-block;
  cursor: pointer;
}

.tags-input-wrapper .tag a:hover {
  color: black;
}

.variable-type-container {
  display: flex;
  align-items: center;
}

.variable-type-selector {
  flex-grow: 1;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.variable-input-container {
  margin-bottom: 15px;
}

.variables-container {
  display: flex;
  flex-direction: column;
  border: 2px solid #ccc;
  padding: 10px;
  max-height: 15vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.variable-input-area input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 36px;
}

.variable-tags-area {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 30px;
}

.variable-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.variable-input-colored-btn {
  position: relative;
  height: 36px;
  padding: 5px 10px;
}

.input-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

#variable-input {
  padding-left: 36px;
  width: 100%;
  height: 36px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.pre-title {
  width: 100%;
  top: 0;
  left: 0;
  background-color: #7c7cc0;
  color: white;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.pre-title-span {
  font-weight: bold;
  font-size: 0.75em;
  padding: 2.5px 5px;
}

.pre-buttons-div {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
}

.invisible-buttons {
  position: relative;
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
  display: flex;
}

.invisible-buttons:disabled{
  cursor: not-allowed;
}

.invisible-buttons:disabled svg {
  fill: #ccc;
}

.output-pre {
  padding: 10px;
  border: 2px solid #ccc;
  overflow: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
  box-sizing: border-box;
  font-family: monospace;
  margin: 0;
}

.output-div pre {
  width: 100%;
  height: 65vh;
}

.options-div pre {
  width: 30vw;
  height: 30vh;
}

.output-tools-div {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 10px 20px 0px;
}

.docker-buttons-form {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.terminal-input-div form {
  height: 100%;
}
.terminal-input-div {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.terminal-input-container {
  display: flex;
  width: 100%;
  position: relative;
}

.terminal-input {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 2px solid #ccc;
  white-space: nowrap;
  overflow: hidden;
  display: block;
  padding-right: 40px;
  box-sizing: content-box;
}

.terminal-input:focus {
  outline: #7952b3 auto 2px;
}

.send-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 6px 0 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.send-button:hover svg {
  fill: #6950a1;
}

.status-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .output-tools-div {
    justify-content: center;
  }
}

.command-btn {
  position: relative;
  height: 42px;
  padding: 0.5rem 1rem;
}

.colored-btn {
  cursor: pointer;
  border-radius: 4px;
  background-color: var(--btn-color, #ffffff);
  border: var(--btn-border-color, #6950a1) 1px solid;
}

.command-btn.loading {
  cursor: wait;
}

.command-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  border: none;
}

.command-btn:disabled svg {
  fill: #ffffff;
}

.command-btn:hover:disabled {
  background-color: #ccc;
  border: none;
}

.colored-btn:hover {
  background-color: var(--btn-hover-color, #6950a1);
}

.colored-btn:hover svg {
  fill: #ffffff;
}

.command-btn:hover:disabled svg {
  fill: #ffffff;
}

/* ########################################## ADMIN PAGE ########################################## */

.admin-section {
  display: flex;
  flex-direction: row;
}

.users-div {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.all-users-table-div {
  width: 60vw;
}

.requests-users-table-div {
  width: 40vw;
}

.users-info-div {
  max-height: 100vh;
  box-sizing: content-box;
  margin: 30px 2vw;
  overflow-y: scroll;
  border-top: none;
}

.all-users-table-div .users-info-div {
  border: 2px solid #0069aa;
}

.requests-users-table-div .users-info-div {
  border: 2px solid #158824;
}

.all-users-table-div .users-info-div .user-table thead tr {
  background-color: #0069aa;
}

.requests-users-table-div .users-info-div .user-table thead tr {
  background-color: #158824;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.users-info-div::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.users-info-div {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.disabled-tr {
  opacity: 0.4; /* Adjust the opacity value as needed */
  cursor: not-allowed;
}

.disabled-tr .invisible-buttons {
  cursor: not-allowed;
}

.users-info-td {
  width: 20vw;
  max-width: 20vw;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 18px;
  text-align: left;
}

.user-table thead tr {
  color: #ffffff;
  text-align: left;
  font-weight: bold;
}

.user-table th, .user-table td {
  padding: 12px 15px;
}

.svg-td-div {
  display: flex;
  gap: 20px;
}

.svg-td-div form {
  flex-direction: row;
  gap: 20px;
}

.user-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.user-table tbody tr:nth-of-type(even) {
  background-color: #e2e7e7;
}

.user-table tbody tr:hover {
  background-color: rgb(238, 238, 238);
}

.user-table tbody tr:hover:nth-of-type(even) {
  background-color: #e6e6e6;
}

/* ########################################## CUSTOM JSONHTMLPDF PAGE ########################################## */

.script-section {
  display: flex;
  width: 100%;
  padding: 10vh;
  margin: 0 auto;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.card {
  border-radius: 16px;
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.3);
  padding: 2vh 5vw 4vh;
  background-color: #f8f8f5;
}

footer {
  background-color: #464a5d;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

form {
  display: flex;
  flex-direction: column;
}

input[type="file"],
select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.custom-btn-div {
  display: flex;
  justify-content: center;
}

.custom-btn {
  padding: 0.75rem 3rem;
  margin-top: 1rem;
  border: 1px solid #6950a1;
  color: #7c7cc0;
  border-radius: 4px;
  cursor: pointer;
}

.custom-btn:hover {
  background-color: #6950a1;
  color: #fff;
}

.drop-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 2px dashed #4747b8;
  border-radius: 6px;
  color: #222245;
  cursor: pointer;
  transition: background 0.2s ease-in-out, border 0.2s ease-in-out;
}

.drop-container:hover {
  background: #eee;
}

.drop-title {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.drop-container.drag-active {
  background: #eee;
}

input[type="file"] {
  max-width: 100%;
  color: #222245;
  padding: 0.5em 3em 0.5em 1em;
  background-color: #fff;
  border: 1px solid #4747b8;
}

input[type="file"]:focus {
  outline: 2px dashed #4747b8;
  outline-offset: 2px;
}

input[type="file"]::file-selector-button {
  margin-right: 0.5em;
  border: none;
  background: #222245;
  padding: 0.75em 1em;
  color: #fff;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #4747b8;
}

@media (prefers-color-scheme: dark) {
  .drop-container {
    border-color: #6950a1;
  }

  .drop-container:hover {
    background-color: #6950a1;
    color: #fff;
  }

  .drop-container.drag-active {
    background-color: #6950a1;
    color: #fff;
  }

  input[type="file"] {
    max-width: 100%;
    border: 1px solid #6950a1;
  }

  input[type="file"]:focus {
    outline: 2px dashed #7c7cc0;
    outline-offset: 2px;
  }

  input[type="file"]::file-selector-button {
    background-color: #6950a1;
  }
}