/* Main CSS */

/* _______________Global & Base_______________ */

html {
  transition:
    color 0.3s,
    background-color 0.3s;
}

body {
  padding: 1rem 0;
}

h1 {
  --pico-font-weight: 400;
  --pico-typography-spacing-vertical: 0.5rem;
}

h2 {
  --pico-font-weight: 300;
  --pico-typography-spacing-vertical: 0.5rem;
}

h3 {
  --pico-font-weight: 200;
  --pico-typography-spacing-vertical: 0.5rem;
}

hr {
  border-top: 2px solid var(--pico-muted-border-color);
}

button {
  --pico-font-weight: 700;
}

nav {
  align-items: flex-end;
}

form,
.form-padding {
  padding: 30px 0 0 0;
}

form .checkbox-input {
  margin-bottom: var(--pico-spacing);
}

/* _______________Header_______________ */

header {
  margin: 0 auto;
}

.header-container {
  border-bottom: solid 1px grey;
  margin: 0 60px 0 60px;
}

.logo {
  width: 30vw;
  max-width: 200px;
}

.logo-link {
  text-decoration: none;
}

.app_name {
  margin: 10px 0 0 0;
  color: var(--pico-h2-color);
}

.app_version {
  margin-bottom: 0;
  font-size: 1vw;
}

.theme-toggle {
  padding-right: 15px;
}

/* _______________Layouts_______________ */

.standard-margin {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  padding: 0 60px;
}

.list-margin {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  padding: 0 60px;
}

.list-margin {
  margin: 0 60px 0 60px;
}

#content {
  margin: 0 auto;
  padding-top: 40px;
  padding-top: 40px;
}

.single-box {
  margin: 0 60px 0 60px;
  max-width: 500px;
}

.single-box h3 {
  font-size: 2vw;
  margin-bottom: 0;
}

.guide-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: baseline;
}

.apc-input-container {
  display: flex;
  flex-direction: column;
}

.apc-input-container > div {
  padding-bottom: 40px;
}

.centeredForm {
  max-width: 900px;
  margin: 0 auto;
}

.display-block {
  display: block;
}

/* _______________Navigation_______________ */

.nav-link-box {
  text-decoration: none;
  margin-left: auto;
}

.nav-link-box {
  text-decoration: none;
  margin-left: auto;
}

.nav-link {
  padding: 0 40px 0 0;
  padding: 0 40px 0 0;
  text-decoration: none;
  margin-left: auto;
}

.nav-container-right {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-bottom: 10px;
}

.logout_button {
  margin-bottom: 0;
}

.offers_link {
  margin: 0 30px;
}

.meta-small {
  margin-bottom: var(--pico-typography-spacing-vertical);
}

.nav-section {
  margin: 30px 0;
}

.nav-section input {
  margin: 0;
}

/* _______________Alerts & Messages_______________ */

#alertArea article {
  margin-bottom: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#alertArea.floating-alert {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: auto;
  max-width: 600px;
  max-height: 400px;
}

#alertArea.floating-alert .alert-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

#alertArea.floating-alert article {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

#alertArea article p {
  margin: 0;
  width: 90%;
}

#alertArea.floating-alert .alert-wrapper > button {
  position: absolute;
  top: 5px;
  right: 10px;
  color: var(--pico-h1-color);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 0;
  width: 10%;
}

.text-warning {
  color: #856404 !important;
}

.text-danger {
  color: red;
}

.success {
  color: green;
}

.text-center {
  text-align: center;
}

.filenameWarning,
.filenameWarning > article > p {
  color: var(--pico-h1-color);
}

/* _______________Forms & Inputs_______________ */

#tree-controls {
  margin-bottom: 1em;
}

.file-input-group {
  display: flex;
  flex-wrap: wrap;
}

.file-input-group > .form-container {
  width: 50%;
}

.form-container {
  margin-bottom: 5px;
}

.form-container,
.discount-applied {
  margin: 20px 0 20px 0;
}

.checkbox-group {
  width: 100%;
}

.select-allotment > p,
#ora_upload_form > div.full-width-button-control > p {
  margin-bottom: 0;
}

#company-selection {
  display: flex;
}

#company-selection > * {
  margin-right: 20px;
}

.company-selection-radio {
  margin-left: 5px;
}

.pdf-checkbox-container {
  margin: 60px 0 30px 0;
}

.fi-statement-upload-container > div {
  padding-bottom: 50px;
}

.resendEmailContainer {
  margin-top: 10px;
}

.textButton {
  display: block;
  margin: 10px auto;
  border: none;
  background: none;
}

/* _______________Offer Edit Forms_______________ */

.offer_edit_forms_container {
  margin-top: 50px;
}

fieldset legend {
  font-size: 25px;
  margin-bottom: 30px;
  padding: 0 10px;
}

#offer-meta-form,
#company-securities-form,
#pricing-form,
#sjp-form {
  display: none;
  flex-wrap: wrap;
  flex-direction: column;
}

#offer-meta-form.open,
#company-securities-form.open,
#pricing-form.open,
#sjp-form.open {
  display: flex;
}

#offer-meta-form fieldset,
#company-securities-form fieldset,
#pricing-form fieldset,
#sjp-form fieldset {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  border: 1px solid;
  border-radius: 0.5rem;
  padding: 25px;
}

