﻿/* Variables? Example only: NOT used */
:root {
  --disabled-color: color: rgba(0, 0, 0, .15);
}

.example {
  color: var(--disabled-color);
}


/*************************************************************/
/*                                                           */
/*                           GRID                            */
/*                                                           */
/*************************************************************/
[minible].minified {
  display: none;
}

[maxible].maxified {
  display: block;
  /*height: 96%;*/
  height: 100%;
}

  [maxible].maxified [alsomax] {
    height: 100%;
  }


/*************************************************************/
/*                                                           */
/*                         HEIGHTS                           */
/*                                                           */
/*************************************************************/
@media (max-height: 299px) {
  [resizable-modal] .modal-content {
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  [maxible].maxified {
    display: block;
    height: 96%;
  }
}

@media (min-height: 300px) {
  [resizable-modal] .modal-body {
    overflow-y: auto;
    /*padding: 0px 15px 15px;*/
    padding: 10px 15px 15px;
  }

  [maxible].maxified {
    display: block;
    height: 93%;
  }
}

@media (min-height: 650px) {
  [maxible].maxified {
    display: block;
    height: 95%;
  }
}

@media (min-height: 950px) {
  [maxible].maxified {
    display: block;
    height: 96%;
  }
}



/*************************************************************/
/*                                                           */
/*                          WIDTHS                           */
/*                                                           */
/*************************************************************/
@media (max-width: 599px) {
  [resizable-modal] .modal-dialog {
    margin: 0;
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    min-height: 100vh;
  }

  [resizable-modal] .modal-content {
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  [resizable-modal] .modal-body {
    overflow-y: auto;
  }

  @media (max-height: 299px) {
    [resizable-modal] .modal-body {
      padding: 0px 15px 15px;
    }
  }
}

@media (min-width: 650px) {
  [resizable-modal] .modal-dialog {
    margin: 0;
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    min-height: 100vh;
  }

  [resizable-modal] .modal-content {
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  [resizable-modal] .modal-body {
    overflow-y: auto;
  }

  @media (max-height: 299px) {
    [resizable-modal] .modal-body {
      padding: 0px 15px 15px;
    }
  }
}


@media (min-width: 950px) {
  [resizable-modal] .modal-dialog {
    width: auto;
    min-width: auto;
    max-width: 850px;
    height: auto;
    min-height: auto;
    margin: 1.5rem auto;
  }

  [resizable-modal] .modal-content {
    padding-left: 10px;
    padding-right: 10px;
    border-radius: .3rem;
  }

  [resizable-modal] .modal-header {
    padding: 12px 15px;
  }

  [resizable-modal] .modal-body {
    overflow-y: inherit;
    padding: 10px 15px 15px;
  }
}



/*************************************************************/
/*                                                           */
/*                 RESIZABLE MODAL RESTORE                   */
/*                                                           */
/*************************************************************/
[resizable-modal] .modal-dialog.max-dialog {
  margin: 0;
  width: 100vw;
  min-width: 100vw;
  height: 100vh;
}

[resizable-modal] .modal-content.max-content {
  height: 100%;
  margin: 0;
  border-radius: 0;
}





/*************************************************************/
/*                                                           */
/*                   RESIZABLE MODAL TABS                    */
/*                                                           */
/*************************************************************/
[resizable-modal] .nav-tabs {
  margin-top: 15px;
  margin-bottom: 3px;
  background-color: white;
  border-bottom: 1px solid rgba(1, 1, 1, .10) !important;
}

  [resizable-modal] .nav-tabs .nav-link {
    padding: 3px 15px;
  }

  [resizable-modal] .nav-tabs > li {
    border-top: 1px solid rgba(1, 1, 1, .25);
    border-left: 1px solid rgba(1, 1, 1, .25);
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
  }

    [resizable-modal] .nav-tabs > li:last-child {
      border-right: 1px solid rgba(1, 1, 1, .25);
      border-top-left-radius: .25rem;
      border-top-right-radius: .25rem;
    }

  [resizable-modal] .nav-tabs a.nav-link.active {
    background-color: gray !important;
    border: 1px solid gray;
    font-weight: bold;
  }

[resizable-modal] .tab-content.panel {
  padding: 0;
}



/*************************************************************/
/*                                                           */
/*                RESIZABLE MODAL INFO BOXES                 */
/*                                                           */
/*************************************************************/
[resizable-modal] .note {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(1, 1, 1, .1);
  background-color: rgba(1, 1, 1, .03);
}



/*************************************************************/
/*                                                           */
/*             RESIZABLE MODAL FIELD HIGHLIGHTS              */
/*                                                           */
/*************************************************************/
[resizable-modal] input:focus {
  background-color: lightyellow;
  border: 1px solid #ced4da;
}

[resizable-modal] select:focus, [resizable-modal] select:focus-visible {
  background-color: lightyellow;
  border: 1px solid #ced4da;
  outline-offset: 0px;
  outline-width: 1px;
  outline-color: rgba(1, 1, 1, .15);
}

[resizable-modal] textarea {
  border: 1px solid #ced4da;
}

  [resizable-modal] textarea:focus-visible {
    background-color: lightyellow;
    outline-offset: 0px;
    outline-width: 1px;
    outline-color: rgba(1, 1, 1, .15);
    border: 1px solid #ced4da;
  }



/*************************************************************/
/*                                                           */
/*                    MODAL GROUP SETTINGS                   */
/*                                                           */
/*************************************************************/
/* OVERRIDES */
.modal-body select {
  padding: .375rem .75rem .375rem .5rem !important;
}

[rz-flex] label {
  margin-top: .1rem;
}

/* all select boxes (dropdowns) within a section */
[rz-flex] select {
  min-height: 38px;
}

/*===========================================================*/
/*                      rz-flex GROUPING                      */
/*===========================================================*/
/* default section container for resizable modal dialogs */
[rz-flex] {
  display: flex;
  flex-direction: row;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin-bottom: 10px;
}

  /* display a visual grouping (rounded rectangle) for the container */
  [rz-flex][border] {
    padding: 10px 10px;
    border: 1px solid rgba(0, 0, 0, .1) !important;
    border-radius: 7px;
  }

  [rz-flex].rz-border {
    padding: 10px 10px;
    border: 1px solid rgba(0, 0, 0, .1) !important;
    border-radius: 7px;
  }

  [rz-flex][padded] {
    padding: 10px 10px;
    border: 1px solid rgba(0, 0, 0, 0) !important;
    border-radius: 7px;
  }

  [rz-flex].rz-padded {
    padding: 10px 10px;
    border: 1px solid rgba(0, 0, 0, 0) !important;
    border-radius: 7px;
  }

  /* prevent the last rz-flex container from displaying a bottom margin */
  [rz-flex]:last-child {
    margin-bottom: 0;
  }

  /* when maximized, prevent the rz-flex container from displaying a top margin */
  [rz-flex].maxified {
    margin-top: 0;
  }

  /* all label elements in an rz-flex: no top margin, same color */
  [rz-flex] [rz] label {
    margin-top: 0;
    margin-bottom: .35rem;
    display: block;
    color: #777;
  }

  /* fix for the FIRST empty label in dynamic json dialogs */
  /* use rz-title attribute for rz-flex level (group container) labels */
  [rz-flex] > label:first-child {
    display: none !important;
  }


[rz-group] {
  display: flex;
  flex-flow: row wrap;
  align-content: flex-start;
  gap: 10px 15px;
  margin-bottom: 10px;
}

  [rz-group][stacked] {
    display: flex;
    flex-flow: column wrap;
    align-content: flex-start;
    gap: 10px 15px;
    margin-bottom: 10px;
  }

/* default display for all spans within an rz */
[rz-flex] span[rz] {
  display: block;
}

[rz-flex]:has([rz-group][rz-no-gap]), [rz-flex]:has([rz-group].rz-no-gap) {
  gap: 0 0;
}

/* reserved for rz-specific border overrides */
[rz-flex] [border] {
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, .1) !important;
  border-radius: 7px;
}

[rz-flex] .rz-border {
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, .1) !important;
  border-radius: 7px;
}

  [rz-flex] span[rz] span.multiline {
  }

  [rz-flex] span[rz] ul {
    list-style-type: none;
    margin-left: 0;
    font-size: 12px !important;
    min-height: 38px;
    background-color: rgba(0, 0, 0, .03);
    border: 1px solid rgba(0, 0, 0, .05);
    font-size: 12px !important;
    font-weight: 400;
    background-clip: padding-box !important;
    border-radius: 0.25rem !important;
    transition: none !important;
    line-height: 1.6 !important;
    padding: 8px 12px 9px !important;
  }

    [rz-flex] span[rz] ul li {
    }

/* reserved for rz-specific border overrides */
[rz-flex] [border] {
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, .1) !important;
  border-radius: 7px;
}

