@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap');

:root {
  --hofstra-blue: #12579a;
  --hofstra-yellow: #ffc309;
  --main-bg-light: #f5fbff;
  --description-text: #667;
  --font-inter: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-inter);
  background-color: var(--main-bg-light);
}

header {
  background-color: var(--hofstra-blue);
  color: var(--main-bg-light);
  padding: 0.5rem;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  margin: 0 0 0 1rem;
  color: var(--main-bg-light);
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 48px;
  display: block;
}

.logo-text {
  font-weight: bolder;
  margin-left: 10px;
  line-height: 1.2;
}

.title {
  margin: 0 0 0 3rem;
  color: var(--main-bg-light);
  font-weight: bolder;
  font-size: 1.2rem;
}

nav .nav-link {
  color: var(--main-bg-light);
  text-decoration: none;
  margin: 0 15px;
  font-weight: normal;
}

nav .nav-link:hover {
  border-bottom: 2px solid var(--main-bg-light);
}

main {
  padding: 2rem;
  max-width: 1200px; 
  margin: 0 auto;
}

.content-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; 
}

.settings-container {
  flex: 1;
  max-width: calc(50% - 1rem); 
  margin-bottom: 2rem; 
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.checkbox {
  margin: 0 0 0.5rem 0;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap; /* wrap on small screens */
  gap: 10px;
  /* margin-bottom: 1rem; */
}

.checkbox-group input[type="checkbox"] {
  margin: 0  0.3rem 0 0;
}

#job-preemptable,
#test-qos {
  margin: 0 0.3rem 0.6rem 0;
}

.description {
  /* font-style: italic; */
  font-size: 14px;
  color: var(--description-text);
  margin-bottom: 0.5rem;
}

.walltime-container {
  display: flex;
  gap: 10px;
}

.walltime-container input {
  flex-grow: 1;
}

.script-container {
  flex: 1;
  max-width: calc(50% - 1rem); 
  max-height: 75vh;
  overflow-y: scroll;
  margin: 1.5rem 0 0 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  position: sticky; /* to keep it on top after we scroll down. For better visibility and access */
  top: 1rem;
  z-index: 10;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Aligns items to the start of the container */
}

.toggle-container label {
  margin-right: 0.5rem; /* Adjust the right margin of the label as needed */
}

.email-settings {
  display: none; /* Initially hidden */
  margin-top: 0.5rem;
}

#slurm-script {
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 150px;
}

/* Base styling for custom dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
  max-width: 300px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  user-select: none;
  text-align: left;
  padding: 6px 8px; /* Smaller padding */
  font-size: 0.9rem; /* Smaller font size */
  color: #333; /* Text color */
}

/* Styling for dropdown options container */
.custom-dropdown-content {
  display: none;
  position: absolute;
  z-index: 10;
  width: 100%;
  max-height: 200px; /* Adjust height as needed */
  overflow-y: auto; /* Scrollable */
  background-color: #f9f9f9;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* Styling for each dropdown option */
.dropdown-toggle {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
}

.dropdown-toggle:hover {
  background-color: #e1e1e1;
}

/* Highlight selected options */
.dropdown-toggle.selected {
  background-color: #b0c4de; /* Light navy blue background for selected items */
}

.dropdown-toggle:last-child {
  border-bottom: none;
}

.button-main {
  background: var(--hofstra-blue);
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.button-main:hover {
  background-color: #0b4886;
  transition-duration: 250ms;
}

#copy-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Responsiveness */
@media screen and (max-width: 900px) {

  main {
    padding: 0 2rem 2rem 2rem;
  }

  .title {
    margin: 0;
  }

  .content-container {
    flex-direction: column;
  }

  .settings-container,
  .script-container {
    width: 100%;
    max-width: none;
    margin-right: 0;
  }

  .script-container {
    margin-bottom: 1rem;
    order: -1; /* Place script container on top */
    top: 0;
    border-radius: 0 0 6px 6px;
    max-height: 30vh;
    overflow-y: scroll;
  }
}

@media screen and (max-width: 828px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }

  .title {
    margin-top: 0.5rem;
  }

  .logo-container {
    margin-bottom: 1rem;
  }

  nav .nav-link {
    display: block;
    margin: 6px 0;
  }

  .form-group select {
    margin-top: 0.5rem; /* Add space above select on small screens */
  }

  #slurm-script {
    font-size: 12px;
  }

  .description {
    font-size: 12px;
  }

  .button-main {
    padding: 8px 12px;
  }
}

/* @media screen and (max-width: 480px) {
  .checkbox-group label,
  .checkbox-group input[type="checkbox"] {
    flex-basis: 100%;
  }
} */
