/*
   _______       ______  __  __
  /_  __/ |     / / __ \/ / / /
   / /  | | /| / / / / / /_/ / 
  / /   | |/ |/ / /_/ / __  /  
 /_/    |__/|__/_____/_/ /_/   

  Texas Water Data Hub Schema CSS
  twdh_schema.css
  
  # COLORS
  * Primary: #0D2856
  * Secondary: #0B7D8E
  * Text: #59555B
  * Subtle Text: #A39CA5
  * Accent One: #E0E0E0
  * Pretitle Text: #787177
  * Success: #009E89
  * Error: #E23014
  * Light: #F9F9FB
  * Dark: #0C142D

*/

/* Correct margin on resource-list */

.resource-list {

  margin: 0;

}

/* Hide 'Required fields indicator' on 'Review' page */

.page-6 .control-required-message {

  display: none;

}

/* DRUF Progress Bar */

.stages {
  padding: 1rem 0;
  margin: 0;
  list-style: none;
  color: #a39ca5;
  counter-reset: stage;
  overflow: hidden;
  font-size: 1.4rem;
}
/*
.stages:before,
.stages:after {
  display: table;
  content: " ";
}
.stages:after {
  clear: both;
}
.stages:before,
.stages:after {
  display: table;
  content: " ";
}
.stages:after {
  clear: both;
}
*/
.stages li {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  line-height: 27px;
  counter-increment: stage;
  width: 50%;
  background-color: #fff;
  float: left;
  padding: 10px 20px;
  padding: 0;
  position: relative;
  z-index: 0;
  text-align: center;
  display: block;
  background-image: url("../../base/images/druf-progress-1.png");
  background-repeat: repeat-x;

}

.stages li a {
  display: block;
  background-image: url("../../base/images/druf-progress-1.png");
  background-repeat: repeat-x;
}


.stages li:before {
  display: none;
}
.stages li .page-number {
  border-radius: 14px;
  display: inline-block;
  width: 27px;
  height: 27px;
  margin-top: 10px;
  margin-bottom: 84px;
  margin-right: auto;
  margin-left: auto;
  font-weight: bold;
  text-align: center;
  color: #aeaeae;
  background: #fff;
  border: 1px solid #aeaeae;
  z-index: 1;
}
.stages li.active .page-number,
.stages li.complete .page-number {
  background-color: #0b7d8e;
  border-color: #0b7d8e;
  color: #fff;
}

.stages li .page-number:before {
  content: counter(stage);
}
.stages li.complete .page-number:before {
  content: "✓";
}

.stages li:after {
  display: none;
}
.stages li.last {
  position: relative;
  right: 0;
}
.stages li.last,
.stages li.last .highlight {
  border-radius: 0 3px 0 0;
  background-color: transparent;
}

.stages li.active {
  background: transparent;
  background-image: url("../../base/images/druf-progress-2.png");
  background-repeat: no-repeat;
  background-size: 100% 25px;
}

.stages li .highlight {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  padding: 0;
  border: none;
  text-align: center;
  text-decoration: none;
  line-height: 18px;
  z-index: 2;
}

.stages li .highlight
{
  display: block;
  padding: 45px 0 0 0;
}

.stages li.active .highlight span {
  cursor: default;
}

.stages li .highlight span {
  cursor: not-allowed;
}

@media (max-width: 550px) {

  /* Rotate labels to fit; TODO: Functional but needs work to look better! */

  .stages li .page-number {
    margin-bottom: 11rem;
  }

  .stages li .highlight {
    transform: rotate(90deg);
    text-align: left;
    top: 5rem;
    left: 2rem;
    width: 10rem;
  }
}

.stages li.active .highlight {
  color: #59555B;
  background: transparent;
}
.stages li.complete .highlight {
  color: #eef6ed;
  background: transparent;
}

.stages .page-4 .highlight a,
.stages .page-4 .highlight span {
  margin-top: -2px;
  line-height: 1.43rem;
}

.stages li .page-number.missing-fields {
  border-color: #e23014;
}

/* This makes the keyboard focus outline indicator look nice */
.stages li .highlight a {

  display: inline-block;
  margin: 0 0.5rem;

}

.stages .druf-required {

  position: absolute;
  top: 3rem;
  right: 3rem;

}


label.form-check-label::after
{

  content: '';

}

/* Hover and focus states for stage indicators */
.stages a:focus-visible {

  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  outline: none;

}

.stages a:focus-visible span.page-number,
.stages a:hover span.page-number
{

  -moz-box-shadow: 0 0 0 0.4rem #0B7D8E;
  -webkit-box-shadow: 0 0 0 0.4rem #0B7D8E;
  box-shadow: 0 0 0 0.4rem #0B7D8E;

}