[rz-flex] [padded] {
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0) !important;
  border-radius: 7px;
}

[rz-flex] .rz-padded {
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0) !important;
  border-radius: 7px;
}

[rz-flex] span[rz-radio] {
  display: flex;
  flex-direction: row;
  gap: 10px 5px;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
}

  [rz-flex] span[rz-radio]:last-child {
    margin-right: 0;
    margin-bottom: 0;
  }

  [rz-flex] span[rz-radio] > input[type="radio"] {
    margin-top: 0px;
    height: 100%;
    vertical-align: middle;
  }

  [rz-flex] span[rz-radio] > input[type="checkbox"] {
    margin-top: 0px;
    height: 100%;
    vertical-align: middle;
  }

[rz-flex] [rz-group][stacked] span[rz-radio] > input[type="radio"] {
  margin-top: 1px;
  height: 100%;
  vertical-align: middle;
}

[rz-flex] [rz-group][stacked] span[rz-radio] > input[type="checkbox"] {
  margin-top: 1px;
  height: 100%;
  vertical-align: middle;
}

[rz-flex] span[rz-radio] > label {
  /*margin-top: -1px;*/
  margin-bottom: 0px;
  height: 100%;
  vertical-align: middle;
  font-size: 12px !important;
  font-weight: 400;
}

