﻿/*
  Widget Controls

  Last Updated: 20-Feb-2026
*/

/*
======================================================
General
======================================================
*/
.is-no-select {
  cursor:default;
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  -khtml-user-select:none;
  -moz-user-select:none;
  user-select:none;
}

@media print {
  .is-no-print
  {
    display:none;
  }
}

/*
==============
Input Controls
==============
*/
input,
select,
textarea {
  outline: none;
}

input.is-textbox,
input.is-combobox,
input.is-datebox,
input.is-timebox,
input.is-numberbox,
select.is-combobox {
  height: var(--ctrl-height) !important;
  overflow:hidden;
}

input.is-textbox,
input.is-combobox,
input.is-datebox,
input.is-timebox,
input.is-numberbox,
select.is-combobox,
textarea.is-textbox {
  background-color: var(--input-field-background-default);
  color: var(--input-field-text-default);
  border: 1px solid var(--input-field-border-default);
  border-radius: var(--border-1x);
  font-family:Verdana, Helvetica, Arial;
  font-size:13px;
  margin:0;
  padding:2px;
}

input.is-textbox,
input.is-combobox,
input.is-datebox,
input.is-timebox,
input.is-numberbox,
textarea.is-textbox {
  -webkit-border-radius:0px;
}

input.is-textbox:focus,
input.is-combobox:focus,
input.is-datebox:focus,
input.is-timebox:focus,
input.is-numberbox:focus,
textarea.is-textbox:focus,
select.is-textbox:focus,
select.is-combobox:focus {
  background-color: var(--input-field-background-focused);
  color: var(--input-field-text-focused);
  border-color: var(--input-field-border-focused);
}

label.is-mandatory {
  color: var(--ctrl-mandatory-caption);
}

input.is-mandatory,
textarea.is-mandatory,
select.is-mandatory {
  background-color: var(--ctrl-mandatory-background);
  border-color: var(--input-field-border-mandatory);
}

input.is-mandatory:focus,
textarea.is-mandatory:focus,
select.is-mandatory:focus {
  background-color: var(--ctrl-mandatory-background);

  &:focus {
    background-color: var(--ctrl-mandatory-background-focused);
  }
}

input.is-textbox:disabled,
input.is-combobox:disabled,
input.is-datebox:disabled,
input.is-timebox:disabled,
input.is-numberbox:disabled,
select.is-textbox:disabled,
textarea.is-textbox:disabled {
  background-color: var(--input-field-background-disabled);
  color: var(--input-field-background-disabled);
  border-color: var(--input-field-border-disabled);
  cursor: not-allowed;
}

input.is-textbox[readonly="readonly"],
input.is-combobox[readonly="readonly"],
input.is-datebox[readonly="readonly"],
input.is-timebox[readonly="readonly"],
input.is-numberbox[readonly="readonly"],
textarea.is-textbox[readonly="readonly"] {
  background-color: var(--ctrl-readonly-background);
  border-color: var(--input-field-border-readonly);

  &:focus {
    background-color: var(--ctrl-readonly-background-focused);
  }
}


/*
======================================================
File Upload
======================================================
*/
input[type='file']
{
  /*display:none;*/
}
label.is-file-upload {
  background-color:#ffffee;
  border:1px solid rgba(0,0,0,0.1);
  border-collapse:collapse;
  display:inline-block;
  max-width:640px;
  margin-top:0;
  padding:0;
  width:100%;
}
label.is-file-upload > div.preview {
  border-bottom:1px solid rgba(0,0,0,0.1);
  display:table-row;
  height:64px;
  width:100%;
}
label.is-file-upload > div.preview > img {
  border:none;
  display:table-cell;
  margin:4px;
  width:64px;
}
label.is-file-upload > div.preview > label {
  color: var(--text-regular-default,black);
  display:table-cell;
  font-weight:normal;
  vertical-align:middle;
  padding-left:4px;
  width:100%;
}
label.is-file-upload > div.preview > div {
  display:table-cell;
  padding-right:4px;
  vertical-align:middle;
}
label.is-file-upload > div.preview > button {
  cursor:pointer;
  vertical-align:middle;
}

label.is-file-upload > h1 {
  color:var(--text-regular-default,black);;
  font-size:12px;
  font-weight:normal;
  padding:4px;
  margin:0;
}

label.is-file-upload > h1:empty {
  display:none;
}

label.is-file-upload > label {
  cursor:pointer;
  display:inline-block;
  font-weight:normal;
  line-height:40px;
  margin:4px;
  padding:0;
  vertical-align:middle;
}
label.is-file-upload > label > div {
  background-color:#fefefe;
  border:1px solid rgba(0,0,0,0.1);
  color:rgba(0,0,0,0.6);
  display:inline-block;
  font-family:FontAwesome;
  font-size:20px;
  font-weight:normal;
  height:40px;
  margin:4px 4px 4px 0;
  text-align:center;
  vertical-align:middle;
  width:40px;
}
label.is-file-upload > label > div:before {
  font-family:isse;
  content: "\e109";
}
label.is-file-upload > label > div:hover {
  color:rgba(0,0,0,1);
  background-color:#f0f0f0;
}


/* 
======================================================
Labels
======================================================
*/
label.is-label-heading {
  .heading-5-bold();

  display:inline-block;
  margin-bottom: var(--spacing-xxs-2);
  //color:@SECTION_HEADING_COLOUR;
  //font-weight:bold;
  //font-size:1.05em;
}

label.is-label-hyperlink
{
  color: var(--text-brand-primary);
  cursor:pointer;
  display:inline-block;
  font-weight:normal;
  font-size:0.9em;
  text-decoration:underline;
}

label.is-label-information
{
  display:block;
  font-size:1em;
  background:url(Images/Information.png) no-repeat left center;
  background-size:16px 16px;
  color:#6B806C;
  line-height:110%;
  padding:0.5em 0 0.5em 20px;
}

label.is-label-normal
{
}

label.is-label-warning
{
  color:darkred;
  display:block;
  font-size:1em;
  background:url(Images/Warning.png) no-repeat left center;
  background-size:16px 16px;
  line-height:110%;
  padding:0.5em 0 0.5em 20px;
}

label.is-label-pageheading
{
  display:block !important;
  color:@THEME_BGCOLOUR_CONTRAST;
  border-bottom:1px solid;
  font-family:"Open Sans", sans-serif, "Helvetica Neue", Helvetica, Verdana, Arial;
  font-size:15px;
  font-weight:bold !important;
  margin-bottom:4px;
  margin-top:8px;
  margin-left:-8px;
  padding:4px 4px 4px 0;
}

label.is-tooltip,
header.is-tooltip,
h1.is-tooltip,
h2.is-tooltip,
h3.is-tooltip {
  cursor:default;
  display: inline-block;
  white-space: nowrap;
  position: relative;

  &:after {
    color: var(--text-status-info);
    cursor: pointer;
    font-family: fa-solid;
    font-size: 13px;
    content: "\f05a"; // fa-circle-info
    padding-left: var(--spacing-xxxs);
    vertical-align: top;
    white-space: nowrap;
  }
}

div.is-tooltip {
  background-color:#ffffe0;
  border:1px solid #e0e0e0;
  border-radius: var(--border-1x);
  box-shadow:1px 2px 4px 2px rgba(0, 0, 0, 0.2);
  color:black;
  cursor:default;
  font-size: var(--font-size-caption);
  font-weight:normal;
  line-height:150%; /*13px;*/
  max-width:60%;
  padding:8px;
  text-align:left;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;

  animation: fadein 0.1s, pop 0.1s;

  @media @SMALL_DEVICE {
    max-width:95%;
  }

  a,
  a:visited
  {
    color:blue;
  }
}


label.is-validation-tip {
  color:red !important;
  padding-left: 4px !important;
  animation:pop 0.2s;
  display:flex;

  &.below {
    background-color:#fff0f0;
    border:rgba(0,0,0,0.1);
    font-size:10px;
    margin-top:28px;
    padding-left:0 !important;
    padding:1px !important;
    position:absolute;
  }
}

/* HTML formatting within Tooltips */
.is-tooltip
{
  ul
  {
    margin:8px 0 0 20px;
    padding:0;

    > li
    {
      margin-bottom:4px;

      > small /* E.g., examples in the Search view tooltip */
      {
        color:darken(@THEME_BGCOLOUR_CONTRAST, 10%);
        line-height:150%;
      }
    }
  }
}

/*
 High DPI
*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
       only screen and (-o-min-device-pixel-ratio: 13/10),
       only screen and (min-resolution: 120dpi)
{
  label.is-message-information
  {
    background-image:url(Images/Information@2.png);
  }
}


/* 
======================================================
Checkbox
======================================================
*/
span.is-checkbox {
  height:20px;
  position:relative;
  display:inline-block;

  /* Checkbox */
  input {
    // Hide system checkbox since we're defining our own styles below (don't use display since this kills ability to focus)
    // NOTE: Many of these properties are to get around FireFox issues
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -o-appearance:none;
    height:0;
    opacity:0;
    overflow:hidden;
    position:absolute;
    width:0;

    &:checked,
    &:not(:checked) {
      & + label { 
        border:1px solid transparent;
        cursor:pointer;
        display:inline-block; 
        line-height:20px; 
        padding-left:20px;
        position:relative;

        &:before {
          //border: 1px solid var(--input-field-border-default);
          //border-radius: var(--border-1x);
          color: var(--icon-neutral);
          content:"\f0c8"; // fa-square
          display:inline-block;
          font-family: fa-light;
          font-size: var(--icon-m);
          font-weight: normal;
          height:16px;
          left:0; 
          line-height:16px;
          overflow:hidden;
          position:absolute;
          top:1px; 
          transition: border-color 0.25s;
          width:16px;
        }
      }
    }
    &:hover {
      & + label { 
        &:before {
          //border-color:darken(@CTRL_BORDER_COLOUR, 20%);
          //transition: border-color 0.25s;
        }
      }
    }

    &:focus {
      & + label { 
        border:1px dotted var(--theme-status-neutral-100);
        border-radius: var(--border-1x);
      }
    }

    &:checked {
      & + label { 
        &:before {
          content:"\f14a"; // fa-square-check
          color: var(--icon-brand);
          font-family: fa-solid;
        }
      }
    }
    &:checked:focus {
      & + label { 
        &:before {
          //background-color:@CTRL_FOCUS_BGCOLOUR;
          //transition: background-color 0.25s;
        }
      }
    }

    &:not(:checked) {
      & + label { 
        &:before {
        }
      }
    }

    /* Read-only */
    &:disabled,
    &:hover:disabled {
      & + label { 
        &:before {
          color: var(--icon-disabled);
/*          background-color:@CTRL_READONLY_BGCOLOUR;
          border-color:@CTRL_BORDER_COLOUR;
          color:black;
          transition: background-color 0.25s;*/
        }
      }
    }
  }

  /* Caption */
  label {
    vertical-align:middle;
  }

  /* Non-wrapping Caption */
  &.caption-wrap {
    height:auto !important;
  }

  &.caption-wrap > input + label {
    line-height:18px !important;
    margin-bottom:4px !important;
  }
}