#offer-meta-form fieldset p,
#company-securities-form fieldset p,
#pricing-form fieldset p,
#sjp-form fieldset p,
.rate-row {
  padding-right: 20px;
}

/* _______________Reallocation Read Only Display_______________ */
dl.config-list {
  /* the element was dl.config-list */
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 24px;
  align-items: baseline;
  margin: 0px;
}

.edit-form > .display-block {
  display: var(--display-block);
}

/* _______________Generic Edit Form Styles_______________ */
.edit-form {
  flex-wrap: wrap;
  flex-direction: column;
}

.edit-form.open,
.edit-form-container > .edit-form {
  display: flex;
}

.edit-form fieldset {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  border: 1px solid;
  border-radius: 0.5rem;
  padding: 25px;
}

.edit-form fieldset p {
  padding-right: 20px;
}

.edit-form-container {
  margin-top: 50px;
}

.edit-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

/* _______________Buttons & Controls_______________ */

.button_container {
  display: flex;
  flex-direction: column;
}

.full-width-button-control {
  margin-right: 30px;
}

.delete_files {
  padding-top: 0;
}

.delete_files {
  padding-top: 0;
}

#process-btn {
  border-top-left-radius: var(--pico-border-radius);
  border-top-right-radius: var(--pico-border-radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

#download-all-btn,
#download-selected-btn {
  border-radius: 0;
}

.delete_files input#submit {
  border-bottom-left-radius: var(--pico-border-radius);
  border-bottom-right-radius: var(--pico-border-radius);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.delete_files #submit {
  --pico-font-weight: 700;
}

.btn-danger:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#cancel-task-btn {
  margin-left: 10px;
}

.btn-cancelling {
  animation: pulse 1.5s infinite;
}

.sub-btn {
  background-color: transparent;
  border: 1px solid var(--pico-primary);
  color: var(--pico-primary);
  padding: 0.3rem 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition:
    background-color var(--pico-transition),
    color var(--pico-transition);
}

.sub-btn:hover {
  background-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* _______________Progress & Task Status_______________ */

.progress-bar {
  white-space: nowrap;
  overflow: hidden;
}

#task-progress {
  margin-bottom: 20px;
}

#task-progress-bar {
  background-color: var(--pico-primary-background);
  text-align: right;
  transition: width 0.5s ease-out;
  border-radius: 15px;
  padding-right: 10px;
}

#task-result {
  margin-top: 10px;
}

.saved-banner {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  border-radius: 4px;
  font-weight: bold;
  animation: fadeOutBanner 1s ease-in-out 2s forwards;
}

@keyframes fadeOutBanner {
  to {
    opacity: 0;
  }
}

/* _______________Accordions & Collapsible_______________ */

.accordion {
  cursor: pointer;
  padding: 0;
  border: none;
  font-size: 15px;
  transition: 0s;
  background-color: #ffffff00;
  color: var(--pico-contrast);
  padding-top: 15px;
  margin: 0 auto;
  margin: 0 auto;
}

.accordion-toggle {
  cursor: pointer;
}

.accordion::after {
  content: "\25B6";
  float: right;
  margin-left: 10px;
}

.accordion-toggle::after {
  content: "\25B6";
  float: right;
  margin-left: 10px;
}

.accordion.active::after {
  content: "\25BC";
}

.accordion-toggle.active::after {
  content: "\25BC";
}

.panel {
  padding-top: 30px;
  display: none;
  overflow: hidden;
  flex-direction: column;
}

.panel.open {
  display: flex;
}

.form.open {
  display: block;
}

.collapsible {
  cursor: pointer;
  user-select: none;
}

.collapsible::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 6px;
}

.collapsible.active::before {
  content: "\25BC";
}

#file-tree ul {
  list-style-type: none;
  padding-left: 20px;
}

#file-tree li {
  margin: 5px 0;
}

/* _______________Stage One & Hub Uploads_______________ */

#stage_one_files_form > div > #submit {
  margin-bottom: 0;
}

#process_stage_one_files {
  padding-top: 0;
}

#csvDownloadSection,
#csvDownloadSection > article > header,
#csvDownloadSection > article > p {
  color: var(--pico-h1-color);
}

#csvDownloadSection > article > small {
  display: block;
}

/* _______________Utilities_______________ */

.block {
  display: block;
}

.center {
  margin: 0 auto;
}

.no-margin-bottom {
  margin-bottom: 0;
}

.small-margin-bottom {
  margin-bottom: 0.5rem;
}

.display-none {
  display: None;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: auto;
  margin: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.error {
  padding: 0 20px 20px 20px;
  margin-top: -10px;
  color: #be4141;
}

/* _______________Pico Overrides_______________ */

:root {
  --pico-border-radius: 0.2rem;
  --pico-typography-spacing-vertical: 1.5rem;
  --pico-form-element-spacing-vertical: 1rem;
  --pico-form-element-spacing-horizontal: 1.25rem;
  --pico-spacing: 1.2rem;
}

/* _______________Dark Mode_______________ */

@media only screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    .logo {
      filter: brightness(0) invert(1);
    }
  }
}

[data-theme="dark"] {
  .logo {
    filter: brightness(0) invert(1);
  }
}