/* layout for the label + button for json editor mazimizing */
[rz-flex] span[rz] label.with-toggle {
  display: inline-block;
}

[rz-flex] span[rz] > span:not(empty):is(.toggle-button) {
  display: inline-block;
}

/* remove the margin for the first sub-title in the dialog */
[rz-flex]:first-child [rz-title] {
  margin-top: 0px;
}

[rz-title] .subtitle {
  font-weight: lighter;
  font-size: .95em;
}



/* title for a section: MUST be direct child of rz-flex */
[rz-flex] > div[rz-title] {
  width: 100%;
  color: #777;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
  color: rgba(0, 133, 202, .80);
}

[non-rz-title], [no-rz-title] {
  color: #777;
  font-size: 16px;
  font-weight: bold;
  margin-top: 15px;
  padding-bottom: 3px;
  color: rgba(0, 133, 202, .80);
}

  [non-rz-title]:first-child, [no-rz-title]:first-child {
    margin-top: 0px;
  }


/* remove right margin on hidden items */
[rz-flex] > span[rz]:has(div.d-none) {
  margin: 0;
  margin: 0;
}



/* default for the json editor: override based on maxified and @media */
/* except for dynamic json editors >:( */
/*
  [rz-flex] div.jsoneditor-outer {
    height: 98%;
  }
*/




/*************************************************************/
/*                                                           */
/*               MINIBLE/MAXIBLE CONTROL CSS                 */
/*                                                           */
/*************************************************************/
[alsomax].maxified {
  display: block;
  height: 100%;
}

[rz-flex][alsomax] {
  display: flex;
}

  [rz-flex][alsomax].maxified {
    display: block;
    height: 100%;
  }

    [rz-flex][alsomax].maxified > span[rz] {
      display: none;
    }

      [rz-flex][alsomax].maxified > span[rz] [alsomax] {
        display: block;
        height: 100%;
      }

      [rz-flex][alsomax].maxified > span[rz].rzshow {
        display: block;
        height: 100%;
      }



[resizable-modal] .modal-body.max-body > div {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  height: 100%;
}

  [resizable-modal] .modal-body.max-body > div form {
    height: 100%;
  }



/*************************************************************/
/*                                                           */
/*        HEIGHTS - OVERRIDES FOR DYNAMIC JSON DIALOGS       */
/*                                                           */
/*************************************************************/
@media (max-width: 599px) {
  [dynamic][resizable-modal] .djson-footer {
    padding-bottom: 10px;
  }

  [resizable-modal] .modal-body > div {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    /*justify-content: space-between;*/
    height: 100%;
  }

  @media (max-height: 299px) {
    [resizable-modal] .modal-body {
      overflow-y: auto;
      padding: 0px 15px 15px;
    }
  }
}

@media (min-width: 600px) {
  [dynamic][resizable-modal] .djson-footer {
    padding-bottom: 0;
  }

  [resizable-modal] .modal-body > div {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    /*justify-content: space-between;*/
    height: 100%;
  }

  @media (max-height: 299px) {
    [resizable-modal] .modal-body {
      overflow-y: auto;
      padding: 0px 15px 15px;
    }
  }
}

@media (min-width: 900px) {
  [dynamic][resizable-modal] .djson-footer {
    padding-bottom: 0;
  }
}




