/*--- Global CSS Styles for CAVE ---*/

html,
body {
  font-family: Arial, Helvetica, sans-serif;
}

.page-copy {
  overflow-x: auto;
}

/** ==================== Header Styles ==================== */
/* .header-wrapper{
  display: flex;
  align-items: stretch
} */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #003399;
  /* header color */
  color: white;
  position: relative;
  box-sizing: border-box;
  margin-bottom: 3px;
  /* gap between header and below element */

}

/* The thick blue line below header */
.header-line {
  background-color: #003399;
  height: 6px;
}

.menu {
  background: red;
  padding: 10px;
  color: white;
  font-weight: bold;
  /* width: 10%; */
  height: 100%;
  align-content: center;
  transition: transform 0.3s ease;
  transform: translateX(0);
}

.back-button {
  background: transparent;
  /* width: 37px;
  height: 37px; */
  border-radius: 50%;
  position: absolute;
  left: 9.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: left 0.3s ease;
}

/* .back-button .toggle-icon {
  width: 40px;
  height: 36px;
} */

.user {
  font-weight: bold;
  transition: margin-left 0.3s ease;
  /* margin-left: calc(2.2% + 20px); */
  /* font-size: 14px; */
}

.title {
  flex: 2;
  text-align: center;
  font-weight: bold;
  /* font-size: 14px; */
}

.time {
  font-weight: bold;
  /* font-size: 14px; */
}

.logouticon {
  /* width: 40px; */
  height: auto;
}

/* ==================== Layout & Side Menu Styles ==================== */
.layout-container {
  display: flex;
  height: auto
    /*calc(100vh - 60px);
  /* adjust if needed based on header height */
}

.subcontentcontainer {
  border: 3px solid #003399;
  /* Retains the border */
  padding: 20px;
  /* Space inside the border */
  width: auto;
  /* Allow width to auto-adjust to the content */
  display: inline-block;
  /* Ensure the container wraps tightly around the content */
}

.tree-container {
  /* width: 25%; */
  /*450px;*/
  background: white;
  padding: 15px;
  overflow-y: auto;
  border-right: 7.5px solid #003399;
  height: auto;
  min-height: 100vh;
  position: relative;
  transition: width 0.3s ease, padding 0.3s ease;
  flex-shrink: 0
}

/* Collapsed state: only the right border is visible */
.tree-container.collapsed {
  /* width: 7.5px; */
  /* only enough width to show the border */
  padding: 0;
  /* remove inner spacing */
  background: transparent;
  /* hide the background */
  overflow: hidden
}

.tree {
  font-family: Arial, sans-serif;
  /* font-size: 14px; */
  color: #000;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree li {
  position: relative;
  margin: 5px 0;
  padding-left: 20px;
  list-style: none;
}

.tree li span {
  color: #003399;
  cursor: pointer;
}

.tree li span:hover {
  color: red;
}

.toggle {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border: 1px solid #000;
  text-align: center;
  margin-left: -20px;
  margin-right: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  background-color: #fff;
  user-select: none;
}


.tree li:not(.parent) .toggle {
  visibility: hidden;
}

.tree li ul {
  display: none;
  margin-left: 15px;
  padding-left: 0;
  list-style: none;
}

.tree li.expanded>a {
  font-weight: 700
}

.tree li.expanded>ul {
  display: block;
}

.tree li.expanded>ul>li {
  padding-left: 0px
}

.tree li.expanded>.toggle::before {
  content: "-";
}

.tree li:not(.expanded)>.toggle::before {
  content: "+";
}

.tree a {
  color: #003399;
  text-decoration: none;
  font-weight: normal;
  font-size: inherit;
  font-family: inherit;
}

.tree a:hover {
  color: red;
  text-decoration: underline;
}


/* -- Breadcrumb --*/
.breadcrumb {
  margin: 10px 0;
  padding: 8px 10px;
  white-space: nowrap;
  width: fit-content;
}