/* Radio Button */
span.is-checkbox {
  input {
    &:checked,
    &:not(:checked) {
      & + label.is-radio-button { 
        overflow:hidden;

        &:before {
          border:none;
          content:"\f111" !important; // fa-circle
          font-size:16px;
          font-weight:normal !important;
        }
      }
    }

    &:checked.is-radio-button
    {
      & + label { 
        &:before {
          content:"\f192" !important; // fa-circle-dot
        }
      }
    }

    /* Read-only */
    &:disabled,
    &:hover:disabled
    {
      & + label.is-radio-button
      { 
        color: silver; /* Unlike a checkbox, a read-only radio button can be considered to be properly disabled */

        &:before
        {
          background-color:transparent !important;
          color:silver;
        }
      }
    }
  }
}



/*
======================================================
Calendar
======================================================
*/
div.is-dropdown div.is-calendar {
  height:340px;
  width:280px;

  border-radius:8px !important;
  overflow:hidden;
  display:block;
  margin:0 !important;
  flex:none;
}

div.is-calendar {
  -webkit-appearance:none;
  color: var(--text-regular-default);
}

.is-calendar-header {
  border-bottom:1px solid rgba(0,0,0,0.1);
  color: var(--text-regular-default);
  padding:12px 0 12px 0;
  margin:0;
  text-align:center;

  > div {
    position:relative;
  }

  div.left,
  div.right {
    //background-color:rgba(0,0,0,0.05);
    border-radius: var(--border-1x);
    cursor:pointer;
    font-size:13px;
    font-weight:bold;
    line-height:30px;
    height:30px;
    position:absolute;
    width:30px;
    overflow:hidden;
    text-align:center;
    top:50%;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    vertical-align:middle;

    &:hover {
      background-color:rgba(0,0,0,0.1);
    }
  }

  div.left {
    left:8px;

    &::before { 
      font-family: fa-regular; 
      font-size: 14px;
      font-weight: normal; 
      content: "\f053"; // fa-chevron-left
    }
  }

  div.right {
    right:8px;

    &::before { 
      font-family: fa-regular; 
      font-size: 14px;
      font-weight: normal; 
      content: "\f054"; // fa-chevron-right
    }
  }
}

.is-calendar-header div.month-year {
  line-height:30px;
}

.is-calendar-header select {
  background-color:transparent;
  border:none;
  border-bottom:2px solid transparent;
  color: var(--text-regular-default);
  cursor:pointer;
  font-weight:bold;
  line-height:22px;
  margin:0 !important;
  outline:none;
  padding:0;
  text-align:center;
  text-align-last:center; /* Chrome */

  appearance: none;
  -moz-appearance: none;
  -webkit-appearance:none;
  &::-ms-expand { display: none; }

  &:hover {
    border-bottom:2px solid @SEL_BGCOLOUR;
  }

  > option {
    background-color: var(--background-default);
    color: var(--text-regular-default);
    font-weight:normal;
  }

  &.day {
    font-size:15px;
    //margin-bottom:6px;
  }

  &.month {
    font-size:15px;
    //margin-bottom:6px;
  }

  &.year {
    font-size:15px;
    margin-bottom:6px;
  }
}
.is-calendar-header > select::-ms-expand {
  display: none;
}

.is-calendar-body {
  padding:2px;
  margin-bottom:0px;
}

.is-calendar-footer {
  border-top:1px solid rgba(0,0,0,0.1);
  margin-top:8px;
  padding:8px 4px 8px 4px;
  position:absolute;
  bottom:0;
  left:0;
  right:0;

  text-align:center;
  white-space:nowrap;

  button {
    color: var(--button-outline-text-icon-border-subtle-default);
    border: var(--stroke-regular) solid var(--button-outline-text-icon-border-subtle-default);
    background: var(--button-outline-background-default);
    border-radius: var(--border-1x);
    cursor:pointer;
    font-size: var(--font-size-caption);
    font-weight: 600;
    margin:0 4px 0 0;
    min-width:48px;

    //padding:6px;
    line-height:30px;

    &:hover {
      background-color:rgba(0,0,0,0.1);
      color:black;
    }

    /* OK */
    &.ok {
      border: var(--stroke-regular) solid var(--button-solid-border-brand-primary-default);
      background: var(--button-solid-background-brand-primary-default);
      color: var(--button-solid-text-icon-default);
      margin-right:0; /* Done is the right-hand button */

      &:hover {
        //background:darken(@BTN_OK_BGCOLOUR, 10%);
      }
    }
  }
}

.is-calendar-body > table {
  border-spacing:0;
  cursor:default;
  font-size:13px;

  > thead th {
    font-weight:bold;
    height:32px;
    text-align:center;
    vertical-align:middle;
    width:14.28%;

    /* Weekend */
    &.weekend {
    }
  }

  > tbody td {
    border:1px solid transparent;
    border-radius: var(--border-1x) !important;
    cursor:pointer;
    height:30px;
    overflow:hidden;
    text-align:center;
    vertical-align:middle;

    &:hover {
      background-color:#f0f0f0;
    }

    /* Weekend */
    &.weekend {
    }

    /* Today */
    &.today {
      background-color: var(--tab-selected-background);
      color: var(--tab-selected);
      font-weight:bold;
      border:1px solid var(--tab-selected-background);
      border-style:dotted;
    }

    /* Selected */
    &.is-sel {
      background-color:var(--ctrl-selected-item-background);
      color:var(--ctrl-selected-item);
      font-weight:bold;
    }

    &.is-sel-border {
      border:1px solid var(--ctrl-selected-item-background);
    }

    /* Not in current month */
    &.notcurrent {
      color:silver;
    }
     
  }
}



/*
======================================================
ComboBox/ DBCombo
======================================================
*/
input.is-combobox {
  //border: 1px solid @CTRL_BORDER_COLOUR;
  padding: 2px 22px 2px 2px;

  &.is-hyperlink {
    color: var(--text-brand-primary);
    cursor:pointer;
    text-decoration:underline;

    -webkit-touch-callout:none;
    -webkit-user-select:none;
    -khtml-user-select:none;
    -moz-user-select:none;
    -ms-user-select:none;
    user-select:none;
  }

  &.fetchingdata {
    //border-color:darken(@CTRL_BORDER_COLOUR, 10%);
  }

  &[readonly="readonly"] {
    padding-right:2px; /* No dropdown button shows when read-only */
  }
}

button.is-combobox-button {
  background-color:transparent;
  border: 1px solid transparent;
  border-radius: var(--border-1x);
  color: var(--input-field-button-default);
  cursor:pointer;
  display: flex;
  flex-direction:column;
  justify-content:center;
  flex-grow:0;
  margin: 0;
  margin-left: -25px; //~"calc(-var(--ctrl-height)-1px)"; //-21px;
  outline:none;
  overflow:hidden;
  padding:0;
  width: 24px; //var(--ctrl-height);
  text-align:center;
  height: var(--ctrl-height);
  line-height: var(--ctrl-height);

  &:before {
    font-family: fa-regular;
    font-size: 14px;
    font-weight: normal;
    content: "\f078"; // fa-chevron-down
    //width: 100%;
  }
  &.is-picker:before { 
    content: "\E013";
  }

  &.date:before {
    content: "\f133"; // fa-calendar
  }

  &.fetchingdata {
    &:before {
      font-family: fa-solid;
      content: "\f251"; // hourglass-start
      animation: spin 1s infinite linear;
    }
  }

  &:disabled {
    color:#e0e0e0;
  }

  &:hover:not(:disabled) {
    background-color:rgba(0, 0, 0, 0.05);
  }
}

label.is-combobox {
  color:#808080;
  display:flex;
  flex-direction:column;
  justify-content:center;

  margin:0;
  overflow:hidden;
  padding-left:4px !important;
  text-overflow:ellipsis;
  word-wrap:break-word;
  word-break:break-all;

  &.is-invalid
  {
    color:red;
  }
}

div.is-dropdown {
  background-color: var(--background-default);
  border: 1px solid var(--input-field-border-default);
  box-shadow:2px 2px 4px 0px rgba(0,0,0,0.25);
  color:black;
  font-size:13px;
  overflow:auto;
  padding:0;
  text-align:left;
  -webkit-overflow-scrolling:touch;
  animation:fadein 0.1s, pop 0.1s;

  /* Single Column List (ComboBox) */
  > ul {
    list-style:none;
    margin:0;
    padding:0;

    > li {
      margin: 0;
      padding: 2px;
      cursor: default;
      line-height: var(--ctrl-height);

      &:hover {
        filter: brightness(95%);
      }
    }

    /* Selected Item */
    > li.is-sel {
      background-color: var(--ctrl-selected-item-background);
      color: var(--ctrl-selected-item);
    }

    /* Row Striping */
    > li:nth-child(even):not(.is-sel) {
      background-color: var(--ctrl-stripe-even);
    }
    > li:nth-child(odd):not(.is-sel) {
      background-color: var(--ctrl-stripe-odd);
    }
  }

  /* Tabular List (DBComboBox) */
  > table {
    border:none;
    border-collapse:collapse;
    cursor:default;

    tr > th,
    tr > td {
      line-height: var(--ctrl-height);
    }

    /* Column headers */
    > thead > tr {
      > th {
        color: var(--ctrl-grid-text);
        background-color: var(--ctrl-grid-header-background);
        padding: var(--spacing-xxs-2);
        position:sticky;
        position:-webkit-sticky;
        top:0;
      }
    }

    > tbody {
      tr:hover {
        filter: brightness(95%);
      }

      /* Selected Item */
      > tr.is-sel {
        background: var(--ctrl-selected-item-background);
        color: var(--ctrl-selected-item);
      }

      /* Row Striping */
      > tr:nth-child(even):not(.is-sel) {
         background-color: var(--ctrl-stripe-even);
      }
      > tr:nth-child(odd):not(.is-sel) {
        background-color: var(--ctrl-stripe-odd);
      }
    }

    td {
      //border:1px solid #f0f0f0;
      padding: var(--spacing-xxs-2);
    }
  }
}

/* Filter row */
caption.is-table-filter
{
  > input
  {
    border:1px solid rgba(0, 0, 0, 0.1);
    margin-bottom:4px;
    padding:4px;

    &::-webkit-input-placeholder
    {
      font-style:italic;
    }

    &::-moz-placeholder
    {
      font-style:italic;
    }
  }
}

/* Filtered out row */
tr.is-filtered-out
{
  display:none;
  visibility:hidden;

  td
  {
    display:none;
    visibility:hidden;
  }
}

/* Filtered out item */
li.is-filtered-out
{
  display:none !important;
}



/*
======================================================
Special Control Buttons
======================================================
*/
div.is-control-button {
  margin-left: 4px;
}

div.is-control-button,
div.is-button-strip > ul > li > a {
  border: 1px solid var(--input-field-border-default);
  border-radius: var(--border-1x);
  color: var(--input-field-button-default) !important; // var(--input-field-border-default);
  cursor: pointer;
  display: inline-flex !important;
  font-weight: normal;
  font-size: var(--font-size-body);
  font-family: fa-light;
  height: var(--ctrl-height);
  line-height: var(--ctrl-height);
  min-width: var(--ctrl-height);

  &:before {
    text-align: center;
    min-width: var(--ctrl-height);
  }

  &:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--icon-brand) !important;
    font-family: fa-solid !important;
  }

  // Symbols
  &.formopen:before { content: "\f08e"; /* fa-arrow-up-right-from-square */ }
  &.download:before { content: "\f33d"; /* fa-arrow-down-to-line */ }
  &.find:before { content: "\f1e5"; /* fa-binoculars */ }
}