/* not used anymore, but just fun to have around */
[resizable-modal] .modal-footer .btn-toggle {
  padding: 2px 2px 0px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 6px 4px;
  margin-top: 1px;
  box-shadow: none !important;
}





[resizable-modal] .btn-tiny {
  padding: 1px 1px 0px 2px;
  color: #0085CA;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
}

  [resizable-modal] .btn-tiny:hover {
    color: #005C97;
    background-color: transparent;
    border-color: #005C97;
  }



/* Toggle Button Checked */
[resizable-modal] .btn-toggle.checked {
  color: white;
  background-color: #0085CA;
  border-color: transparent;
}

  [resizable-modal] .btn-toggle.checked:hover {
    background-color: #005C97;
    border-color: transparent;
  }




/*************************************************************/
/*                                                           */
/*                 STATUS COLORS FOR FIELDS                  */
/*                                                           */
/*************************************************************/
[rz-flex] span[rz] > span.field {
  font-size: 12px !important;
  min-height: 38px;
  background-color: rgba(0, 0, 0, .03);
  border: 1px solid rgba(0, 0, 0, .05);
  font-size: 12px !important;
  font-weight: 400;
  background-clip: padding-box !important;
  border-radius: 0.25rem !important;
  transition: none !important;
  line-height: 1.6 !important;
  padding: 8px 12px 9px !important;
}

[rz-flex] span[rz] > span.field.json {
  word-break: break-all;
}

[rz-flex] span[rz] .blue { /* #0085CA */
  color: #0085CA !important;
  background-color: rgba(0, 133, 202, .15) !important;
  font-weight: bold !important;
  border: 0;
  /*border: 1px solid #0085CA !important;*/
}

[rz-flex] span[rz] .green { /* #2D953E */
  color: #2D953E !important;
  background-color: rgba(45, 149, 62, .15) !important;
  font-weight: bold !important;
  border: 0;
  /*border: 1px solid #2D953E !important;*/
}

[rz-flex] span[rz] .gold { /* #FEBE13 */
  color: #e6a920 !important;
  background-color: rgba(254, 200, 19, .18) !important;
  font-weight: bold !important;
  border: 0;
  /*border: 1px solid #c18d00 !important;*/
}

[rz-flex] span[rz] .orange { /* #F89A1C */
  color: #edb012 !important;
  background-color: rgba(248, 154, 28, .18) !important;
  font-weight: bold !important;
  border: 0;
  /*border: 1px solid #F89A1C !important;*/
}

[rz-flex] span[rz] .red { /* #DA1E32 */
  color: #DA1E32 !important;
  background-color: rgba(218, 30, 50, .15) !important;
  font-weight: bold !important;
  border: 0;
  /*border: 1px solid red !important;*/
}







#data-set-edit-generation-modal form label {
  /*  margin-top: 0.5rem;
  margin-bottom: 0.0rem;*/
}

.btn-dataset {
  background-color: #fafafa;
  text-align: left;
  border: 1px solid lightgray;
  margin: 0 0 9px;
  padding: 0 7px 9px;
  line-height: 6px;
  border-radius: 5px;
}

  .btn-dataset.selected {
    border: 2px solid rgba(0, 133, 202, 1);
  }

input[placeholder="CSV Column Header"] + span {
  padding: 1% 1%;
}






/**************************************************************************************************/
/*                                                                                                */
/*                                   D I A L O G   T W E A K S                                    */
/*                                                                                                */
/**************************************************************************************************/
h4.modal-title .subtitle-text {
  color: rgba(0, 0, 0, .35);
}




/**************************************************************************************************/
/*                                                                                                */
/*                         D A T A S E T  P A N E L / L I S T  I T E M S                          */
/*                                                                                                */
/**************************************************************************************************/
.dataset-panel {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
}

@media ( min-width: 620px) {
  .dataset-panel {
    width: 220px;
    max-width: 200px;
    min-width: 200px;
  }
}

.dataset-panel label {
  padding-bottom: 5px;
}


.dataset-field-panel label.breadcrumbs {
  padding: 0px;
  margin-top: 3px !important;
  margin-bottom: 7px !important;
}

  .dataset-field-panel label.breadcrumbs .arrow {
    font-size: 1.4em;
    font-weight: bold;
  }

  .dataset-field-panel label.breadcrumbs .selected {
    border: 1px solid rgba(0, 0, 0, .35);
  }

  .dataset-field-panel label.breadcrumbs a {
    color: rgba(0, 0, 0, .5);
    text-decoration: none;
    padding: 1px 3px;
    border: 1px solid transparent;
  }

    .dataset-field-panel label.breadcrumbs a:hover {
      color: rgba(0, 133, 202, 1);
    }