.stages a:focus-visible,
.stages a:hover 
{
  background-image: url("../../base/images/druf-progress-2.png");
  background-repeat: no-repeat;
  background-size: 100% 25px;
}

/* Stage Tooltips */

.tooltip.show
{

  opacity: 1;
  
}

.stage-tooltip .tooltip-inner
{
  max-width: 300px;
  background: #0D2856;
  color: #e0e0e0;
  font-size: 1.8rem;
  padding: 1rem;
  border-radius: 1rem;
  opacity: 1;

}

.stage-tooltip.bs-tooltip-top .tooltip-arrow::before
{
   border-top-color: #0D2856;
}
.stage-tooltip.bs-tooltip-bottom .tooltip-arrow::before
{
   border-bottom-color: #0D2856;
}
.stage-tooltip.bs-tooltip-end .tooltip-arrow::before
{
   border-right-color: #0D2856;
}
.stage-tooltip.bs-tooltip-start .tooltip-arrow::before
{
   border-left-color: #0D2856;
}


.dataset-review li li {

  margin-bottom: 1rem;
  
}

.format-thumbnail {

  position: absolute;
  top: 10px;
  left: 10px;

}

.format-thumbnail img {

    width: 60px;
    height: 65px;
    transform: scale(0.53);
    margin: -14px 0 0 -14px;
 
}


.missing-required {
  font-weight: bold;
  color: #e23014;
}

.ddict-scroll .form-group {

  margin-bottom: 0;

}

.editor textarea {

  border: 1px solid #0D2856;
  border-bottom: 1px solid;
  border-radius: 0.4rem;
  padding: 0.6rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.5;
  color: #59555B;
}

.selected-dataset.error
{

  background: #E23014;
  color: #F9F9FB;

}

.slug-preview
{

  margin-left: 0;

}

.slug-preview .info-block
{

  margin: 0.6rem 0;
  margin-bottom: 3rem;

}

#search-modal-content .dropdown-toggle::after
{

  right: 1rem;

}

#button-holder
{

  min-height: 30rem;

}



.table-radio_select
{

  /* border-radius: 0.4rem; */
  /* border: 1px solid #0D2856; */
  overflow: hidden;

}

.table-radio_select label
{

  font-weight: normal;
  display: block;
  padding: 0 1rem;

}

.table-radio_select thead,
.table-radio_select tbody
{

  vertical-align: middle;

}

.table-radio_select tr:hover
{

  background: #e0e0e0;
  border-radius: 0.4rem;
}

.table-radio_select tr th,
.table-radio_select tr td
{

  /*
  border-right: 1px solid #0D2856;
  border-bottom: 1px solid #0D2856;
  */

}

.table-radio_select tr:last-child td,
.table-radio_select tr:last-child th
{

  border-bottom: 0px solid #0D2856;

}

.table-radio_select tr th:last-child,
.table-radio_select tr td:last-child
{

  border-right: 0px solid #0D2856;

}

.table-radio_select thead th
{
  background-color: #0D2856;
  color: #ffffff;
  padding: .25rem 1rem;
  border-width: 0;

}

.table-radio_select > :not(caption) > * > *
{
  border-width: 0;
  /* border-top: 1px solid #0D2856; */
  background: transparent;

}

.table-radio_select .twdh-radio-wrapper
{

  display: block;

  position: relative;
  display: inline-block;
  margin: 0 1rem;
  
  height: 1.5rem;
  width: 2.4rem;
  text-align: center;

}

.table-radio_select .twdh-radio-wrapper span:focus-visible
{

  outline: 0.4rem solid #0B7D8E;
}

.linked-resources-container {
  width: 100%;
}