.breadcrumb span,
.lastcrumb {
  color: black;
  text-decoration: none;
  margin-right: 5px;
  /* font-size: 14px; */
  font-weight: 700
}

.breadcrumb .separator,
.crumb-separator {
  margin-right: 5px;
  color: black;
  font-weight: 700;
  padding: 0
}


/* -- Work Area -- */

.workarea-wrapper {
  margin: 15px 8px;
  overflow-x: auto
}

.workarea {
  background-color: #fff;
  padding-bottom: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 3px solid #003399;
  border-top-left-radius: 2px;
  min-width: fit-content
}

.workarea a,
.workarea a:active {
  color: #003399
}

.workarea a:hover {
  color: #0000D9
}

/* -- Tabs -- */

.tabs {
  display: flex;
  /* border-bottom: 1px solid rgb(204, 204, 204);
  margin-bottom: 10px; */
  padding-left: 20px;
  height: 35px;
  gap: 20px;
  position: relative;
  /* border-bottom: 1px solid #ccc; */
}

.tablinks,
.tabs>button {
  padding: 8px 5px;
  cursor: pointer;
  font-weight: bold;
  background: white;
  color: #003399;
  /* Inactive tab color */
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border: 3px solid;
  border-bottom: none;
  min-width: 100px;
  /* margin-right:2.5rem; */
  position: relative;
}

.tabs>button.active>hr {
  margin: .55rem 0;
  color: inherit;
  border: 0;
  border-top: 2px solid lightgray;
  opacity: 1;
  color: lightgray;
  position: relative;
  z-index: 10
}

.tablinks.active::after,
.tabs button.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: white;
  /* same as background of container/tab content */
}

.tablinks.active,
.tabs button.active {
  color: black;
  border-color: #003399
}

.tablinks:not(.active),
.tabs>button:not(.active) {
  /* border-color: black; */
  background-color: #dbdbdb;
  color: #003399;
  border: 3px solid #000000;
  border-bottom: none;
}

.tabs>button:not(.active)>hr {
  display: none
}

.tabs button:disabled {
  background-color: #dbdbdb;
  cursor: not-allowed;
}

/*-- Tab content visibility  --*/

/* .content-active{ /* Add class to show tabcontent 
  display: block
} */
.tabcontent.active {
  display: block
}

div.tabcontent:not(.active) {
  /* Remove to hide tabcontent */
  display: none
}

/* Form buttons Container CSS */

.form-actions-wrapper {
  padding: 18px 20px;
  border-bottom: 3px solid #003399;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap
}

.form-actions button,
.boton {
  min-width: 70px
}

.form-actions button:disabled {
  border: 2px solid #c1c1c1;
  cursor: not-allowed
}

.form-actions button:hover {
  border-color: #ccc;
  background-color: #bbb;
}

.form-actions button:active {
  border-color: #bbb;
  background-color: #003399;
  color: white
}

.search-wrapper,
.results-wrapper,
.view-wrapper {
  padding: 20px
}


/*--- INPUT FIELDS ---*/
/* -- Search/Lookup fields wrapper -- */

.search-wrapper,
.form-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-row label {
  min-width: 150px;
  max-width: 150px;
  font-weight: bold;
  color: #333;
}

.optionsdd {
  max-width: 150px
}

.operatordd {
  max-width: fit-content /*65px*/
}

.form-control,
.form-select,
.form-check-input {
  border-color: #949494
}

input[type="checkbox"] {
  border-color: #949494;
  padding: 8px;
}

.form-check-input:checked[type=checkbox], input:checked[type=checkbox]{
  background-color: #003399;
  border-color: #003399;
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: .8 !important;
  background-color: #f9f9f9 !important;
  border-color: #ced4da
}

.form-control.borderless {
  border: none;
  /* Removes the border */
  box-shadow: none;
  /* Removes focus outline (shadow) */
}

.hidden {
  display: none;
}

/* User Lookup field */
.user-input-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px
}