/*
======================================================
DateBox
======================================================
*/
input:not(.native).is-datebox {
  //border:1px solid @CTRL_BORDER_COLOUR;
  margin:0;
  padding: 2px 22px 2px 2px;
  text-align:right;
  -webkit-appearance:none;
  width:108px;

  &[readonly="readonly"]
  {
    padding-right:4px;
  }
}

input.native.is-datebox {
  //border:1px solid @CTRL_BORDER_COLOUR;
  padding:2px;
  height:20px;
  margin:0;
  width:7em;
  vertical-align:middle;  // Alignment tweak on iOS
}


/*
======================================================
TimeBox
======================================================
*/
input:not(.native).is-timebox {
  //border:1px solid @CTRL_BORDER_COLOUR;
  margin:0;
  padding: 2px 22px 2px 2px;
  text-align:right;
  -webkit-appearance:none;
  width:92px;

  &[readonly="readonly"] {
    padding-right:4px;
  }
}

input.native.is-timebox /* NOTE: Native time control not currently used since it does not show second precision */
{
  //border:1px solid @CTRL_BORDER_COLOUR;
  padding:2px;
  height:20px;
  margin:0;
  margin-left:4px;
  width:5em;
}


/*
=============================================================
DateTimeZone (a combination of Date, Time and Combo controls)
=============================================================
*/
table.is-datetimezone
{
  border-collapse:collapse;
  margin:0;
  padding:0;

  td
  {
    line-height:12px;
    padding:0;
  }
}


/*
======================================================
NumberBox
======================================================
*/
input.is-numberbox {
  //border: 1px solid @CTRL_BORDER_COLOUR;
  padding: 2px;
  text-align: right;
  -webkit-appearance: none;

  /* Size as per a DateBox */
  &.date
  {
    width:7em;
  }
}


/*
======================================================
 Miscellaneous
======================================================
*/
/* Non-intrusive info text, e.g., under record tabs */
.is-info-text {
  color:darken(@THEME_BGCOLOUR_CONTRAST, 20%);
  cursor:default;
  font-size: 13px;
  margin:4px 0 8px 0;

  /* Small */
  &.small
  {
    font-size:11px;
  }

  /* List */
  > ul
  {
    padding:4px;
    margin:2px 0 2px 12px;
  }

  /* Information (e.g., below the checkboxes on the Account Application Accept/ Decline wizard) */
  &.info
  {
    animation:pop 0.2s;
    background-color:#FFFFEE;
    border:1px solid rgba(0,0,0,0.05);
    color:black;
    display:inline-block;
    padding:8px;

    p
    {
      margin:6px 0 6px 0;
    }
  }

  /* Validation (e.g., on Search View as validation message) */
  &.validation
  {
    animation:pop 0.2s;
    background-color:darken(@THEME_BGCOLOUR_CONTRAST, 10%);
    color:white;
    display:inline-block;
    padding:2px;
  }

  /* Warning */
  &.warning
  {
    animation:pop 0.2s;
    color: red;
  }

  /* Control (after a control) */
  &.control
  {
    color:#808080;
    font-size:11px;
    padding-left:4px;
  }

}

.apexcharts-menu {
  background-color: var(--background-default, white) !important;

  > div {
    color: var(--text-regular-default, black) !important;

    &:hover {
      background-color:var(--ctrl-selected-item-background) !important;
      color:var(--ctrl-selected-item) !important;
    }
  }
}


/*
==============================================================
Docking

NOTE: Assume element's parent is either Relative or Absolute
==============================================================
*/
div.is-dock-fill,
span.is-dock-fill {
  bottom: 0 !important;
  left: 0 !important;
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  outline: none;

  &.border {
    border:1px solid #D6D6D6;
  }

  &.is-pad
  {
    bottom: 4px;
    left: 4px;
    right: 4px;
    top: 4px;

    @media @SMALL_DEVICE 
    {
      bottom: 0;
      left: 0;
      right: 0;
      top: 0;
    }
  }

  &.is-pad-bottom
  {
    bottom: 4px;
  }

  > div.is-tab-page
  {
    //background-color:white;
  }
}


/* Grid not using 'is-dock-fill' */
div.is-grid-container:not(.is-nostyle).is-sticky-header.docked {
  max-height:100%;
  min-height:100%;
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
  outline: none;
}


/* In a table cell, e.g., the Confirm page of the Account Application Accept/ Decline wizard */
td > div.is-dock-fill,
th > div.is-dock-fill
{
  display:block;
  position:relative;
  width:100%;
  height:100%;
}


/*
==============================================================
Split Container
==============================================================
*/
div.is-split-container
{
  display:flex; display:-webkit-box;
  display:-webkit-flex;flex-direction:column; -webkit-flex-direction:column;

  /* Panels side-by-side but will change responsively to vertically stacked (the default) */
  &.side-by-side
  {
    display:-webkit-flex;flex-direction:row; -webkit-flex-direction:row;
    display:flex;

    /* Responsive (stack vertically) */
    @media @SMALL_DEVICE
    {
      display:-webkit-flex; flex-direction:column; -webkit-flex-direction:column;

      /* Split vertically with top taking 50% and bottom 50%*/
      &.split5050
      {
        > div.panel:first-child
        {
          flex:0.5;
        }

        > div.panel:last-child
        {
          flex:0.5;
        }
      }

      /* Split vertically with top taking 30% and bottom 70%*/
      &.split3070
      {
        > div.panel:first-child
        {
          flex:0.3;
        }

        > div.panel:last-child
        {
          flex:0.7;
        }
      }
    }
  }

  /* Panel */
  > div.panel
  {
    flex:auto;
    position:relative;
  }
}

/* Collapsed caption (will only be displayed if pane is collapsed) */
div.collapsed-caption
{
  display:none;
}

/* Pseudo-responsive */
.is-container-small div.is-split-container
{
  /* Panels side-by-side but will change responsively to vertically stacked (the default) */
  &.side-by-side
  {
    display:-webkit-flex;flex-direction:column; -webkit-flex-direction:column;

    /* Split vertically with top taking 30% and bottom 70% */
    &.split3070
    {
      > div.panel:first-child
      {
        flex:0.3;
      }

      > div.panel:last-child
      {
        flex:0.7;
      }
    }

    /* Split vertically with top taking 50% and bottom 50% */
    &.split5050
    {
      > div.panel:first-child
      {
        flex:0.5;
      }

      > div.panel:last-child
      {
        flex:0.5;
      }
    }
  }
}

/* Responsive */
@media @SMALL_DEVICE
{
  /* Auto-collapse panel 2, e.g., the preview below grid on an iPhone */
  div.is-split-container.auto-collapse,
  div.is-split-container.side-by-side.split5050.auto-collapse,
  div.is-split-container.side-by-side.split3070.auto-collapse
  {
    /* Collapse Panel 2 */
    > div.panel:first-child
    {
      flex: 1;
    }

    > div.panel:last-child
    {
      border: none;
      height: 38px;
      flex: none;

      > div
      {
        overflow: hidden;
        border:none;

        > div.collapsed-caption
        {
          background-color: darken(@THEME_BGCOLOUR_MAIN, 8%);
          color: rgba(255, 255, 255, 0.9);
          display: block;
          font-size: 12px;
          height:38px;
          line-height: 38px;
          overflow:hidden;
          padding-right:6px;
          position:relative;
          text-align: right;
          transition:background-color 0.1s;
          vertical-align:middle;

          &[available='false']
          {
            background-color:#808080;
            color: rgba(255, 255, 255, 0.25);
            cursor:not-allowed;
            transition:background-color 0.1s;
          }

          > a
          {
            cursor: pointer;

            &::after
            {
              content:"\E759";
              font-family:isse;
              font-size:14px;
              line-height:32px;
              padding:4px 0 4px 8px;
              position:relative;
              vertical-align:middle;
            }
          }
        }

        > iframe
        {
          display: none;
        }
      }
    }
  }
}