.linked-resources-row {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.dataset-selector, .org-selector {
  flex: 1;
  position: relative;
}

.sub-label {
  display: block;
  margin-bottom: 5px;
  font-weight: normal;
  font-size: 13px;
  color: #666;
}

.linked-datasets-wrapper {
  position: relative;
}

.linked-datasets-search {
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
  border-radius: 0.4rem;
  border-width: 1px;
}

.linked-datasets-search::placeholder {

  font-size: 1.4rem;

}

.linked-datasets-results {
  position: absolute;
  width: 100%;
  background: white;
  border: 0px solid #ccc;
  border-radius: 3px;
  margin-top: 2px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.organization-header {
  background: #f5f5f5;
  padding: 4px 8px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
}

.organization-items, .dataset-search-item{
  padding: 0;
  margin: 0;
}

.organization-item, .dataset-search-item {
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #f5f5f5;
}

.organization-item:hover, .dataset-search-item:hover {
  background-color: #f9f9f9;
}

.org-label, .dataset-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 4px 8px;
}

.org-label input[type="checkbox"], .dataset-label input[type="checkbox"] {
  margin: 0 8px 0 0;
  vertical-align: middle;
}

.org-title, .dataset-title {
  flex: 1;
  font-size: 13px;
  line-height: 1.3;
}

/* Selected items display */
.selected-datasets {
  margin: 1rem 0 3rem;
  display: block; /* Changed from flex to block for one item per row */
  width: 100%;
}

.selected-dataset {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.2;
  margin-bottom: 5px;
  width: 100%;
  box-sizing: border-box;
}

.selected-title {
  margin-right: 4px;
  flex: 1;
}

.remove-dataset {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: #999;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.remove-dataset:hover {
  color: #666;
}

#dataset-edit .controls {
    position: relative;
}

.remove-dataset:focus {
  outline: none;
  color: #666;
}

.no-results {
  padding: 8px;
  color: #666;
  font-style: italic;
  text-align: center;
}

.tag-select-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  width: 100%;
}

.select-wrapper {
  width: 100%;
  margin-bottom: 8px;
  position: relative;
}

.select-wrapper label {
  color: #59555b;
  display: block;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.select2-container {
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid #0d2856 !important;
  border-radius: 0.4rem !important;
  background: #ffffff !important;
}

.select2-container-multi.select2-container-active{

  outline: 4px solid #0b7d8e;

}

.select2-search-choice {
  display: none !important;
}

.select2-choices {
  border: 1px solid #0d2856 !important;
  border-radius: 0.4rem !important;
  padding: 0px 8px !important;
  min-height: 38px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.select2-input {
  width: 100% !important;
  border: none !important;
  padding: 8px 4px !important;
  font-size: 1.4rem !important;
  color: #59555b !important;
}

.select2-search input {

  /*
  background-size: 2rem !important;
  background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwYjdkOGUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHlsZT0ib3BhY2l0eToxOyI+PHBhdGggZmlsbD0ibm9uZSIgZD0ibTIxIDIxbC01LjE5Ny01LjE5N20wIDBBNy41IDcuNSAwIDEgMCA1LjE5NiA1LjE5NmE3LjUgNy41IDAgMCAwIDEwLjYwNyAxMC42MDciLz48L3N2Zz4K") no-repeat 98% 10px !important;
  */
  /* 
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#0b7d8e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="opacity:1;"><path fill="none" d="m21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"/></svg>
  */
  
  
}


body .select2-drop.select2-drop-active {
  min-width: 0 !important;
  max-width: none !important;
  border: 1px solid #0d2856 !important;
  border-radius: 0 0 0.4rem 0.4rem !important;
  margin-top: -1px !important;
  
}

.select2-container .select2-drop {
  box-sizing: border-box !important;
}

.select2-container,
.select2-drop,
.select2-search,
.select2-search input {
  box-sizing: border-box !important;
}

.select2-results {
  max-height: 300px !important;
  padding: 0 !important;
  margin: 4px !important;
  overflow-y: auto !important;
  color: #59555b !important;
}

.select2-result-label {
  /*
  padding: 8px 12px !important;
  color: #59555b !important;
  */
  font-size: 1.4rem !important;
}

.select2-highlighted {
  /*
  background-color: #0b7d8e !important;
  color: #fff !important;
  */
}

.select2-disabled {
  background-color: #f0f0f0 !important;
  color: #a39ca5 !important;
  text-decoration: line-through !important;
  opacity: 0.7 !important;
  cursor: not-allowed !important;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 32px;
  width: 100%;
}

.selected-tag {
  background-color: #0b7d8e;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
}

.selected-tag .remove {
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  opacity: 0.8;
}

.selected-tag .remove:hover {
  opacity: 1;
}

.select2-container-active .select2-choices {
  border-color: #0b7d8e !important;
  
  
}

.primary-tags .selected-tag {
  background-color: #1a5a7a; /* Primary tags color */
}

.secondary-tags .selected-tag {
  background-color: #2c8b85; /* Secondary tags color */
}

.select2-dropdown-open .select2-drop {
  top: 100% !important;
}

.select2-container-multi.select2-container-active {
  position: relative !important;
}

.select2-container-multi.select2-container-active .select2-drop {
  width: 100% !important;
  left: 0 !important;
}

.select2-drop-active {
  z-index: 9999 !important;
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .select2-drop-active {
    width: 100% !important;
  }
}