/****************************/
/*       DATASET LIST       */
/****************************/
.dataset-list {
  display: initial;
}

  .dataset-list .dataset-used, .dataset-list .dataset-available {
    display: flex;
    flex-direction: row;
    gap: 0px 10px;
    flex-wrap: wrap;
  }

  .dataset-list .dataset-available {
    margin-top: 15px;
  }

@media ( min-width: 620px) {
  .dataset-list {
    display: grid;
    grid-template-rows: 1fr;
    gap: 15px;
  }

    .dataset-list .dataset-used, .dataset-list .dataset-available {
    }

    .dataset-list .dataset-available {
      margin-top: 0;
    }
}

  
/****************************/
/*    DATASET LIST ITEMS    */
/****************************/
.dataset {
  position: relative;
  color: rgba(0, 0, 0, .60);
  background-color: #f6f8fb;
  text-align: left;
  margin: 3px 0 7px;
  padding: 2px 7px 2px;
  font-size: 13px;
  font-weight: normal;
  font-family: Arial, Helvetica, sans-serif;
  max-width: 175px;
  min-width: 175px;
  border-right: 5px solid rgba(0, 0, 0, .05);
  border-radius: 3px;
}

  .dataset:hover {
    color: rgba(0, 0, 0, .75);
    background-color: #eff2f7;
    border-right: 5px solid rgba(0, 0, 0, .75);
  }

  /* all added dataset items */
  .dataset.used {
    color: rgba(0, 0, 0, .60);
    background-color: #eff2f7;
    border-right: 5px solid rgba(0, 0, 0, .35);
  }

    .dataset.used:hover {
      color: rgba(0, 0, 0, .75);
      background-color: #eff2f7;
      border-right: 5px solid rgba(0, 0, 0, .75);
    }


  /* selected added item */
  .dataset.selected {
    color: white;
    font-weight: bold;
    background-color: #0085CA;
    border-right: 5px solid #005C97;
  }


    .dataset.selected:hover {
      color: white;
      background-color: #005C97;
      border-right: 5px solid #005C97;
    }



  /*****************************/
  /*   DATASET REMOVE BUTTON   */
  /*****************************/
  .dataset .remove::before {
    content: '\2212';
    font-size: 1.3em;
    font-weight: bold;
    padding: 0px 5px 0 1px;
    margin: 2px 5px 0 0;
    color: rgba(0, 0, 0, .45);
  }

  .dataset.used.selected .remove::before {
    color: white;
  }

  .dataset.used.selected .remove:hover::before {
    color: white;
  }

  /******************************/
  /*     DATASET ADD BUTTON     */
  /******************************/
  .dataset .add::before {
    content: '\002b';
    font-size: 1.4em;
    font-weight: 500;
    padding: 0 5px 0 1px;
    margin: 4px 5px 0 0;
    color: rgba(0, 0, 0, .45);
  }

  .dataset.available.selected .add::before {
    color: white;
  }

  .dataset.used.selected .add:hover::before {
    color: white;
  }








.dataset-field-panel {
  display: flex;
  flex-direction: column;
  /*gap: 10px 10px;*/
}


  .dataset-field-panel label.breadcrumbs {
    padding-left: 2px;
    padding-bottom: 5px;
  }


  .dataset-field-panel [non-rz-title] {
    padding-left: 2px;
  }




.dataset-field-list .field-group .field-input {
}

.dataset-field-list .field-group .primary-key {
  color: #2D953E; /* csa green */
}

  .dataset-field-list .field-group .primary-key.disabled {
    color: rgba(0, 0, 0, .15);
  }

.dataset-field-list .field-group .foreign-key {
  color: #BED12A; /* csa gold */
}

  .dataset-field-list .field-group .foreign-key.disabled {
    color: rgba(0, 0, 0, .15);
  }


.dataset-field-list .field-group label {
  margin-bottom: 5px;
}

.dataset-field-list .field-group .field-group-header {
  display: flex;
  justify-content: space-between;
}

.dataset-field-list [rz-group].rz-border {
  /*margin-right: 10px;*/
}



.fa-11x {
  font-size: 1.1em;
}

.fa-12x {
  font-size: 1.2em;
}

.fa-13x {
  font-size: 1.3em;
}

.fa-14x {
  font-size: 1.4em;
}