.user-input-container button,
.btn {
  border: 1px solid #949494;
  padding: 4px 8px;

}

.user-input-container button:hover,
.btn:hover {
  background-color: #dfdfdf;
  border-color: #c1c1c1;
  opacity: .8;
  cursor: pointer;
}

.form-lookup-group {
  /* Wrapper class for lookup fields */
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 10px;
}

/* -- PAGINATION -- */

.cs-pagination {
  color: white;
}

.cs-pagination span {
  margin: 0 10px
}

.cs-pagination button {
  background-color: transparent;
  border: 0;
  color: white;
  font-size: 18px;
  margin: 0 3px;
  font-weight: 700
}

.cs-pagination button:disabled {
  color: gray;
  background-color: transparent
}

.cs-pagination button:hover {
  color: lightblue
}

.cs-pagination button:active {
  color: red
}

/*-- TABLE --*/

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  padding: 5px 0
}

.cs-table th,
.cs-table td {
  padding: 0 .5rem;
  white-space: pre;
}

.cs-table {
  border-color: transparent;
  margin-bottom: 0;
  white-space: nowrap;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse
}

/* -- MISC CSS styles -- */

.separator-wrapper {
  padding: 0 20px
}

.redhr {
  /* Use on an hr element */
  color: red;
  border-top: 5px solid;
  margin: 0;
  opacity: 1
}


.nodata-message {
  width: 100%;
  display: block;
  text-align: center;
  font-weight: 600;
}

/* -- Results section -- */

.results-wrapper h2 {
  margin: 0
}

.result-title {
  background-color: transparent;
  color: white;
  font-weight: 700;
  line-height: 1.2;
}

.resultheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #003399;
  height: auto;
  line-height: 1
}



/* -- RESPONSIVE CSS -- */

@media (max-width: 424px) {


  .tree-container {
    width: 50%
  }

  .menu {
    width: 15%
  }

  .back-button {
    transform: translateX(10px);
  }

  .toggle-icon {
    width: 20px;
    height: 20px
  }

  .user {
    margin-left: calc(2.2% + 8px);
    width: 50px;
  }

  .time {
    width: 55px
  }

}

@media (min-width: 425px) and (max-width: 767px) {

  .header {
    font-size: 12px
  }

  .back-button {
    transform: translateX(18px);
  }

  .logouticon {
    width: 20px;
  }

  .toggle-icon {
    width: 20px;
    height: 20px
  }

  .user {
    width: 55px;
    margin-left: 10px;
  }

  .tree-container {
    width: 40%
  }

}

@media (max-width: 767px) {

  body,
  .form-control,
  .form-select,
  a {
    font-size: 11px !important
  }

  /* .search-wrapper{
    max-width: 55%
  } */

  .resultheader {
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 10px;
    overflow-x: auto;
  }

  .result-title {
    font-size: 13px;
  }

  .cs-pagination {
    flex-grow: 1;
    text-align: right;
  }

  .tree-container.collapsed {
    width: 0
  }


}


@media (min-width: 768px) {

  body,
  .form-control,
  .form-select,
  a {
    font-size: 13px !important;
  }

  .menu {
    width: 10%
  }

  .user {
    margin-left: calc(2.2% + 15px);
  }


  .back-button .toggle-icon {
    width: 37px;
    height: 37px;
  }

  .logouticon {
    width: 37px;

  }

  .resultheader {
    padding: 10px;
  }

  .result-title {
    font-size: 15px;
  }

  .tree-container.collapsed {
    width: 7px
  }

}

@media (min-width: 768px) and (max-width: 1200px){

  .tree-container {
    width: 25%;
  }

}

@media (min-width: 1201px) and (max-width: 1650px){

  .tree-container {
    width: 20%;
  }

}

@media (min-width: 1651px){

  .tree-container {
    width: 15%;
  }

}

@media (min-width: 992px) {}

@media (min-width: 1200px) {}

@media (min-width: 1400px) {}