/*
==============================================================
Preview Pane
==============================================================
*/
.is-preview-pane {
  background-color: var(--background-default, white);
  border: 1px solid var(--input-field-border-default, #D0D0D0);
  display:block;

  /* FUDGE: iOS Safari */
  overflow:auto;
  -webkit-overflow-scrolling:touch;

  /* IFRAME */
  > iframe {
    background-color: var(--background-default);
    border:none;
    display:block; /* Without this, Chrome has a bottom gap! - it still does for this but NOT for widget? investigate TODO: */
    height:100%;
    margin:0;
    padding:0;
    position:relative;
    /*width:100%;*/

    /* FUDGE: iOS Safari (code also adds scroll='no' to iframe) */
    width:10px !important;
    min-width:100%;
    *width:100%;
  }
}

.is-preview-pane.has-buttons {
  display:flex;
  flex-direction:column;
 }



/*
======================================================
 Grid
======================================================
*/
/* Sticky headers (many CSS properties applied within here just so normal grids do not get accidentally broken) */
.is-grid-container.is-sticky-header > div.is-grid {
  position:relative;
  left:0;
  right:0;
  top:0;
  bottom:0;
  overflow:auto;

  > table > thead > tr {
    > th, > td {
      background-color:#e0e0e0;
      border:none !important;
      position:sticky;
      position:-webkit-sticky;
      top:0;
      //opacity:0.925;
      box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
      z-index:2; // Prevent row selector checkboxes from overlaying header
    }
  }
}

/* Input controls within editable grid cells */
.is-grid input[type='checkbox'].is-grid-checkbox {
  appearance: checkbox;
  -webkit-appearance:checkbox;
  -moz-appearance: checkbox;
  -o-appearance:checkbox;
}


/*
======================================================
Other (finalised after previous)
======================================================
*/
input.is-invalid,
textarea.is-invalid,
select.is-invalid
{
  border: 1px solid red;
}

/* Tags List */
div.is-textbox-tagslist
{
  > ul
  {
    padding:0;
    margin:0;
    list-style:none;

    > li
    {
      background-color:darken(@SEL_BGCOLOUR,20%);
      border-radius:4px;
      //box-shadow:2px 2px 2px 0px rgba(0,0,0,0.25);
      color:white;
      display:inline-block;
      cursor:pointer;
      font-size:11px;
      margin:4px;
      padding:2px 4px 2px 4px;

      &:hover
      {
        background-color:darken(@SEL_BGCOLOUR,10%);
      }
    }
  }
}


/* Control Actions Button */
span.is-control-actions-button,
div.is-control-actions-button {
  display: flex !important;
  position: relative;
 
  /* FIX: Nested rules must be inside the parent selector's curly braces. */
  > button.is-control-actions-button {
    border:1px solid transparent; //darken(@BTN_OK_BGCOLOUR, 5%);
    border-radius: var(--border-1x);
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    cursor:pointer;
    display: flex;
    flex-direction:column;
    justify-content:center;
    outline:none;
    padding:0;
    position:absolute;
    right:1px;
    top:0;
    width:24px;
    height: var(--ctrl-height);
    line-height: var(--ctrl-height);
    overflow:hidden;
    text-align:center;
 
    &:not(.icon):not(.symbol) {
      //transform: rotate(90deg);
    }
    &:not(.icon):not(.symbol)::before {
      content: "\f142"; // fa-ellipsis-vertical
      font-family: fa-solid;
      font-weight: normal;
      font-size: var(--font-size-body);
    }
    
    &.symbol {
      border-color: transparent;
      background-color: transparent;
      color: var(--input-field-border-default);
      font-family: fa-regular;
      font-weight: normal;
      height: var(--ctrl-height);
      line-height: var(--ctrl-height);

      &:hover {
        &:before {
          color: var(--icon-brand) !important;
          font-family: fa-solid !important;
        }
      }
    }

    &.icon {
      border-color: transparent;
      border-left-color: rgba(0, 0, 0, 0.05);
      background-color: rgba(0, 0, 0, 0.1);

      > img {
        //margin-left:-4px;
        margin-top: 2px;
        width: 16px;
        height: 16px;
        position: relative;
      }
    }
 
    &:hover {
      //background: darken(@BTN_OK_BGCOLOUR, 5%);
      background-color: rgba(0, 0, 0, 0.05);
    }
    &.icon:hover {
      //background-color: rgba(0, 0, 0, 0.15);
      background-color: rgba(0, 0, 0, 0.05);
    }
  }
}


/*
======================================================
 Other Animations
======================================================
*/
@keyframes pop {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

@keyframes spin {
  from {transform:rotate(0deg);}
  to {transform:rotate(360deg);}
}


/*
======================================================
Parameters Host
======================================================
*/
.is-parametershost-container {
  display: inline-block;
  position: relative;

  label.is-label-heading {
    display:inline-block !important;
  }
}

table.is-form .is-parametershost-container
{
  background-color:rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding:2px 4px 2px 4px;
}

input.is-parameter-highlight {
  background-color: lighten(@THEME_BGCOLOUR_CONTRAST, 45%);
  border:1px solid @THEME_BGCOLOUR_CONTRAST;
  box-shadow:2px 2px 3px fade(@THEME_BGCOLOUR_CONTRAST, 50%), -2px -2px 3px fade(@THEME_BGCOLOUR_CONTRAST, 50%);
  animation:bounce-small 3s;
}


/*
======================================================
MsgBox List
======================================================
*/
.is-msgbox-list
{
  color:#404040;
  outline:none;
  padding:8px 8px 0 8px;

  /* Message */
  & > label
  {
    display:block;
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 16px !important;
  }

  /* List */
  ul
  {
    list-style:none;
    margin:0;
    padding:0;

    li
    {
      background-color:rgba(0, 0, 0, 0.025);
      border:1px solid rgba(0, 0, 0, 0.05);
      cursor:pointer;
      margin:0 0 8px 0;
      padding:16px;

      &.icon
      {
        background-repeat:no-repeat;
        background-size:32px 32px;
        background-position:4px center;
        padding-left:48px;
      }

      &:hover
      {
        background-color:rgba(0, 0, 0, 0.05);
      }

      h1
      {
        color:black;
        font-size:13px;
        font-weight:bold;
        margin:0 0 4px 0;
        padding:0;
      }

      div
      {
        font-size:12px;
      }

      /* Disabled Item */
      &.disabled
      {
        color:#b0b0b0;
        cursor:not-allowed;

        div.warning
        {
          margin-top:4px;
          color:#C00000;
        }
      }

      /* Selected Item */
      &.is-sel:not(.disabled)
      {
        background-color:@SEL_BGCOLOUR;
        border-color:darken(@SEL_BGCOLOUR, 10%);
        color:@SEL_COLOUR;

        &:hover
        {
          background-color:darken(@SEL_BGCOLOUR, 7.5%);
        }

        h1
        {
          color:@SEL_COLOUR;
        }
      }
    }
  }
}


/*
======================================================
Parameters Host
======================================================
*/
.is-parametershost-container
{
  display:inline-block;
  position:relative;
}

table.is-form .is-parametershost-container
{
  background-color:rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding:2px 4px 2px 4px;
}


/*
======================================================
Button Strip
======================================================
*/
div.is-control-button-strip-container {
  margin-left: 4px;
}

div.is-button-strip {
  display:inline-block;
  position:relative;
  margin-top:-3px; /* Unsure why? can probably be solved by using flexbox */

  > ul {
    font-size:0;
    list-style:none;
    margin:0;
    padding:0;

    > li {
      display:inline-block;
      margin:0 0 0 2px;
      min-width:24px;
      height: var(--ctrl-height);
      line-height: var(--ctrl-height);
      padding:0;

      > a {
        border:1px solid var(--input-field-border-default);
        border-radius: var(--border-1x);
        color:#606060;
        cursor:pointer;
        display:block;
        height: var(--ctrl-height);
        line-height: var(--ctrl-height);
        min-width: var(--ctrl-height);

        &:hover {
          background-color: rgba(0,0,0,0.05);
        }

        > img {
          height:16px;
          width:16px;
          margin-left:5px;
          margin-top:5px;
        }
      }
    }
  }
}

/* Alignment tweaks */
span[controltype='textbox'],
span[controltype='numberbox'],
span[controltype='combobox']{
  div.is-button-strip {
    top: 3px;
  }
}


/* 
======================================================
Command Button
======================================================
*/
.is-button {
  .body-semibold() !important;

  color: var(--text-regular-default);

  //display: flex;
  min-height: var(--spacing-xxl-2);
  padding: var(--spacing-xxs) var(--spacing-xs);
  justify-content: center;
  //align-items: center;
  gap: var(--spacing-xs);

  border-radius: var(--border-1x);
  border: var(--stroke-regular) solid var(--button-outline-text-icon-border-subtle-default);
  background: var(--button-outline-background-default);

  cursor: pointer;
  outline: none;
  min-width: 80px;
  margin:0 2px 0 2px;


/*  border-radius:12px;
  display:inline-block;
  margin:0 2px 0 2px;
  cursor:pointer;
  font-weight:normal;
  font-size:14px;
  height:32px;
  min-width:80px;
  outline:none;
  padding:0 8px 0 8px;
*/
  /* Active, i.e., pressed */
  &:active {
    position: relative;
    top: 1px;
  }

  /* Focused */
  &:focus {
    border:1px solid var(--ctrl-selected-item-background) !important;
    //border:1px solid @SEL_BGCOLOUR !important;
    //box-shadow:0 0 4px 1px fadeout(@SEL_BGCOLOUR, 50%);
  }

  /* Flat */
  &.flat {
    border:none;
    color: var(--text-regular-default);
    font-weight:bold;
    margin-left:0;
    margin-right:1.5em;
    min-width:0;
    padding:0 0 0 0;
    width:auto;

    &:hover {
      //color:darken(@BTN_OK_BGCOLOUR, 10%);
    }
  }

  /* Normal/ Cancel */
  &.normal,
  &.cancel {
    color: var(--text-regular-default);
    border: var(--stroke-regular) solid var(--button-outline-text-icon-border-subtle-default);
    background: var(--button-outline-background-default);

    /*
    background-color:@BTN_NORMAL_BGCOLOUR;
    border:1px solid darken(@BTN_NORMAL_BGCOLOUR, 10%);
    color:@BTN_NORMAL_COLOUR;
    */

    &:hover {
      //background-color:darken(@BTN_NORMAL_BGCOLOUR, 10%);
      //border:1px solid darken(@BTN_NORMAL_BGCOLOUR, 20%);
    }
  }

  /* OK */
  &.ok {
    border: var(--stroke-regular) solid var(--button-solid-border-brand-primary-default);
    background: var(--button-solid-background-brand-primary-default);
    color: var(button-outline-text-icon-border-subtle-default);

    //background:@BTN_OK_BGCOLOUR;
    //border:1px solid darken(@BTN_OK_BGCOLOUR, 5%);
    //color:@BTN_OK_COLOUR;

    &:hover {
      //background:darken(@BTN_OK_BGCOLOUR, 5%);
      //border:1px solid darken(@BTN_OK_BGCOLOUR, 12.5%);
    }

    &:focus {
      //border:1px solid white !important;
    }
  }

  /* Danger/ Negative */
  &.danger,
  &.negative {
    background: var(--color-status-error-500);
    //border:1px solid darken(@BTN_DANGER_BGCOLOUR, 5%);
    color: var(button-outline-text-icon-border-subtle-default);

    &:hover {
      //background:darken(@BTN_DANGER_BGCOLOUR, 5%);
      //border:1px solid darken(@BTN_DANGER_BGCOLOUR, 12.5%);
    }
  }

  /* Positive */
  &.positive {
    background: var(--color-status-success-500);
    //border:1px solid darken(@BTN_DANGER_BGCOLOUR, 5%);
    color: var(button-outline-text-icon-border-subtle-default);

    //border:1px solid darken(@BTN_POSITIVE_BGCOLOUR, 5%);
    //color:@BTN_POSITIVE_COLOUR;

    &:hover {
      //background:darken(@BTN_POSITIVE_BGCOLOUR, 5%);
      //border:1px solid darken(@BTN_POSITIVE_BGCOLOUR, 12.5%);
    }
  }

  /* Small (e.g., between lists on Report, Export page) */
  &.small {
    background-position:center center;
    background-repeat:no-repeat;
    background-size:16px;

    min-width:0;
  }

  /* Small Caption */
  &.small-caption {
    //border-radius:9px;
    font-size:11px !important;
    height:22px;
    line-height:20px;
  }

  /* Refresh */
  &.refresh {
    background-color:@BTN_POSITIVE_BGCOLOUR;
    border:1px solid darken(@BTN_POSITIVE_BGCOLOUR, 5%);
    color:@BTN_POSITIVE_COLOUR;
    min-width:0;
    line-height:30px;
    height:32px;
    padding:0 0 0 0;
    position:relative;
    text-align:center;
    transform:rotate(90deg);
    width:32px;

    &:before { color:white !important; font-size:20px; font-family:isse; font-weight:normal; content:"\E149"; }

    &:hover {
      background-color:darken(@BTN_POSITIVE_BGCOLOUR, 5%);
      border:1px solid darken(@BTN_POSITIVE_BGCOLOUR, 12.5%);
    }

    &.dark {
      color:black;
    }
  }

  /* Customise */
  &.customise {
    background-color:@BTN_OK_BGCOLOUR;
    border:1px solid darken(@BTN_OK_BGCOLOUR, 5%);
    min-width:0;
    padding:0 0 0 0;
    width:32px;

    &::before {color:white; font-family:isdi; font-size:20px; line-height:24px; font-weight:normal; content:"\F107";}

    &:hover {
      background-color:darken(@BTN_OK_BGCOLOUR, 5%);
      border:1px solid darken(@BTN_OK_BGCOLOUR, 12.5%);
    }
  }

  /* Search */
  &.search {
    background:@BTN_OK_BGCOLOUR;
    border:none;
    border-radius:0;
    color:@BTN_OK_COLOUR;
    height:22px;
    margin:0;
    min-width:20px;
    vertical-align:bottom;
    width:20px;

    &::before {font-family:isse; font-weight:normal; content:"\E1A3";}

    &:hover {
      background-color:darken(@BTN_OK_BGCOLOUR, 10%);
    }
  }
  &.search.full {
    height:32px;
    padding:4px 8px 4px 8px;
    width:auto;
    border-radius:4px;

    &::before {font-family:isse; font-weight:normal; content:"\E1A3\0020";}
  }

  /* Hyperlink */
  &.hyperlink {
    background:transparent;
    border:none;
    color:@BTN_OK_BGCOLOUR;
    font-size:0.9em;
    margin:0;
    padding:0;

    &:hover {
      background:transparent;
      border:none;
      text-decoration: underline;
    }
  }

  /* In a Form, e.g., a 'Reset' button next to a Log's Publish Status */
  &.form {
    height:22px;
    font-size:12px;
    margin-left:2px;
    min-width:60px;
    padding:0 !important;
    vertical-align:top;
  }

  /* Actions */
  &.actions {
    background-color:@BTN_ACTIONS_BGCOLOUR;
    border:1px solid darken(@BTN_ACTIONS_BGCOLOUR, 5%);
    color:@BTN_ACTIONS_COLOUR;
    line-height:32px;
    min-width:0;
    padding:0 0 0 1px !important;
    width:32px;

    &:before { 
      //font-size:22px; font-family:isse; font-weight:normal; content:"\E78B";
      font-family: fa-regular;
      font-size: var(--icon-m);
      content: "\f0ae";
    }

    &:hover {
      //background-color:darken(@BTN_ACTIONS_BGCOLOUR, 5%);
      //border:1px solid darken(@BTN_ACTIONS_BGCOLOUR, 12.5%);
    }
  }

  /* Other Actions (e.g., Log 'Reply' button) */
  &.action-other {
    background-repeat:no-repeat;
    background-position:center center;
    background-size:16px;
    min-width:32px;
  }

  /* Icon only */
  &.icon {
    background-position:center center;
    background-repeat:no-repeat;
    background-size:20px 20px;
    min-width:32px;

    > img {
      height:16px;
      width:16px;
    }
  }

  /* Icon and Caption */
  &.icon-and-caption {
    background-position-x:8px;
    background-position-y:center;
    background-repeat:no-repeat;
    background-size:16px 16px;
    padding-left:32px;

    /* Responsive */
    @media @SMALL_DEVICE
    {
      /* Drop button captions so more can fit, e.g., Log form */
      color:transparent;
      max-width:20px !important;
      min-width:16px;
      width:20px !important;
      margin-left:1px;
      margin-right:1px;
      padding-left:24px;
      background-position-x:8px;
      overflow:hidden;
      transition:all 0.2s;
    }
  }

  /* Contextual (i.e., only appears for a specific Page) */
  &.contextual
  {
    /*background-color:lighten(@THEME_BGCOLOUR_MAIN, 75%);
    border:1px solid lighten(@THEME_BGCOLOUR_MAIN, 65%);
    color:darken(@BTN_NORMAL_COLOUR, 10%);

    &:hover
    {
      background-color:lighten(@THEME_BGCOLOUR_MAIN, 60%);
      border:1px solid lighten(@THEME_BGCOLOUR_MAIN, 50%);
    }*/
  }

  /* Checked (assumes 'normal' style button) */
  &.checked
  {
    //background-color:darken(@BTN_NORMAL_BGCOLOUR, 15%) !important;
    background-color:darken(@THEME_BGCOLOUR_CONTRAST,5%) !important;
    //border:1px solid darken(@BTN_NORMAL_BGCOLOUR, 25%) !important;
    border:1px solid darken(@THEME_BGCOLOUR_CONTRAST,7.5%) !important;
    //color:darken(@BTN_NORMAL_COLOUR, 10%) !important;
    color:@THEME_COLOUR_CONTRAST !important;

    &:hover
    {
      background-color:darken(@BTN_NORMAL_BGCOLOUR, 25%) !important;
      border:1px solid darken(@BTN_NORMAL_BGCOLOUR, 35%) !important;
    }
  }

  /* Disabled */
  &:disabled,
  &:disabled:hover
  {
    border-color:#e8e8e8;
    background-color:#eeeeee;
    color:#cccccc;
    cursor:not-allowed;
    text-shadow:none;
    filter: ~"grayscale(100%)";
    opacity:0.5;

    &:active
    {
      position:relative;
      top:0;
    }
  }
}


/* 
======================================================
Check List
======================================================
*/
span.is-checklist {
  background-color: var(--input-field-background-default);
  color: var(--input-field-text-default);
  border: 1px solid var(--input-field-border-default);
  min-height:20px;
  min-width:4em;
  position:relative;
  overflow-y:auto;

  &:not(.is-readonly):focus {
    background-color: var(--input-field-background-focused);
    color: var(--input-field-text-focused);
    border-color:var(--input-field-border-focused);
  }

  &.is-mandatory {
    background-color: var(--ctrl-mandatory-background);
    border-color: var(--input-field-border-mandatory);

    &:focus {
      background-color: var(--ctrl-mandatory-background-focused);
    }
  }

  /* Textbox used to store value is always hidden */
  > input {
    display:none;
  }

  /* List */
  > ul {
    list-style:none;
    margin:0;
    padding:0;

    > li {
      cursor:pointer;
      font-size:13px;
      min-height:22px;
      line-height:22px;
      padding:0 4px 0 4px;
      vertical-align:baseline;

      &::before {
        content:"\f0c8"; // fa-square
        display:inline-block;
        font-family: fa-light;
        font-size: var(--icon-m);
        font-weight: normal;
        padding-right:4px;
        //vertical-align:bottom;
      }

      &.checked {
        background-color: rgba(0,0,0,0.05);
        color: var(--text-status-info); //darken(@THEME_BGCOLOUR_CONTRAST, 25%);

        &::before {
          content:"\f14a"; // fa-square-check
          color: var(--icon-brand);
          font-family: fa-solid;
        }
      }
    }
  }

  /* Read-Only */
  &.is-readonly {
    background-color:@CTRL_READONLY_BGCOLOUR;
    transition: background-color 0.25s;

    &:focus
    {
      background-color:@CTRL_READONLY_BGCOLOUR;
    }
  } 
}


/*
=======================
Panel Menu + Popup Menu
=======================
*/
/* Panel menu */
div.is-panel-menu
{
  background-color:#ffffff;
  z-index:888888;

  /* Inner container for scrolling */
  > div
  {
    overflow:auto;
    position:absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;

    &.hascaption
    {
      top:@SIDE_PICKER_HEADER_HEIGHT;
    }
  }
}

/* Panel menu + Popup menu */
div.is-panel-menu,
div.is-popup-menu {
  /* Menu Items */
  ul {
    color: var(--text-regular-default, black);
    font-size: var(--font-size-label, 12px);
    font-weight: 600;
    line-height: var(--line-height-label, 16px);
    list-style:none;
    margin:0;
    padding:0;
    position:relative;

    /* Selected Menu Item (most menus do not have this concept but things like the Tasks menu do) */
    > li.selected {
      background-color:lighten(@SEL_BGCOLOUR, 10%);
      color:var(--ctrl-selected-item, white);

      > a {
        font-weight:bold !important;
      }
    }
    > li.selected[itemtype='Normal'] > a:hover {
      // TODO:
      //background-color:darken(@SEL_BGCOLOUR, 5%);
    }

    /* System Item (e.g., for Task Groups) */
    > li:not(.selected).system
    {
      background-color:rgba(0,0,0,0.05);
      color:navy;
    }

    /* Indented Item (e.g., for Task Groups) */
    > li.indent
    {
      > a
      {
        font-size:0.9em !important;
        padding-left:24px !important;
      }
    }

    /* Sub-Menu (i.e., just a heading) */
    > li[itemtype='SubMenu'] > a {
      color: var(--nav-side-action-background-selected, #EA4391);
      cursor:default;
      display:block;
      font-weight:bold;
      margin-top:12px;
      padding: var(--spacing-xs, 0 8px 4px 8px);
      position:relative;
    }

    /* Normal Item */
    > li[itemtype='Normal'] > a {
      cursor:pointer;
      display:block;
      font-weight:normal;
      padding: var(--spacing-xs, 6px 8px 6px 8px);

      &:hover {
        background-color:var(--ctrl-selected-item-background, #5B9DCC);
        color:var(--ctrl-selected-item, white);
        //background-color:@SEL_BGCOLOUR;
        //color:@SEL_COLOUR;
      }

      /* Icon */
      > img {
        height:16px;
        margin-right:8px;
        vertical-align:middle;
        width:16px;
      }

      /* Multi-Instance Button */
      > a.multi-instance {
        border-radius:4px;
        background-color:rgba(0, 0, 0, 0.1);
        display:inline-block;
        height:22px;
        margin-top:-2px;
        position:absolute;
        padding:3px 0 0 4px;
        right:8px;
        width:24px;

        &::before {font-family:isse; font-weight:normal; font-size:16px; opacity:0.5; content:"\E92F";}
        &:hover::before {opacity:1;}
      }
    }

    /* Separator */
    > li[itemtype='Separator'] > a
    {
      border-bottom:1px solid #e0e0e0;
      display:block;
      height:1px;
      margin:4px 8px 4px 8px;
    }

    > li[enabled='false'] > a
    {
      color:#a0a0a0;
      cursor:default;

      > img
      {
        opacity: 0.5;
      }
    }
  }

  /* Caption */
  > div.caption
  {
    background-color: var(--nav-side-action-background-selected, #EA4391);
    color: var(--nav-side-action-icon-selected, #FEFEFE);
    font-size: var(--font-size-body, 20px);
    font-weight:normal;
    height: var(--nav-top-height, 48px);
    left:0;
    line-height: var(--nav-top-height, 48px);
    overflow:hidden;
    padding:0 8px 0 8px;
    position:absolute;
    right:0;
    text-align:left;
    top:0;

    /* Icon */
    > span.icon {
      font-family:isse; 
      font-size:1em; 
      vertical-align:middle; 
      display:inline-block; 
      margin-right:8px;
      position:relative;
      margin-top:-1px;
    }

    /* Close button */
    > a {
      color: var(--nav-side-action-icon-selected, #b2b2b2);
      cursor:pointer;
      line-height: var(--nav-top-height, 48px);
      position:absolute;
      top:0;
      right:8px;

      > span:before
      {
        font-size:20px;
        font-weight:normal;
      }

      &:hover {
        opacity: 1;
      }
    }
  }
}

/* Popup Menu specific */
div.is-popup-menu
{
  /* Menu Items */
  ul > li
  {
    white-space:pre;
  }
}


/* Collapsible Groups Menu */
div.is-panel-menu > .collapsible-groups
{
  padding:4px;

  /* Sub-Menu Heading */
  li.collapsible
  {
    padding:0;
    margin-bottom:1px;

    > a
    {
      background-color:#808080;
      color:white;
      cursor:pointer;
      display:block;
      font-weight:normal;
      margin:0;
      padding:8px;
      position:relative;

      &::after {position:absolute; right:8px; font-family:isse; font-weight:normal; font-size:12px; content:"\E011"; padding-top:3px;}
    }

    /* System Sub-Menu */
    &.system
    {
      > a
      {
        background-color:@THEME_BGCOLOUR_CONTRAST;
      }
    }
  }

  li.collapsible.expanded
  {
    > a::after {content:"\E010";}
  }



  /* Sub-Menu */
  ul.collapsible
  {
  }
}


/*
==========
Popup Menu
==========
*/
div.is-popup-menu {
  background-color: var(--background-default, #F8F8F8);
  border:1px solid var(--modal-border, #003056);
  border-radius: var(--border-1x);
  box-shadow:0 0 8px 2px rgba(0, 0, 0, 0.25);	
  z-index: 999999999999;

  /* Showing animation */
  opacity:0;
  transform:scale(0.9);
  transition:all 0.1s ease-in-out;
  &.active
  {
    opacity:1;
    transform:scale(1);
  }

  div.is-menu-item-glyph
  {
    display:inline-block;
    height:20px;
    margin-right:4px;
    padding:2px;
    vertical-align:middle;
    width:20px;
  }
}


/* 
======================================================
Grouping List
======================================================
*/
span.is-groupinglist {
  display:inline-block;
  min-height:20px;
  min-width:4em;
  position:relative;
  width:100%;

  &:focus {
    background-color: var(--input-field-background-focused);
    border: 1px solid var(--input-field-border-focused);
  }

  /* Textbox used to store value is always hidden */
  > input {
    //display:none;
  }

  /* Lists (general) */
  > div {
    background-color: var(--input-field-background-default);
    color: var(--input-field-text-default);
    border: 1px solid var(--input-field-border-default);
    display: inline-block;
    max-height:240px;
    min-height:240px;
    min-width:20em;
    position:relative;
    overflow-y:auto;
    vertical-align:top;
    width:45%;
    max-width:400px;

    > ul {
      min-height:100%;

      > li  {
        background-color:rgba(0,0,0,0.05);
        border-radius: var(--border-1x);
        cursor:default;
        margin-bottom:2px;
        padding:4px 4px 4px 24px;
        position:relative;
        white-space:pre;

        &.selected {
          background-color: var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button:before {
            color:var(--ctrl-selected-item) !important;
          }
        }

        button {
          background-color:transparent;
          border:1px solid transparent;
          color: var(--text-regular-default);
          cursor: pointer;
          outline:none;
          padding:0;
          position:absolute;
          top:1px;
          width:22px;
          height:23px;
          line-height:23px;
          overflow:hidden;
          text-align:center;

          &:hover {
            background-color:rgba(0,0,0,0.1);
          }
        }
      }
    }
  }

  /* Left list */
  div.left {
    > ul {
      list-style:none;
      margin:0;
      padding:4px 4px 0 4px;
      position:relative;

      > li {
        padding:4px 32px 4px 4px;

        &.selected {
          background-color: var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button {
            color:var(--ctrl-selected-item);
          }
        }

        button {
          right:1px;

          &:hover {
            background-color:rgba(0,0,0,0.1);
          }

          &[action='add'] {
            &:before { font-family:isse; content:"\E0AB"; font-size:12px; }

            /* Responsive */
            @media @SMALL_DEVICE {
              &:before { content:"\E74B"; }
            }
          }
        }
      }
    }
  }

  /* Right list */
  div.right {
    margin-left:8px;

    > ul {
      list-style:none;
      list-style-position:inside;
      margin:0;
      padding:4px 4px 0 4px;
      position:relative;
      counter-reset:item;

      > li {
        padding:4px 4px 4px 24px;
        white-space:pre;

        &:before {
          content: counter(item);
          counter-increment:item;
          color:rgba(0,0,0,0.5);
          font-size:9px;
          margin-right:8px;
          vertical-align:middle;
        }

        &.selected {
          background-color:var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button:before {
            color:var(--ctrl-selected-item) !important;
          }
        }

        button[action='remove'] {
          left:1px;
          font-family:fa-regular; 

          &:before { 
            content: "\f1f8"; // fa-trash
            font-size: 12px; 
            color: var(--text-status-error);
          }

          &:hover {
            font-family:fa-solid; 
          }
        }

        button[action='pagebreak'] {
          background-repeat:no-repeat;
          background-size:16px 16px;
          background-position:center center;
          @filterstring: ~"grayscale(100%)";
          filter:@filterstring;
          opacity:0.3;
          right:1px;
          //&:before { font-family:isse; content:"\E711"; font-size:12px; color: red;}

          &.checked {
            background-color:rgba(0,0,0,0.2);
            border:1px solid rgba(0,0,0,0.3);
            border-radius: var(--border-1x);
            opacity:1;
            @filterstring: ~"grayscale(0%)";
            filter:@filterstring;
          }
        }
      }
    }

    /* Responsive */
    @media @SMALL_DEVICE
    {
      margin-top: 8px;
      margin-left:0;
    }
  }
}

/* Read-Only */
.is-groupinglist.is-readonly {
  button {
    display:none !important;
  }
}



/*
====================
Enquiry Records List 
====================
*/
div.is-enquiry-records-list {
  background-color:#fffff0;
  border:1px solid rgba(0,0,0,0.1);
  margin:4px 0 4px 0;
  padding:4px;
}
ul.is-enquiry-records-list {
  list-style:none;
  margin:0;
  padding:0;

  > li {
    cursor:pointer;
    font-size:12px;
    line-height:24px;
    list-style:none;
    margin:0;
    padding:0;

    &:hover {
      background-color:rgba(0,0,0,0.1);
    }

    &.range-include {
      background-color:rgba(0,255,0,0.1);
      &:hover {
        background-color:rgba(0,255,0,0.2);
      }
    }

    &.range-exclude {
      background-color:rgba(255,0,0,0.1);
      &:hover {
        background-color:rgba(255,0,0,0.2);
      }
    }

    > span.icon {
      display:inline-block;
      width:20px;
      margin-right:4px;

      > img {
        display:inline-block;
        width:16px;
        vertical-align:middle;
      }
    }

    > span.code {
      display:inline-block;
      width:80px;
      margin-right:4px;
    }

    > span.description {
      color: rgba(0,0,0,0.7);
      line-height:20px;
    }
  }
}



/* 
====================================================================================
Grouping List (Widget control, NOT the Parameters Host version on which it is based)
====================================================================================
*/
div.is-widget-groupinglist {
  overflow-y:auto;
}
span.is-widget-groupinglist {
  display:flex;
  flex-direction:row;
  align-items:stretch;
  justify-items:stretch;
  min-height:20px;
  min-width:4em;
  position:relative;
  width:100%;

  /* Responsive */
  @media @SMALL_DEVICE {
    flex-direction:column;
  }

  &:focus {
    background-color: var(--input-field-background-focused);
    border: 1px solid var(--input-field-border-focused);
  }

  /* Lists (general) */
  > div {
    background-color: var(--input-field-background-default);
    color: var(--input-field-text-default);
    border: 1px solid var(--input-field-border-default);
    flex-grow:1;
    display:inline-block;
    max-height:240px;
    min-height:240px;
    min-width:20em;
    position:relative;
    overflow-y:auto;
    vertical-align:top;
    width:45%;
    max-width:400px;

    > ul {
      min-height:100%;

      > li {
        background-color:rgba(0,0,0,0.05);
        border-radius: var(--border-1x);
        cursor:default;
        margin-bottom:2px;
        padding:4px 4px 4px 24px;
        position:relative;
        white-space:pre;

        &.selected {
          background-color: var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button:before {
            color:var(--ctrl-selected-item) !important;
          }
        }

        button {
          background-color:transparent;
          border:1px solid transparent;
          color: var(--text-regular-default);
          cursor: pointer;
          outline:none;
          padding:0;
          //position:absolute;
          //top:1px;
          width:22px;
          height:23px;
          line-height:23px;
          overflow:hidden;
          text-align:center;

          &:hover {
            background-color:rgba(0,0,0,0.1);
          }
        }
      }
    }
  }

  /* Left list */
  div.left {
    > ul {
      list-style:none;
      margin:0;
      padding:4px 4px 0 4px;
      position:relative;

      > li {
        display:flex;
        flex-direction:row;
        align-items:stretch;
        padding:4px;

        &.selected {
          background-color: var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button {
            color:var(--ctrl-selected-item);
          }
        }

        label {
          flex-grow:1;
          overflow:hidden;
        }

        button {
          flex-grow:0;

          &:hover {
            background-color:rgba(0,0,0,0.1);
          }

          &[action='add'] {
            &:before {
              font-family: fa-regular;
              content:"\f061"; // fa-arrow-right
              font-size:12px;
              //color: blue;
            }

            /* Responsive */
            @media @SMALL_DEVICE {
              //&:before { content:"\E74B"; }
            }
          }
        }
      }
    }
  }

  /* Right list */
  div.right {
    margin-left:8px;

    > ul {
      list-style:none;
      list-style-position:inside;
      margin:0;
      padding:4px 4px 0 4px;
      position:relative;
      counter-reset:item;

      > li {
        display:flex;
        flex-direction:row;
        align-items:stretch;
        padding:4px;
        white-space:pre;

        &:before {
          content: counter(item);
          counter-increment:item;
          color:rgba(0,0,0,0.5);
          font-size:9px;
          margin-right:8px;
          line-height:22px;
          vertical-align:middle;
        }

        &.selected {
          background-color:var(--ctrl-selected-item-background);
          color:var(--ctrl-selected-item);

          button:before {
            color:var(--ctrl-selected-item) !important;
          }
        }

        label {
          flex-grow:1;
          overflow:hidden;
        }

        button {
          flex-grow:0;
        }

        button[action='remove'] {
          order:-1;
          font-family:fa-regular; 

          &:before { 
            content: "\f1f8"; // fa-trash
            font-size: 12px; 
            color: var(--text-status-error);
          }

          &:hover {
            font-family:fa-solid; 
          }
        }

        button[action='moveup'] {
          &:before {
            font-family: fa-regular;
            content:"\f062"; // fa-arrow-up
            font-size:12px;
            //color: blue;
          }
        }

        button[action='movedown'] {
          &:before {
            font-family: fa-regular;
            content:"\f063"; // fa-arrow-down
            font-size:12px;
            //color: blue;
          }
        }

        button[action='pagebreak'] {
          background-repeat:no-repeat;
          background-size:16px 16px;
          background-position:center center;
          @filterstring: ~"grayscale(100%)";
          filter:@filterstring;
          opacity:0.3;

          &.checked {
            background-color:rgba(0,0,0,0.2);
            border:1px solid rgba(0,0,0,0.3);
            border-radius: var(--border-1x);
            opacity:1;
            @filterstring: ~"grayscale(0%)";
            filter:@filterstring;
          }
        }
      }
    }

    /* Responsive */
    @media @SMALL_DEVICE {
      margin-top: 8px;
      margin-left:0;
      display:block;
    }
  }
}

/* Read-Only */
.is-widget-groupinglist.is-readonly {
  button {
    display:none !important;
  }
}


/*
 ==========
 Addressing
 ==========
*/
.is-google-address-search  {
  gmp-place-autocomplete {
    height: 32px !important;
  }
  
}


/*
==========================================
Grid (identical between fincc and widgets)
==========================================
*/
div.is-grid-container:not(.is-nostyle) {
  color: var(--text-regular-default);
  background-color: var(--ctrl-grid-overflow-background);
  border: 1px solid var(--input-field-border-default);
  display:flex; display:-webkit-box; display:-webkit-flex;
  flex-direction:column; -webkit-flex-direction:column;
  flex:auto; // FIX: Make this flex otherwise Chrome does not fill to 100% height of non-modal body
  position:relative;
  outline:none !important;


  // ----
  // Grid
  // ----
  > div.is-grid {
    color: var(--ctrl-grid-text);
    cursor: default;
    flex:1 100%; -webkit-flex:1 100%;
    font-size: 13px;
    overflow-x:auto;
    position:relative;
    -webkit-overflow-scrolling:touch;
    outline:none !important;
    flex:auto; // FIX: Make this flex otherwise Chrome does not fill to 100% height of non-modal body

    > table.is-grid {
      border-collapse: collapse;
      width: 100%;

      /* Fixed width */
      &.fixedwidth {
        table-layout:fixed;

        > tbody > tr > td,
        > thead > tr > th {
          overflow-x:hidden;
          text-overflow:ellipsis;

          &.is-grid-col-action {
            width:32px;
            text-align:center;
          }

          &.is-grid-col-icon {
            width:32px;
          }
        }
      }

      // Row Action Cells (hidden by default)
      // TODO: Review since these may only be used on the Notifications and Bookmarked/ Recent menus
      > thead > tr > th.is-grid-col-action,
      > tbody > tr > th.is-grid-col-action,
      > thead > tr > td.is-grid-col-action,
      > tbody > tr > td.is-grid-col-action {
        display: none;
        visibility: hidden;
      }
      &.show-row-actions > thead > tr > th.is-grid-col-action,
      &.show-row-actions > tbody > tr > th.is-grid-col-action,
      &.show-row-actions > thead > tr > td.is-grid-col-action,
      &.show-row-actions > tbody > tr > td.is-grid-col-action {
        display: table-cell;
        visibility: visible;
      }

      // Heading Cells
      > thead > tr > th,
      > tbody > tr > th {
        &:extend(.label-semibold);
        padding: var(--spacing-xs);
        background-color: var(--ctrl-grid-header-background);
        line-height: var(--line-height-body) !important;

        background-color: var(--ctrl-grid-header-background);
        border-top: none;
        //font-weight: 600;
        //padding: var(--spacing-xs);
        text-align: left;
        white-space: nowrap;

        /* Sorting */
        &.sortable {
          background-clip:padding-box; /* Stops cell borders being hidden when positioned relative */
          padding-right:28px !important;
          text-wrap:none;

          /* Sorted */
          &.sorted {
            > div.sorter,
            > div.sorter:hover {
              background-color:rgba(0,0,0,0.1);

              &::after {
                font-family: fa-solid !important;
                color: var(--ctrl-grid-sorted-icon);
              }
            }
          }
          &.sorted-desc {
            > div.sorter:after {
              content:"\f062";
            }
          }


          /* Sorter */
          > div.sorter {
            color: var(--ctrl-grid-sorter-icon);
            cursor:pointer;
            height:22px;
            line-height:22px;
            font-family: fa-light;
            float:right;
            margin-right:-23px;
            overflow:hidden;
            text-align:center;
            width:20px;

            &:hover {
              background-color:rgba(0,0,0,0.1);
            }

            &:after {
              font-size:11px;
              font-weight:normal !important;
              content:"\f063";
              text-align:center;
            }
          }
        }

        /* Row number/ selector cell */
        &.rowselector {
          background-repeat:no-repeat;
          background-size:16px;
          background-position:center center;
          min-width:16px;
          width:24px;
        }

        &:first-child {
          border-left: none;
        }

        &:last-child {
          border-right: none;
        }


        /* Select all/ none Checkbox */
        &.rowselector > span.is-checkbox {
          border:0px solid white !important;
          display:inline-flex;
          margin:0 2px 0 0;
          color:red !important;

          > label {
            border:none !important; // Cancel out focus rectangle

            &:before {
              opacity:0.5;
            }
          }
        }

        &.rowselector > span.is-checkbox:hover > label:before {
          opacity:1;
        }
      }

      // Heading Cells (thead only)
      > thead > tr > th {
        &:hover {
          background-color: var(--ctrl-grid-header-background-hover) !important;
        }
      }

      /* Cells */
      > tbody > tr > td {
        padding: var(--spacing-xs);
        border-bottom:1px solid var(--ctrl-grid-cell-border);//rgba(0,0,0,0.175);

        &:first-child {
          border-left: none;
        }

        &:last-child {
          border-right: none;
        }

        /* Read-Only */
        &.readonly {
          background-color: var(--ctrl-grid-readonly-cell-background, #fff0f0);
        }

        /* Special */
        &.spin-icon-3d {
          > img {
            animation: spin3d 2s infinite;
          }
        }

        /* Hide AI summaries by default */
        div.is-ai-grid-cell {
          display:none;
        }

        /* Row number/ selector cell */
        &.rowselector {
          background-color: var(--ctrl-grid-header-background);
          border-right-width: 2px;
          font-size:9px;
          min-width:20px;
          white-space:nowrap;

          // To allow flex layout for better alignment
          > div {
            display: flex;
            flex-direction: row;
          }

          /* Numbering */
          span.rownumber {
            color: var(--text-status-info);
            align-content: center;
          }

          /* Selector Checkbox */
          span.is-checkbox {
            display:inline-block;
            margin:2px 2px 0 0;
            color:red !important;

            > label {
              line-height:20px;
              height:20px;
              margin-left:0;
              border:none !important; // Cancel out focus rectangle

              &:before {
                //background-color:white !important;
                //border-radius:4px !important;
              }
            }
          }

          /* Icon */
          &.icon { 
            background-repeat:no-repeat;
            background-position: right 4px center;
            background-size:12px;
            padding-right:40px;
            min-width:44px;
          }
        }

        /* Cell hyperlink */
        a:not(.nostyling):not(.is-drilldown-button) {
          .code-link-button();

          white-space: nowrap;
        }
        > a {
          cursor:pointer;
          text-decoration:none;
        }

        /* Inline cell actions list (e.g., downloadable files) */
        ul.cell-inline-actions {
          display:block;
          list-style:none;
          margin:4px 0 0 0;
          padding:0;

          > li {
            border-radius: var(--border-1x);
            display:inline-block;
            margin:0 2px 0 2px;
            cursor:pointer;
            font-weight:normal;
            font-size: var(--font-size-small-caption);
            height:20px;
            line-height:18px;
            outline:none;
            overflow-y:hidden;
            padding:0 8px 0 8px;

            background-color:rgba(0, 0, 0, 0.075);
            border:1px solid rgba(0, 0, 0, 0.125);
            text-align:center;
            text-decoration:none;
            transition:background-color 0.1s;

            &:hover {
              background-color:rgba(0, 0, 0, 0.15);
              border:1px solid rgba(0, 0, 0, 0.175);
              transition:background-color 0.1s;
            }

            > img {
              width:12px;
              height:12px;
              margin-top:3px;
            }

            /* Delete action */
            &.delete {
            }

            /* Document action (e.g., a PDF icon) */
            &.document {
              background-repeat:no-repeat;
              background-size:32px;
              background-position:center 18px;

              height:56px;
              min-width:40px;
              overflow:hidden;

              &.small {
                background-size:16px;
                background-position:2px center;
                padding-left:24px;
                line-height:22px;
                height:24px;
              }
            }
          }
        }

        /* Prevent line break */
        &.nobreak {
          white-space:nowrap;
        }
      }

      > tbody > tr {
        background-color: var(--ctrl-grid-background);

        /* Row Striping (applied in code to account for hidden rows and group headers) */
        &.even {
          background-color: var(--ctrl-grid-background);
        }
        &.odd {
          background-color: var(--ctrl-grid-background-alt);
        }

        /* Hidden Row */
        &.hidden {
          display:none;
        }

        /* Inactive Row */
        &.inactive {
          color: var(--text-regular-tertiary);
        }

        /* Range inclusion/ exclusion */
        &.range-include,
        &.range-include > td {
          color:white;
          background-color:#32CD32;
        }
        &.range-include.is-sel,
        &.range-include.is-sel > td {
          background-color:darken(#32CD32, 10%);
        }
        &.range-exclude,
        &.range-exclude > td {
          color:white;
          background-color:#FF0000;
        }
        &.range-exclude.is-sel,
        &.range-exclude.is-sel > td {
          background-color:darken(#FF0000, 10%);
        }
        &.range-include td.rowselector:before {
          font-family:isse; font-weight:bold; font-size:10px; content:"\E10B"; color: rgba(0,0,0,0.4); position:relative; left:2px; top:2px;
        }
        &.range-exclude td.rowselector:before {
          font-family:isse; font-weight:bold; font-size:10px; content:"\E10A"; color: rgba(0,0,0,0.4); position:relative; left:2px; top:2px;
        }

        /* Ensure included/ excluded Range item is always visible */
        &.range-include.hidden,
        &.range-exclude.hidden {
          display:table-row;
          visibility:visible;

          > td {
            background-color:lightgreen !important;
            display:table-cell;
            visibility:visible;
            font-size:0.8em !important;
          }
        }
        &.range-exclude.hidden > td {
          background-color:lightpink !important;
        }

        /* Strikethrough Row (but not drilldown button) */
        &.strike {
          > td:not(.is-grid-col-drilldown) {
            text-decoration:line-through;
          }
        }

        /* Special row 1 */
        &.special1 {
          //TODO:
          color:darkgreen;
        }

        /* Special row 2 */
        &.special2 {
          background-color: var(--background-special-1);
        }

        /* Expired (e.g., altered in Task View so cannot perform any actions) */
        &.expired > td:not(.rowselector) {
          background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.1), rgba(0,0,0,0.1) 4px, rgba(255,255,0,0.1) 4px, rgba(255,255,0,0.1) 8px);
        }

        /* Expired Generations (e.g., marked as having been previously expired in Task View) */
        //TODO: (or ignore since these were only used in the now deprecated Tasks view)
        &.expiredGeneration1 > td.rowselector
        {
          border-right:4px solid #ff4cff !important;
        }
        &.expiredGeneration2 > td.rowselector
        {
          border-right:4px solid #ffa500 !important;
        }
        &.expiredGeneration3 > td.rowselector
        {
          border-right:4px solid #ffb732 !important;
        }
        &.expiredGeneration4 > td.rowselector
        {
          border-right:4px solid #ffc966 !important;
        }
        &.expiredGeneration5 > td.rowselector
        {
          border-right:4px solid #ffdb99 !important;
        }

        /* Selected row (i.e., selected with checkbox selector) */
        &.selected,
        &.row-selected {
          & > td {
            background-color: var(--ctrl-grid-selected-row-background) !important;
          }

          &.is-sel {
            // TODO:
            //background-color: darken(var(--ctrl-selected-item-background), 10%) !important;
          }

          & > td.rowselector {
            background-color: var(--ctrl-grid-header-background);
          }
        }

        /* Group Header */
        &.group-header {
          background-color: var(--background-default);
          color: var(--nav-side-action-background-selected);
          font-weight: bold;
          font-size: var(--font-size-caption);

          > td {
            box-shadow:inset 1px 1px 2px rgba(0,0,0,0.1);
            padding:4px 4px 4px 8px;
            position:relative;

            > div.group-header {
              display:flex;
              flex-direction:row;
              align-content:stretch;

              > div.caption {
                flex-grow:1;
                overflow:hidden;

                > div.count {
                  display:inline-block;
                  font-size:10px;
                  font-weight:normal;
                  margin-left:8px;
                }
              }

              > div.collapse-expand {
                cursor:pointer;
                flex-grow:0;
                transform-origin:50% 50%;
                transition:all ease-in-out 0.15s;

                &::before {
                  font-family: fa-regular;
                  font-size: 14px;
                  font-weight: normal;
                  content: "\f078"; // fa-chevron-down
                }

                &.collapsed {
                  transform:rotate(-180deg);
                }
              }
            }
          }
        }

        /* Related row (e.g., for Logs grids */
        &.related {
          background-color:#CCEAFF !important;
          color: rgba(0, 0, 0, 0.75) !important;
        }

        /* Template Row (widgets only) */
        &.templaterow {
          > td.rowselector {
            span.templaterow {
              display: flex;

              &:before {
                cursor: pointer;
                font-family: fa-solid;
                content: "\002a"; // fa-asterisk
              }
            }
          }
        }

        /* Selected Row (i.e., active row) */
        &.is-sel {
          background-color: var(--ctrl-selected-item-background);
          color: var(--ctrl-selected-item);

          /* Must colour cell content otherwise, depending on colour, it might not be readable */
          > td {
            background-color: var(--ctrl-selected-item-background) !important;
            color: var(--ctrl-selected-item) !important;

            > button.is-actionslist-button {
              color: var(--ctrl-selected-item) !important;
            }

            /* Show AI summaries */
            div.is-ai-grid-cell {
              display: block;
              position: absolute;

              & > div {
                background-color: var(--background-default);
                border-radius: var(--border-1x);
                box-shadow:1px 2px 4px 2px rgba(0, 0, 0, 0.2);
                color: var(--text-regular-default);

              }
            }
          }

          /* Row number/ selector cell */
          > td.rowselector {
            // TODO:
            //background-color: darken(var(--ctrl-selected-item-background), 10%);
            color: var(--ctrl-selected-item);
          }

          /* Cell hyperlink */
          > td > a {
            //border-color:rgba(255, 255, 255, 0.25);
            //color:yellow;

            &:hover {
              //background-color:rgba(255, 255, 255, 0.15);
            }
          }

          > td.readonly {
            // TODO:
            //background-color:darken(var(--ctrl-selected-item-background), 10%) !important;
          }

          /* Document action (e.g., a PDF icon) */
          ul.cell-inline-actions > li
          {
            //TODO:
            border-color:rgba(255,255,255,0.2) !important;
            color:white !important;
          }

          /* Selected Cell */
          > td.selected {
            //TODO:
            background-color:#4C7E99 !important;
          }

          > td.is-sel {
            //TODO:
            background-color:#5A92BC;
            box-shadow:inset 0 0 0 2px #FFE0E0;

            &:last-child {
              border-right:1px; /* Prevent horizontal scroll bars when last column is selected and grid is full width */
            }

            &.editable {
              //TODO:
              box-shadow:inset 0 0 0 2px limegreen;
              background-color:#3B978E;
            }
          }
        }

        /* Flash, i.e., temporarily highlight a row */
        &.flash {
          > td         {
            background-color: var(--background-special-1) !important;
            //TODO:
            color: black !important;
            transition:ease-in-out all 0.5s;
          }
        }
      }

      /* Column Types */
      /* Action */
      .is-grid-col-action
      {
        margin:0;
        padding:0;
        white-space:nowrap;
        width:24px; // Fixed width table MUST specify a column width!
        &:hover { background-color: rgba(0,0,0,0.1); }

        button.is-action-button
        {
          background-color:transparent;
          border:none;
          cursor:pointer;
          height:24px;
          line-height:24px;
          margin:0;
          overflow:hidden;
          outline:none;
          padding:0;
          width:24px;

          > img
          {
            width:16px;
            height:16px;
          }
        }

        /* Known action styles (isuserinterface_grid.js will exclude caption text where necessary) */
        button.is-action-button.Delete
        {
          color:red;
          height:100%;
          &:before {font-family:isse; font-weight:bold; content:"\E711";}
        }
      }

      /* Actions List */
      td.is-grid-col-actionslist
      {
        margin:0;
        padding:0;
        white-space:nowrap;
        width:24px; // Fixed width table MUST specify a column width!
        &:hover { background-color: rgba(0,0,0,0.1); }

        button.is-actionslist-button
        {
          background-color:transparent;
          border:none;
          cursor:pointer;
          height:24px;
          line-height:24px;
          margin:0;
          overflow:hidden;
          outline:none;
          padding:0;
          width:24px;
          -webkit-transform: rotate(90deg); transform: rotate(90deg);

          &::before {font-family:isse; font-weight:normal; content:"\E10C"; font-size:16px;}
        }
      }

      /* Boolean */
      .is-grid-col-boolean
      {
        text-align: center;

        &.is-grid-col-boolean-false,
        &.is-grid-col-boolean-true
        {
          font-size: 1.5em;
          line-height: 1px;
          padding: 0;
        }

        &.is-grid-col-boolean-false
        {
          color:#CC4C33;
        }

        &.is-grid-col-boolean-true
        {
          color:#23AE76;
        }
      }

      /* Date */
      .is-grid-col-date
      {
        text-align: right;
      }

      /* Date/Time */
      .is-grid-col-datetime
      {
        text-align: right;
        white-space:nowrap;
      }

      /* Currency */
      .is-grid-col-currency
      {
        text-align: right;
      }

        /* Percentage */
      .is-grid-col-percentage
      {
        text-align: right;
      }

      /* Drilldown */
      .is-grid-col-drilldown {
        padding:2px;
        text-align:center;
        text-decoration:none;

        > a:not(.is-drilldown-button) {
          border:none;
        }

        /* Button */
        a.is-drilldown-button:not(.icon) {
          background-color: none !important;
          color: var(--text-regular-default);
          cursor:pointer;
          margin:0;
          outline:none;
          padding:0 4px 0 4px;
          display: inline-block;
          opacity: 0.75;
          min-width:16px;
          text-align: center;

          &:hover {
            opacity: 1;
          }

          &:before {
            color: var(--text-brand-primary);
            content: "\f142"; // fa-ellipsis-vertical
            font-family: fa-solid;
            font-weight: normal;
            font-size: var(--font-size-body);
            //line-height: 16px;
          }

          &:hover {
            color: var(--text-brand-primary);
            //background-color:lighten(@FORM_HEADING_BGCOLOUR, 25%);
            //border:1px solid darken(@FORM_HEADING_BGCOLOUR, 10%);
            //box-shadow:2px 2px 2px rgba(0,0,0,0.125);
            //text-decoration:none;
          }
        }
      }
      a.is-drilldown-button.icon {
        cursor:pointer;
        padding:6px 2px 2px 2px;
      }

      /* Icon */
      .is-grid-col-icon
      {
        text-align: center;
        width:30px;

        > img, > a > img
        {
          height:16px;
          vertical-align:middle;
          width:16px;
        }
      }

      /* Integer */
      .is-grid-col-integer
      {
        text-align: right;
      }

      /* String */
      .is-grid-col-string
      {
        /* Cell hyperlink */
        > a
        {
          display: inline-block;
          width:100%;
        }
      }

      /* Cell hidden (by Grid Script code)*/
      .cellhidden
      {
        display:none;
        visibility:hidden;
      }
    }

  }


  // ---------------
  // Collapsed group
  // ---------------
  table.is-grid tr.group-collapsed {
    display:none;
    visibility:hidden;
  }


  // ---------------------------------------------
  // Layouts bar (e.g., Account Transactions grid)
  // ---------------------------------------------
  .is-layouts-bar {
    background-color: var(--ctrl-grid-header-background);
    padding: var(--spacing-xxxs);
    padding-bottom: 0;
    border-bottom: 1px solid var(--input-field-border-default);

    > ul {
      font-size: 0; // Gets around unwanted space between items on different lines
      list-style: none;
      margin: 0;
      padding: 0;
      user-select: none;

      &:before {
        font-family: fa-regular;
        font-size: 16px;
        font-weight: normal;
        content: "\e290"; // fa-table-layout
        line-height: 16px;
        padding-right: 4px;
        position: relative;
        top: 2px;
      }

      > li {
        background-color: rgba(0,0,0,0.075);
        border-radius: 4px;
        display: inline-block;
        font-size: 11px;
        margin: 0 4px 4px 0;

        &:hover {
          background-color: rgba(0,0,0,0.125);
        }

        > a {
          //color: darken(@THEME_BGCOLOUR_CONTRAST, 30%);
          cursor: pointer;
          display: block;
          line-height: 16px;
          padding: 2px 4px 2px 4px;
        }

        &.custom > a {
          color: var(--color-status-informative-500);
        }

        &.selected {
          background-color: var(--text-brand-secondary);
          animation: pop 0.3s;

          > a {
            color: var(--text-regular-invert);
          }
        }
      }
    }
  }


  // -----------------------
  // Search box (filter row)
  // -----------------------
  > div.is-grid-search {
    height:28px;
    min-height:28px;
    flex-grow:0;

    &.hidden {
      display:none;
    }
  }


  // ----------------------------------------
  // Grid caption (e.g., hidden rows message)
  // ----------------------------------------
  .is-grid-caption {
    background-color: #ffffe0;
    box-shadow:0 -2px 2px rgba(0,0,0,0.125);
    color: black;
    cursor:default;
    flex: none;
    font-size: 12px;
    min-height: 1px;
    overflow:hidden;
    padding:8px 28px 8px 8px;
    position: relative;
    text-align:right;

    /* Close Button */
    .close {
      color:rgba(0, 0, 0, 0.25);
      cursor:pointer;
      display:block;
      font-size:16px;
      line-height:24px;
      height:24px;
      position:absolute;
      text-align:center;
      top:4px;
      right:2px;
      transition:color 0.2s;
      width:22px;

      &:hover {
        color:rgba(0, 0, 0, 0.5);
        transition:color 0.2s;
      }
    }
  }
}


// ---------------------------
// Grid button strip
//
// NOTE: Also used by TreeView
// ---------------------------
.is-grid-buttons {
  background-color: var(--ctrl-grid-header-background);
  //box-shadow: 0 -2px 2px rgba(0,0,0,0.125);
  color: var(--ctrl-grid-text);
  cursor: default;
  flex: none;
  font-size: 12px;
  min-height: 1px;
  overflow: hidden;
  padding:2px;
  position: relative;

  > ul {
    display:block;
    list-style:none;
    margin:0 2px 0 0;
    padding:0;

    // Group (if button strip contains separators)
    &.group {
      //background-color: rgba(0,0,0,0.05);
      border: 2px solid transparent; //rgba(0,0,0,0.10);
      border-radius: var(--border-1x);
      display: inline-block;
      padding: 0;
    }

    > li {
      display:inline-block;
      height:32px;
      margin:0 2px 0 0;
      padding:0 0 0 0;
      position:relative;
      vertical-align:middle;

      &:last-child {
        margin-right:0;
      }

      /* System buttons, e.g., refresh and actions float to the left */
      &.system {
        float:left;
      }

      > button {
        border:none !important;
        border-radius: var(--border-1x);
        background-size:16px 16px !important;
        color: var(--ctrl-grid-text) !important;
        font-size: var(--font-size-caption);
        height:32px;
        margin:0;
        //border-right:1px solid rgba(0, 0, 0, 0.1);

        &.is-button.normal {
          background-color: var(--ctrl-grid-background);
          //background-color:lighten(@FORM_HEADING_BGCOLOUR, 7.5%);
          //border:1px solid darken(@FORM_HEADING_BGCOLOUR, 2%);
          //color:@BTN_NORMAL_COLOUR;

          &:hover {
            background-color: var(--ctrl-grid-cell-border);
            //border:1px solid darken(@FORM_HEADING_BGCOLOUR, 10%);
            //box-shadow:2px 2px 2px rgba(0,0,0,0.125);
          }

          &.icon:not(:empty) {
            background-position:6px center;
            padding-left:28px;
          }
        }

        &.auto-hide-caption {
          /* Responsive */
          @media @SMALL_DEVICE
          {
            color:transparent !important;
            width:32px;
            overflow:hidden;
          }
        }
      }
    }
  }
}



// ==================
// Grid Edit controls
// ==================
div.is-grid-container:not(.is-nostyle) {
  div.grid-cell-editor {
    background-color:white;
    border:2px solid limegreen !important;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);

    input {
      border-radius:0 !important;
    }

    span[controltype='numberbox'] {
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;

      > input {
        border-radius:0 !important;
        border:none !important;
        box-shadow:none !important;
        position:absolute;
        top:0;
        left:0;
        width:100%;
        height:100% !important;
        max-height:unset !important;
      }
    }
  }
}



// Testing