:root{
  --page-background-color: #f0f0f0;
  --form-background-color: #ffffffe6;
  --page-text-color: #000000; /*#001e5c*/
}

body {
  color: var(--page-text-color); 
  background-color: var(--page-background-color);
  text-align: left;
}

/* Header Styles */
#h1_group{
  display: flex;
  justify-content: start;
  font-size: 3rem;
  height: 3rem;
  margin: 0.5rem;
}

#cb_logo{
  height: 100%;
  margin-top: 0.2rem;
}

h1 {
  font-family: "Oswald", sans-serif;
  font-weight: 400;
  font-size: 2.5rem;
  margin: 0;
  margin-left: 0.5rem;
  height: 100%;
}

h2 {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
}

/* Form Styles */
#cb-form {
  background-color: var(--form-background-color);
  border: 0.1rem solid gray;
  box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
}

/* Fieldset Styles */
fieldset{
  border-bottom: 0.1rem solid grey;
  padding: 1rem;
  margin: 0;
}

.fieldset-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 1rem 0rem;
}

/* Form Label Styles */
label{
  font-weight: 500;
  margin-top: 10px;
}
.labelWithTooltip {
  display: flex; /* Keeps the info icon to the right*/
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Tooptip Styles*/
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Input, Select,  Styles */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="url"],
select, 
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
}

input:placeholder-shown {
  font-style: normal;
}

/* Submission Button Style */
#cb_submission{
  margin-top: 1rem;
  text-align: center;
  margin-left: 45%; 
}

/* index.html Page CSS */
#instruction {
  margin-left: 0.5rem;
  font-size: 1rem;
}

#index-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

/* upload.html Page CSS */
#upload-container{
  margin: 1rem;
  padding: 1rem;
}

#uppy{
  margin-top: 1rem;
}

.step-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
  transition: transform 0.2s ease-in-out;
}

.step-card:hover .step-icon {
  transform: scale(1.1);
}
.card-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
}

/* Collection callout box */
.collection-callout {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-left: 4px solid #666;
  border-radius: 6px;
  padding: 0.25rem 1rem 0.6rem;
  margin: 0.75rem 0 1rem;
}

.collection-callout label {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.collection-callout input[type="checkbox"] {
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.collection-callout small {
  display: block;
  margin: 0.4rem 0 0 1.65rem;
  color: #444;
  font-size: 0.875rem;
}

/* Nested datasets area */
#collectionFields {
  margin-left: 0.5rem;
  padding-left: 1.25rem;
  border-left: 3px solid #999;
}

#datasetContainer {
  margin-top: 0.75rem;
}

.datasetRow {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.datasetRow label[for$="Title"] {
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: #333;
}

.button-container {
  margin: 0.75rem 0 0.5rem;
}

/* Tagify overrides to match page style */
.tagify {
  --tags-border-color: #000;
  --tags-hover-border-color: #000;
  --tags-focus-border-color: #000;
  --tag-bg: #e9ecef;
  --tag-hover: #dee2e6;
  --tag-text-color: #333;
  --tag-text-color--edit: #333;
  --tag-remove-bg: #dc3545;
  --tag-remove-btn-color: #fff;
  --tag-remove-btn-bg: transparent;
  --tag-remove-btn-bg--hover: #dc3545;
  --placeholder-color: #999;
  --tag-inset-shadow-size: 0;
  border: 1px solid #000;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 1rem;
  min-height: 32px;
  margin-bottom: 8px;
}

.tagify__input {
  margin: 0;
  padding: 0;
}

.tagify__tag {
  border-radius: 4px;
  margin: 2px 4px 2px 0;
  background: #e9ecef;
}

.tagify__tag:hover {
  background: #dee2e6;
}

.tagify__tag > div {
  color: #333;
}

.tagify__dropdown {
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  background: #fff;
}

.tagify__dropdown__wrapper {
  border: none;
  border-radius: 4px;
}

.tagify__dropdown__item {
  padding: 8px 12px;
  font-size: 0.95rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.tagify__dropdown__item--active {
  background-color: #e9ecef;
  color: #000;
}
