/* Import CGI standard styles */
@import url('cgi_colorpalette.css');

/* Loading base style imports */
@import url('webui_base.css');

:root {
  --font-color: black;
  --font-family: 'Source Sans Pro', Arial, monospace;

  /* Portal specific variables */
  --navbar-shadow: 0 0.25rem 0.25rem -0.125rem rgba(0, 0, 0, 0.25);
  --nav-button-border: 0.0625rem solid rgb(200, 200, 200);
  --nav-button-radius: 0.5rem;
  --header-text: var(--cgi-color-purple-1);
  --color-container-hover: #e6e3f3;
  /*--cgi-dark-blue: #0C0243;*/
  --cgi-dark-blue: #100169;
  /*--cgi-button-hover: #5236ab;*/
  --cgi-button-hover: #7755bc;
  --cgi-dark-hover: #1c1c1f;
  --cgi-warning: #f1a425;
  --cgi-alert: #b00020;
  --cgi-confirmation: #128354;
  --input-border: var(--table-border-size) rgb(190, 190, 190);
}

/* Googlen fontit tallennettu kansion juureen lokaalisti ja edited polut, meni kasetti */
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZYokSdh18Smxg.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZYokSds18Q.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZMkids18Q.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDI.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZY4lCds18Q.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZclSds18Q.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKwdSBYKcSV-LCoeQqfX1RYOo3qPZZklyds18Q.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKydSBYKcSV-LCoeQqfX1RYOo3i94_wlxdu.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdu.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/WebUI/resources/source-sans-pro/6xKydSBYKcSV-LCoeQqfX1RYOo3iu4nwlxdu.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

html,
body {
  overflow: auto;

  .bold {
    font-weight: 600;
  }
  .sfont {
    font-size: 0.9rem;
  }
  .lfont {
    font-size: 2rem;
  }
  .font1 * {
    font-size: 1rem;
  }
  .font2 * {
    font-size: 1.2rem;
  }
  .font3 * {
    font-size: 1.3rem;
  }
  .font4 * {
    font-size: 1.4rem;
  }
  .font5 * {
    font-size: 1.5rem;
  }

  a {
    color: var(--cgi-dark-blue);
    text-decoration: none;
    margin-left: unset;
    font-weight: 600;
  }

  a:hover {
    text-decoration: underline;
  }

  ::selection {
    background: var(--cgi-color-purple-hex) !important;
    color: white !important;
  }

  .announcement {
    & .lblReadOnly {
      user-select: none;
    }
  }
}
div.announcement:first-child h2 {
  margin-top: 0 !important;
}

.page-container > h2:first-of-type {
  margin-top: 0 !important;
}

.page-container > .grid-container:first-child {
  margin-top: 0 !important;
}

/* Font Awesome */
.svg-inline--fa {
  display: inline-block;
  font-size: inherit;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}

h1 {
  font-size: 1.1rem;
  line-height: 1.2rem;
  color: var(--font-color);
  font-weight: 600;
  color: white;
}

.loginbar h1 {
  color: var(--cgi-dark-blue);
}

.logintitleclient {
  font-size: 1.65rem;
  line-height: 1.75rem;
  color: var(--font-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 3rem;
  text-align: center;
}

/* ---------------------------------------------------
   PAGE CONTAINER STYLE
----------------------------------------------------- */

#data {
  display: block;
  position: relative;
  width: 100%; /*100svw;*/
  height: 100%;
  max-height: calc(100svh - 3rem);
  transition: 0s max-height;
  top: 0;
  justify-content: center;
  box-sizing: border-box;
  overflow: visible;

  #window-container {
    justify-content: center;
    display: flex;
    position: relative;
    z-index: 0;
    width: auto;
    /*max-width: max-content;*/
    min-height: 100svh;
    flex-grow: 1;
    transition:
      0.5s,
      0s padding,
      0.45s padding-left;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: flex-start;
    align-items: baseline;
    box-sizing: inherit;
    margin: auto;
    max-width: 77.5rem;

    opacity: 1;
    &.hide {
      opacity: 0;
    }
    &.instant {
      .window.open {
        transition:
          max-width 0.5s,
          max-height 0.5s,
          opacity 0.5s;
      }
      .window {
        transition: 0s !important;
        & .content > .page-container {
          transition: 0s !important;
        }
      }
    }
  }
}

/* ---------------------------------------------------
    REGISTRATION WINDOW
----------------------------------------------------- */

#registration {
  opacity: 0;
  background: white;
  transition: 0.5s;
  width: 0%;
  height: 0%;
  max-width: 0%;
  max-height: 0%;
  margin: 0;
  /*
	min-width: 98svw;
	min-height: 40svh;*/
  border-radius: 0rem;

  &.open {
    opacity: 1;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-height: 100%;
    /*min-width: 98svw;*/
    /*box-shadow: 0 0.063rem 0.525rem 0.125rem rgba(0,0,0,0.33);*/
  }
}

/* ---------------------------------------------------
    WINDOW
----------------------------------------------------- */

.window {
  opacity: 0;
  background: white;
  transition: 0.5s;
  width: 0%;
  height: 0%;
  max-width: 0%;
  max-height: 0%;
  border-radius: 0rem;
  margin: 0 !important;
  box-shadow: none !important;

  &.open {
    opacity: 1;
    width: 100%;
    min-height: 100svh;
    max-width: 100%;
    box-shadow: var(--window-shadow);
  }

  > .content > .page-container {
    padding: 2rem 2.5rem;
    /*padding: 0 2.5rem;*/

    &:has(.breadcrumb-container) {
      padding-top: 0.75rem;
    }
  }

  .footer:empty,
  .footer:has(.left:empty):has(.middle:empty):has(.right:empty) {
    border: none;
    height: 0rem;
    padding: 0rem;
    min-height: 0rem;
    height: 0rem !important;
  }

  .footer {
    height: 4.75rem !important;
    padding: 0rem 1.25rem !important;
    align-items: center !important;

    * {
      grid-column-gap: 1.125rem !important;
    }
  }

  .lblInput,
  .helptext,
  select,
  input {
    font-size: 1.2rem !important;
  }

  .helptext {
    font-size: 1.1rem;
  }

  .dialog {
    background: rgba(0, 0, 0, 0);
    position: absolute;
    width: 100%;
    top: var(--window-header-height);
    height: calc(100% - (var(--window-header-height) + var(--window-footer-height)));
    z-index: -5;
    transition: 0.35s background;
    overflow: visible;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;

    &:has(.prompt) {
      top: 0;
      height: 100%;
    }
    &:has(div) {
      z-index: 1000;
    }
    &.open {
      background: rgba(0, 0, 0, 0);
      &:has(.prompt) {
        background: rgba(0, 0, 0, 0.25);
        pointer-events: all;
      }

      > div {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        transition:
          0.35s transform,
          0.35s opacity;
      }
    }

    > div {
      background: var(--content-blur);
      backdrop-filter: var(--blur);
      position: absolute;
      opacity: 0;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0);
      transition:
        0.35s transform,
        0.35s opacity;
      overflow: hidden;
      box-shadow: 0rem 0.438rem 1.125rem -0.25rem rgba(0, 0, 0, 0.5) !important;
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      overflow: hidden;
      max-height: 100%;
      z-index: 1000;
      pointer-events: all;

      .header {
        background: var(--headrow-background);
        border-top: var(--headrow-before-border);
        border-left: var(--headrow-before-border);
        border-bottom: var(--headrow-border-bottom);
        border-radius: 0px;
        width: auto;
        /*display: block;*/
        box-sizing: border-box;
        color: var(--font-color);
        text-shadow: var(--font-color-shadow);
        font-size: 1.25rem;
        font-weight: 500;
        padding: 0 0.75rem;
        margin: 0;
        line-height: 2.5rem;
        min-height: 2.5rem;
        background: transparent;
      }

      .content {
        padding: 0.5rem 1rem;
        line-height: 2rem;
        height: max-content;
        min-height: 2rem;
        border-bottom: var(--headrow-border-bottom);
        background: transparent;

        input {
          padding: 0 1rem;
          border: var(--border-width) solid var(--border);
          border-radius: var(--input-radius);
          box-sizing: border-box;
          overflow: hidden;
          height: var(--input-height);
          max-height: var(--input-max-height);
          font-size: 1.25rem;
          max-width: 9rem;
          text-align: center;
        }
      }

      .footer {
        background: transparent;
        border-top: var(--headrow-before-border);
        border-left: var(--headrow-before-border);
        border-bottom: var(--headrow-border-bottom);
        display: flex;
        grid-column-gap: 0.5rem;
        padding: 0.25rem 0.75rem;
        justify-content: center;
      }
    }
  }
}

/* .cgi-button { font-size: 1.125rem; min-width: 5.5rem; } */
.cgi-button {
  font-family: var(--font-family);
  font-size: 1.2rem;
  font-weight: 600;
  min-width: 5.5rem;
  background: var(--cgi-dark-blue);
  color: white;
  border: none;
  padding: 0.6rem 1.375rem;
}
.cgi-button:not(.tile) {
  width: fit-content; /* Make button fit content */
}
.cgi-button:hover {
  background: var(--cgi-button-hover);
}
.login-btn:hover {
  background: var(--cgi-button-hover) !important;
}

.cgi-button.tile {
  border-radius: var(--input-radius);
  padding: 1.7rem 0.75rem;
  font-size: 1.3rem;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Ensure long words break */
  text-align: center; /* Optional: Center-align the text */
  > .button-text {
    flex-grow: 1;
  }
}

.cgi-button.tile svg {
  margin-right: 2rem;
}

.cgi-button.tile:hover {
  background-color: var(--cgi-dark-hover);
}

.cgi-button.tile:focus {
  background-color: var(--cgi-dark-hover);
}

.cgi-button.tile:hover svg {
  right: 1.75rem; /* Move slightly to the left when the button is hovered */
}

@media (max-width: 60rem) {
  /* Adjust the max-width as needed */
  .grid.tile {
    grid-template-columns: repeat(2, 1fr); /* Ensure this matches your grid layout */
  }

  .grid.tile .cgi-button.tile {
    padding: 1.3rem 0.75rem;
  }
}

.portal-info-card-container {
  margin: 0.25rem;
  font-size: 1.1rem;
  line-height: 1.6rem;

  & .lblPortalInfoCardLabel {
    font-weight: 600;
  }

  & .lblPortalInfoCardValue {
    user-select: text;
  }
}

.infocard-font-big {
  font-size: 1.3rem;
}

h2 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
  color: var(--cgi-dark-blue);
  padding: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.policy-container h2 {
  font-size: 1.5rem;
}

.policy-container p {
  margin-bottom: 2.25rem;
}

/* ---------------------------------------------------
    MODAL
----------------------------------------------------- */

.window.open {
  & .modal {
    border-radius: 0;

    & .header {
      border-bottom: var(--content-border-height) solid var(--content-border-color);
    }
    & .footer {
      border-top: var(--content-border-height) solid var(--content-border-color);
    }
  }
}

/* ---------------------------------------------------
    BACKGROUND WRAPPER
----------------------------------------------------- */

#background-wrap {
  background: var(--bg);
  top: 0;
  left: 0;
  padding: 0;
  margin: 0;
  position: fixed;
  height: 100lvh;
  width: 100vw;
  z-index: -1;
  overflow: hidden;
  opacity: 0;
  transition: 0.35s opacity;

  &.show {
    opacity: 1;
  }
}

/* ---------------------------------------------------
    LOGO / SLOGAN
----------------------------------------------------- */

.cgilogo {
  & svg {
    display: inline-block;
    vertical-align: middle;
    height: auto;
    width: 3rem;
    background-size: contain;
  }

  & g {
    /*fill: var(--cgi-color-red-hex);*/
    fill: black;
  }

  .slogan {
    font-size: 1.2rem;
    line-height: 1.2rem;
    border-left: 0.125rem solid #d2d2d2;
    padding: 0 0 0 1rem;
    margin: 0 0 0 1rem;
    color: var(--font-color);
    font-weight: 600;
  }

  & span {
    display: inline-block;
    vertical-align: middle;
  }
}

/* ---------------------------------------------------
    NAVBAR STYLE
----------------------------------------------------- */

.loginnav {
  display: flex;
  width: 100%;
  /*height: 3rem;*/
  top: -3rem;
  transition:
    top 0.5s,
    0.5s font-size,
    opacity 0.5s,
    background 0s,
    height 0.35s;
  box-sizing: border-box;
  position: relative;
  z-index: 100;
  opacity: 0;
  container-type: inline-size;
  container-name: navbar;
  align-items: center;
  align-items: end;
  justify-content: center;

  &.open {
    display: flex;
    width: 100%;
    height: 3rem;
    opacity: 1;
    top: 0rem;

    > .mainbar {
      box-shadow: var(--navbar-shadow);
    }
    > .loginbar {
      box-shadow: var(--navbar-shadow);
      background: white;
    }
  }

  &.show {
    > .mainbar > * {
      opacity: 1;
      white-space: nowrap;
      transition: opacity 0.35s;
    }
    > .loginbar > * {
      opacity: 1;
      white-space: nowrap;
      transition: opacity 0.35s;
    }
  }

  .left {
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
    height: inherit;

    &.overflow {
      overflow: visible;
      flex-grow: 1;
      max-width: 5rem;
    }
  }

  .middle {
    flex-grow: 1;
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
    justify-content: center;
  }

  .right {
    display: flex;
    text-align: right;
    width: min-content;
    min-width: 12rem;
    flex-grow: 1;
  }

  .left,
  .middle,
  .right {
    grid-column-gap: 0.25rem;
    align-items: center;
  }

  &:not(.show) {
    > .mainbar > *,
    > .loginbar > * {
      opacity: 0;
      transition: opacity 0.33s;
    }
  }
}

.mainbar,
.loginbar {
  padding: 0 1.25rem;
  display: inherit;
  width: inherit;
  box-shadow: none;
  box-sizing: border-box;
  transition:
    box-shadow 0.5s,
    max-width 0.75s;
  height: 3rem;
  max-width: 1920px;
  border-bottom: var(--content-border-height) solid var(--content-border-color);

  .left {
    display: grid;
    justify-items: center;
    align-items: center; /* Add this to center vertically */
    grid-auto-flow: column;
    height: inherit;

    &.overflow {
      overflow: visible;
      flex-grow: 1;
      max-width: 5rem;
    }
  }

  .middle {
    flex-grow: 1;
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
    justify-content: center;
  }

  .right {
    display: flex;
    text-align: right;
    width: min-content;
    min-width: 12rem;
    flex-grow: 1;
  }
}

.mainbar {
  padding: 0 2.5rem;
}

.footer-portal {
  background: var(--cgi-dark-blue);
  box-shadow: var(--navbar-shadow);
  width: 100%;
  display: flex;
  justify-content: left;
  align-items: center;
  position: relative;
  z-index: 50;
  min-height: 6rem;
  max-width: 77.5rem;
  margin: auto;
  color: white;

  &:not(:has(.footer-portal-container)) {
    display: none;
  }

  & .footer-portal-container {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0 2.5rem;
    box-sizing: border-box;
    color: var(--input-border);
  }

  & .info-link-container {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
    line-height: 1.5rem;
    flex-wrap: wrap; /* Allow divs to wrap to the next line if there's not enough space */
    padding-bottom: 1.5rem;
    border-bottom: 0.0625rem solid white; /* Add white border at the bottom */
    margin-bottom: 1.5rem;
  }

  & .client-info-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 4rem;
  }

  & .policy-footer-container {
    display: flex;
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.3rem;
    margin-top: 1.5rem;
    flex-wrap: wrap; /* Allow divs to wrap to the next line if there's not enough space */
    margin-bottom: 1.5rem;
  }

  & .cgi-link {
    color: white;
    white-space: normal;
  }
}

.nav-menu {
  list-style-type: none;
  margin: auto 0;
  display: inline-flex;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  font-weight: 600;
  justify-content: flex-end;

  > .nav-btn {
    display: inline-flex;
    color: var(--font-color);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s;
    margin-left: 0.5rem;
    padding: 0.375rem;
    line-height: 1;
    border: none;
    background: none;
    align-items: center;

    & .name {
      font-size: 0.9rem;
      font-family: var(--font-family);
    }

    &:hover {
      color: var(--color-primary-highlight);
    }
  }

  .nav-btn.borders svg {
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.4rem;
  }

  .nav-btn.borders {
    font-size: 0.9rem;
    border: var(--nav-button-border);
    border-radius: var(--nav-button-radius);
    padding: 0.25rem 0.65rem;
    color: white;
  }

  #settings {
    border: var(--nav-button-border);
    border-radius: var(--nav-button-radius);
    padding: 0.25rem 0.65rem;
  }
}

/* Dropdown Content (Hidden by Default) */
.dropdown {
  transition: 0.5s;
  opacity: 0;
  position: absolute;
  background: transparent;
  z-index: -100;
  width: auto;
  height: auto;
  /*max-height: 0;*/
  /*padding: 0.375rem 0.75rem;*/
  /*right:0;*/
  top: 3rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  transition:
    0.3s,
    0s background;
  line-height: 3rem;
  font-weight: 400;
  box-sizing: border-box;
  pointer-events: none;
  transform: translateY(-2rem);
  min-width: 12rem;

  > .info {
    background: var(--input-blur-bg);
    line-height: 2rem;
    border-radius: 0.25rem 0.25rem 0 0;
    text-transform: capitalize;
    font-size: 0.9rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 11rem;
    text-wrap: nowrap;
    padding: 0 0.8rem;
    border-bottom: 0.0625rem solid var(--topmenu-bd-color);
  }

  /* Links inside the dropdown */
  > a,
  > button {
    text-decoration: none;
    display: block;
    border: none;
    background: transparent;
    padding: 0 1rem 0 0.5rem;
    height: 3rem;
    width: 100%;
    text-align: left;
    color: var(--font-color);
    transition: color 0.25s;
    box-sizing: border-box;

    > span {
      padding: 0 0.375rem;
      pointer-events: none;
    }
  }

  > a:hover,
  > button:hover {
    color: var(--color-primary-highlight);
  }
}

/* Show the dropdown menu on hover */
#languages:focus + .dropdown,
#notifications:focus + .dropdown,
#settings:focus + .dropdown,
.dropdown:focus-within,
.dropdown.open {
  /*display: block;*/
  opacity: 1;
  z-index: 100;
  height: auto;
  max-height: 25rem;
  pointer-events: all;
  transform: translateY(0rem);
}

.dropdown:focus-within {
  overflow: visible;
}

.mainbar {
  position: relative;
  border-radius: 0rem;
  max-width: 77.5rem;
  box-shadow: var(--navbar-shadow);
  z-index: 100;
  background: var(--cgi-dark-blue);
}

body:has(.window) {
  nav {
    &.open {
      height: 3rem;
      padding: 0;
    }
    .loginbar {
      border-radius: 0rem;
      max-width: 77.5rem;
    }
  }

  #data {
    max-height: calc(100svh); /*calc(100svh - 3rem);*/
    & .window {
      border-radius: 0rem;
    }
  }
}

body:has(footer) {
  #data {
    max-height: calc(100svh - 6rem);
  }
}

@media screen and (min-width: 1920px) {
  nav {
    &.open {
      height: 4.25rem;
      padding: 0 0.5rem;

      body:has(.window) & {
        top: 0rem !important;
      }

      body:not(:has(.window)) & {
        top: 1rem !important;
      }
    }

    .loginbar {
      border-radius: 0.75rem;
      max-width: 1920px;
    }

    .mainbar {
      max-width: 77.5rem;
    }
  }

  footer {
    padding: 0 0.5rem;
    bottom: -1rem !important;
    .footer-content {
      border-radius: 0.75rem;
      max-width: 1920px;
    }
  }

  #data {
    max-height: calc(100svh - 8rem);
    padding: 0 0.5rem;

    & .window {
      border-radius: 0.75rem;
    }
  }

  body:has(footer) {
    #data {
      max-height: calc(100svh - 8rem);
    }
  }
}

/*@media screen and (min-height:1081px)
{
	#dashboard {
		border-radius: 0rem 0rem 1rem 1rem !important;
		.footer {
			border-radius: inherit;
		}
	}
}*/

/* ---------------------------------------------------
    FOOTER STYLE
----------------------------------------------------- */

/* Hide footer when registration form is present */
body:has(#registration) footer {
  display: none;
}

footer {
  display: flex;
  width: 100%;
  max-height: 3rem;
  line-height: 3rem;
  bottom: -3rem;
  transition:
    bottom 0.5s,
    font-size 0.5s,
    opacity 0.5s,
    background 0s;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  opacity: 0;
  align-items: center;
  justify-content: center;
  width: 100%;

  .footer-content {
    display: inline-flex;
    width: 100%;
    padding: 0 1.25rem;
    transition:
      box-shadow 0.5s,
      max-width 0.75s;
    background: white;

    > * {
      opacity: 0;
    }

    & .links {
      display: flex;
      gap: 1rem;
    }
  }

  &.show {
    > .footer-content > * {
      opacity: 1;
      white-space: nowrap;
      transition: opacity 0.35s;
    }
  }

  &.open {
    display: flex;
    height: 3rem;
    margin: auto;
    opacity: 1;
    bottom: 0rem;
    > .footer-content {
      box-shadow: var(--navbar-shadow);
    }
  }

  &:not(.open) {
    height: 0;
  }

  .left,
  .middle,
  .right {
    grid-column-gap: 0.25rem;
    align-items: center;
  }

  .left {
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
  }

  .middle {
    flex-grow: 1;
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
    justify-content: center;
  }

  .right {
    display: flex;
    text-align: right;
  }
}

/* ---------------------------------------------------
   TABLE STYLES
----------------------------------------------------- */

.table-container {
  container-type: inline-size !important;
  container-name: table-container !important;
  overflow-x: auto;
  min-width: 0;
}

.gridtable .grid:has(.gridtable) {
  container-type: inline-size !important;
  container-name: table-container !important;
}

.tHead {
  font-size: 1.1rem;
}

.tCell {
  font-size: 1.2rem;
}

.rowdata {
  font-size: 1.1rem;
}

@container table-container (max-width: 40rem) {
  .gridtable {
    .tHeadRow .tHead:nth-child(n + 4):not(:last-child) {
      display: none !important;
    }
    .tRow .tCell:nth-child(n + 4):not(:last-child) {
      display: none !important;
    }
  }
}

/* Starting from 3rd column, hide one more column as viewport shrinks */

@media screen and (max-width: 60rem) {
  .gridtable .tHeadRow .tHead:nth-child(3),
  .gridtable .tRow .tCell:nth-child(3) {
    display: none !important;
  }
}

@media screen and (max-width: 52rem) {
  .gridtable .tHeadRow .tHead:nth-child(3),
  .gridtable .tHeadRow .tHead:nth-child(4),
  .gridtable .tRow .tCell:nth-child(3),
  .gridtable .tRow .tCell:nth-child(4) {
    display: none !important;
  }
}

@media screen and (max-width: 44rem) {
  .gridtable .tHeadRow .tHead:nth-child(3),
  .gridtable .tHeadRow .tHead:nth-child(4),
  .gridtable .tHeadRow .tHead:nth-child(5),
  .gridtable .tRow .tCell:nth-child(3),
  .gridtable .tRow .tCell:nth-child(4),
  .gridtable .tRow .tCell:nth-child(5) {
    display: none !important;
  }
}

@media screen and (max-width: 36rem) {
  .gridtable .tHeadRow .tHead:nth-child(3),
  .gridtable .tHeadRow .tHead:nth-child(4),
  .gridtable .tHeadRow .tHead:nth-child(5),
  .gridtable .tHeadRow .tHead:nth-child(6),
  .gridtable .tRow .tCell:nth-child(3),
  .gridtable .tRow .tCell:nth-child(4),
  .gridtable .tRow .tCell:nth-child(5),
  .gridtable .tRow .tCell:nth-child(6) {
    display: none !important;
  }
}

@media screen and (max-width: 28rem) {
  .gridtable .tHeadRow .tHead:nth-child(3),
  .gridtable .tHeadRow .tHead:nth-child(4),
  .gridtable .tHeadRow .tHead:nth-child(5),
  .gridtable .tHeadRow .tHead:nth-child(6),
  .gridtable .tHeadRow .tHead:nth-child(7),
  .gridtable .tRow .tCell:nth-child(3),
  .gridtable .tRow .tCell:nth-child(4),
  .gridtable .tRow .tCell:nth-child(5),
  .gridtable .tRow .tCell:nth-child(6),
  .gridtable .tRow .tCell:nth-child(7) {
    display: none !important;
  }
}

/* Add more if required */

.tCell span {
  padding: 0 0.5rem;
  display: inline-block;
  overflow: clip;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
}

/* ---------------------------------------------------
    LOGIN STYLE
----------------------------------------------------- */

.login {
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  transform: scale(0.75);
  transition:
    0.5s,
    background 0s;
  z-index: -2;
}

/*
#login
{
	opacity: 1;
	transition: 0.25s opacity, 0.25s height, 0.25s max-height;
	> .title { display: block; font-weight: 600; margin:0; padding: 1rem 0; font-size: 1.2rem; text-align: center;}
	&.hide {opacity: 0;}
}
*/

#login-window {
  box-shadow: 0rem 0.125rem 0.25rem 0rem rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;

  /*
	.footer 
	{
		width: 100%; 
		text-align: center;
		display: flex;
		grid-column-gap: 0.5rem;
		justify-content: center;
		height: 4rem;
		align-items: center;
	}
	*/

  .loginlogo {
    & svg {
      height: inherit;
      width: 100%;
    }

    height: 5rem;
    min-height: 5rem;
    margin-bottom: 2rem;
  }

  .brandheader {
    border-top: 5px;
    border-image: var(--color-top-gradient);
    display: flex;
    background: var(--content);
    width: 100%;
    height: 3rem;
    line-height: 3rem;
    box-sizing: border-box;
    box-shadow: 0rem 0.125rem 0.1rem 0rem rgba(0, 0, 0, 0.1);

    .left {
      padding-left: 0.85rem;
    }
    .right {
      padding-right: 0.85rem;
      font-weight: 600;
    }
  }

  .inputs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition:
      height 0.5s,
      max-height 0.5s;
  }
}

/* ---------------------------------------------------
    Notifications & Languages menu style
----------------------------------------------------- */

#languages_data,
#languages-dropdown {
  .right {
    text-align: right;
    white-space: nowrap;
  }

  .langlistbg {
    border-radius: 1rem;
    cursor: pointer;
    height: 100%;
    display: flex;
    transition:
      background 0.25s,
      filter 0.25s;
    flex-grow: 1;
    max-width: 14rem;
  }
  .langlistbg.selected {
    filter: brightness(1.6) saturate(0.95);
    background: var(--cgi-dark-blue);
  }
  .langlistbg:hover {
    filter: brightness(1.5) saturate(0.8);
    background: var(--cgi-button-hover);
  }

  .flagplace {
    padding: 0 0 0 0.75rem;
    max-height: min-content;
    max-width: min-content;
    font-size: 3rem;
    max-height: 5rem;
  }
  .textplace {
    padding: 0 0.5rem 0 1rem;
    max-height: min-content;
    width: 100%;
    max-width: max-content;
    color: var(--font-color);
    min-width: 5rem;
  }
  .textplace > .iso {
    font-size: 1.8rem;
    line-height: 1.25;
  }
  .textplace > .pieni {
    font-size: 1rem;
    line-height: 1;
  }
}

/* ---------------------------------------------------
 GRID STYLING
----------------------------------------------------- */

.grid {
  /*grid-row-gap: unset !important;*/

  /*~ .grid 		{ margin-top: 2rem; }*/
  margin-bottom: 2rem;

  &.min {
    grid-template-columns: repeat(auto-fill, minmax(25.5rem, 1fr));
  }
  &.five {
    grid-template-columns: repeat(auto-fill, minmax(25.5rem, 1fr));
  }
  &.four {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  }
  &.three {
    grid-template-columns: repeat(auto-fill, minmax(19.5rem, 1fr));
  }
  &.three-cram {
    grid-template-columns: repeat(auto-fill, minmax(25.5rem, 1fr));
  }

  &.one {
    grid-template-columns: repeat(1, 1fr);
  }
  &.flat {
    grid-template-columns: repeat(1, 1fr) !important;
    padding: 0 !important;
  }
  &.info {
    padding: 0;
  }

  > div > label,
  > label,
  > div {
    & > span:is(.lblReadOnly) {
      white-space: normal;
      padding: 0;
      font-weight: 400;
      font-size: 1.25rem;
      justify-content: flex-start;
      display: inline-flex;
      align-items: center;
      /*height: 2.625rem;*/
    }

    & > span:is(.lblReadOnlyNoSelect) {
      white-space: normal;
      padding: 0;
      font-weight: 400;
      font-size: 1.2rem;
      justify-content: flex-start;
      display: inline-flex;
      align-items: center;
      line-height: unset;
      /*height: 2.625rem;*/
    }
  }

  > div > label,
  > div {
    > span:is(.lblInput) {
      text-transform: uppercase;
      font-weight: 600;
      font-size: 1.15rem !important;
      letter-spacing: 0.02rem;
    }
  }
}

/* ---------------------------------------------------
 FLEX STYLING
----------------------------------------------------- */

.flex-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0rem 1.5rem;
  flex-basis: 40rem;

  .flexitem {
    flex-shrink: 1;
    flex-grow: 1;
    flex-basis: 30rem;
    min-width: 0; /* Allow flex items to shrink below their basis */
    margin-bottom: 1.5rem;
  }

  & .grid {
    grid-row-gap: unset !important;
  }

  & .grid.tile {
    grid-row-gap: 1.5rem !important;
  }
}

/* 10.16 02.10.2025 DANIEL */
/*
canvas { 
	max-width: 45%;
	max-height: 15rem;
}
*/
div.flexitem:has(canvas) {
  width: 100%;
  /*
	> canvas
	{
		min-width: 315px;
		max-width: 800px;
	}
	*/
}

.dialog .dbox,
#info .dbox {
  border-radius: var(--grid-radius);

  &.prompt {
    & .header {
      padding: 2rem 2.5rem;
      line-height: normal;
      font-size: 1.75rem;
      font-weight: bold;
      color: var(--header-text);
      text-align: center;
      border: none;
      height: auto;
    }
    & .content {
      line-height: 1.8rem;
      border: none;
      padding: 0rem 2.5rem 2rem 2.5rem;
      min-width: 16rem;
      height: auto;
      font-size: 1.3rem;

      input {
        padding: 0 1rem;
        border: var(--border-width) solid var(--border);
        border-radius: var(--input-radius);
        box-sizing: border-box;
        overflow: hidden;
        height: var(--input-height);
        max-height: var(--input-max-height);
        font-size: 1.25rem;
        max-width: 9rem;
        text-align: center;
      }
    }
    & .footer {
      padding: 0rem 2.5rem 2rem 2.5rem;
      border: none;
      line-height: normal;
      justify-content: space-around;
      font-size: 1.2rem;
    }
  }

  &:not(.prompt) {
    & .header {
      padding: 1rem 1.5rem;
      line-height: normal;
      font-size: 1.75rem;
      font-weight: bold;
      color: var(--header-text);
      text-align: center;
      border: none;
    }
    & .content {
      line-height: 1.8rem;
      border: none;
      padding: 0rem 2.5rem 2rem 2.5rem;
      text-wrap: nowrap;
      text-align: center;
      width: 90svw;
      max-width: max-content;
      min-width: 16rem;
      font-size: 1.3rem;
      white-space: wrap;
    }
    & .footer {
      padding: 0rem 2.5rem 2rem 2.5rem;
      border: none;
      line-height: normal;
      justify-content: space-around;
    }
  }

  &.big {
    max-width: 90svw;
    width: 1000px;

    & .header {
      width: max-content;
      padding: 1rem 2rem;
      font-size: 1.45rem;
      font-weight: 600;
    }
    & .content {
      padding: 1rem 2rem;
      border-top: var(--header-border);
      border-bottom: var(--footer-border);
      * {
        text-align: left !important;
      }
    }
    & .footer {
      padding: 1rem;
    }
  }

  &:has(.dbox) {
    background: rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
  }

  &:has(.dbox.open) {
    opacity: 1;
  }
}

/*.dialog.open
{
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1000;
	background: white;
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
	padding: 1rem;
	border-radius: 0.5rem;
	overflow: auto;
	max-height: 90vh;
	width: 90vw;
}

body.dialog-open {
	overflow: hidden;
}*/

/* ---------------------------------------------------
 TABLE STYLING
----------------------------------------------------- */

.gridtable {
  display: table;
  width: 100%;
  margin-bottom: 1rem;
  /* 8.8.2025 */
  .tHeadRow * {
    transition: 0.25s color; /*8.8.2025 */
    /*background: var(--table-header-bg);*/
    /*background: var(--cgi-dark-blue);*/
    /*background: #391D91;*/
    /*background: #35099c;*/
    /* background: #310598; */
    background: var(--cgi-dark-blue);
    color: white;
    font-weight: normal;
    border: none;
    border-bottom: var(--table-border-top); /* line-height: 2.25rem */
  }

  /* 19.8.2025 DANIEL - TABLE HEADER SORING - MAYBE LATER */
  /*
	.tHead
	{
		&[sort="ASC"]::after 
		{
			content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpolygon points='0, 0 10,0 5,10 10' fill='white'/%3E%3C/svg%3E");
		}
	
		&[sort="DESC"]::after 
		{
			content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpolygon points='5 0,10 10,0 10' fill='white'/%3E%3C/svg%3E");
		}
	}
	*/

  .tHeader {
    display: table-caption;
    top: 0;
    height: 2.35rem;
    background: var(--content-blur);
    box-sizing: border-box;
    /*position: sticky;*/

    .rowdata {
      display: inline-flex;
      gap: 1rem;
      padding: 0.5rem;
      float: left;
    }
    .paginator {
      display: inline-flex;
      gap: 0.25rem; /*padding: 0rem 0.5rem;*/ /* 8.8.2025 */
      float: right;
      align-items: center;
      height: 100%;
      .paginator-button {
        padding: 0.25rem 0.7rem;
        border-radius: 0.2rem;

        /* 8.8.2025 */
        /*&:first-child {
					/* background: rgba(var(--primary-color-rgb), 0.35); */
        /* background: #e6e3f3; */
        /* color: #777; */
        /*}*/
        /*&:last-child {
					/* background: rgba(var(--primary-color-rgb), 0.35); */
        /* background: #e6e3f3; */
        /* color: #777; */
        /*}*/

        /* 8.8.2025 */
        /* color: var(--content); */
        /* background: rgba(var(--primary-color-rgb), 0.35); */
        background: var(--cgi-warning);
        color: black;
        border: 0.0625rem solid rgba(var(--primary-color-rgb), 0.35);

        &[post] {
          /* 8.8.2025 */
          /*
					color: var(--font-color);
					background: transparent;
					*/
          /* background: var(--color-primary); */
          /* background: #cbc3e6; */

          background: #bfb5f9;
          color: black;

          &:hover {
            color: var(--color-primary-highlight);
            background: rgba(var(--primary-color-rgb-hl), 0.35);
          }
        }
      }
    }
  }

  .tHeadRow {
    background-color: var(--subheader-background);
    display: table-header-group;
    /*position: sticky;*/
    top: 2.35rem;
    z-index: 2;
  }

  .tHead {
    display: table-cell;
    /*
		background-color: var(--subheader-background);
		border: none;
		border-top: var(--tHead-border-top);
		border-left: var(--tHead-border-left);
		border-right: var(--tHead-border-right);
		border-bottom: var(--tHead-border-bottom);
		*/
    font-weight: 600;
    text-align: center;
    height: 2rem;
    padding: 0 0.375rem;
    line-height: normal;
    vertical-align: middle;
    box-sizing: border-box;
    cursor: pointer;
    text-wrap: nowrap;
  }

  .tRow {
    display: table-row;
  }

  .tRow[post]:hover {
    background-color: var(--color-container-hover); /* Change this to your desired hover background color */
    cursor: pointer; /* Optional: Add a pointer cursor for better UX */
  }

  .tCell,
  .tCbox {
    display: table-cell;
    border-top: var(--tCell-border-top);
    border-right: var(--tCell-border-right);
    border-left: var(--tCell-border-left);
    border-bottom: var(--tCell-border-bottom);
    transition:
      box-shadow 0.15s,
      border 0.15s;
    height: 2rem;
    min-width: 5rem;
    padding: 0.125rem 0.75rem;
    line-height: normal;
    vertical-align: middle;
    box-sizing: border-box;
  }

  /* 09.14 25.09.2025 DANIEL */
  .tCell > span {
    pointer-events: none;
  }

  .selectall > svg {
    height: 100%;
    line-height: unset;
    border: none;
    position: relative;
  }
  &:not(:has(.tRow[text])) {
    .tRow > .tCell:first-child {
      border-left: var(--table-border) !important;
    }
    .tRow > .tCell:last-child {
      border-right: var(--table-border) !important;
    }
  }

  &:not(:has(.tHeader)) {
    margin-top: 0.5rem;
  }
}

.table-container {
  container-type: inline-size;
  container-name: table-container;
  overflow-x: auto;
  min-width: 0;
}

/* Hide card view by default, show grid table */
.table-container .tablecardview {
  display: none;
}

.table-container .gridtable {
  display: table;
}

@media screen and (max-width: 60rem) {
  .table-container:has(.tablecardview) .gridtable {
    display: none !important;
  }

  .table-container:has(.tablecardview) .tablecardview {
    display: block;
  }
}

.chart-canvas {
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

/*
  Make charts responsive using CSS container queries.
  Chart.js will automatically detect container size changes when responsive: true.
*/
.chart-canvas.flexitem {
  display: flex;
  flex: 1 1 auto;
  min-height: 300px;
}

.chart-canvas > canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}

/* Grid-specific chart sizing */
.grid.two .chart-canvas {
  height: 100%;
  min-height: 250px;
  max-height: 280px;
}

.grid-container .chart-canvas {
  height: 100%;
  min-height: 250px;
  max-height: 386px;
}

div.announcement > span.lblReadOnly {
  font-size: 1.3rem;
  font-weight: 400;
}

.announcement {
  margin-top: 1rem;
  > span {
    font-size: 1.2rem !important;
  }

  > h2 {
    margin-top: 0 !important;
  }

  > label > span.lblReadOnly,
  .lblReadOnlyNoSelect {
    line-height: 1.65rem !important;
  }
}

.lblAlert,
.lblWarning {
  padding-top: 0.8rem !important;
  padding-right: 1.2rem !important;
  padding-bottom: 0.95rem !important;
  padding-left: 1.2rem !important;
  border-radius: 0.25rem !important;
  font-size: 1.2rem !important;

  > h2 {
    font-size: 1.35rem !important;
    line-height: 1.5rem !important;
    margin-bottom: 0.25rem !important;
  }

  > .lblReadOnly,
  .lblReadOnlyNoSelect {
    line-height: 1.65rem !important;
    font-size: 1.2rem !important;
  }
}

.lblAlert {
  background: var(--cgi-alert) !important;
  > span {
    color: white !important;
  }
  color: white !important;

  > h2 {
    color: white !important;
  }
}
.lblWarning {
  background: var(--cgi-warning) !important;
  > span {
    color: black !important;
  }

  > h2 {
    color: black !important;
  }
}
.lblError {
  font-size: 1.2rem !important;
  > span {
    color: var(--cgi-alert) !important;
  }

  > h2 {
    color: var(--cgi-alert) !important;
  }
}

.page-container:first-child {
  div > .announcement {
    margin-top: 0 !important;
  }
}

.divLink.lblPretext {
  padding: 0.7rem 0;
  font-weight: 400;
  font-size: 1rem;
}

/* 08.40 06.10.2025 DANIEL */
.cgi-button.portal {
  text-align: center;

  &.circle {
    width: 10rem;
    height: 10rem;
    border-radius: 100%;
    word-wrap: break-word;

    &::before {
      word-wrap: break-word;
      white-space: unset;
    }
  }

  &.triangle {
    width: 10rem;
    height: 10rem;
    border: unset;
    border-radius: unset;
    border-left: solid 5rem transparent;
    border-right: 5rem solid transparent;
    border-bottom: 10rem solid #131313;
    background: none;
  }

  &.file {
    display: block;
  }
}

.cgi-button.portal {
  display: flex;
  padding: 0.75rem 1rem;
  /* border-radius: 0; */
  border-radius: 10rem;
  color: var(--font-color);
  text-shadow: var(--font-color-shadow);
  /* border: var(--button-bd-height) solid var(--color-primary); */
  border: none;
  line-height: normal;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--content);
  /* background: var(--color-primary); */
  background: none;
  /* border: 0.1rem solid transparent; */
  margin: auto 0;
  outline: none;
  text-align: center;
  transition: background 0.25s;
  cursor: pointer;

  background-clip: transparent;

  transition: filter 0.25s;

  &:hover {
    filter: brightness(1.1);
  }

  &::before {
    content: none;
  }
  /*
	&::after
	{
		display: inline-block;
		padding: 0 0.625rem;
		content: attr(text);
		white-space: nowrap;
		background: var(--button-background-color);
		min-width: 3rem;
	}
	*/
  > svg {
    width: 2rem;
    height: 2rem;
  }

  > div {
    display: inline-block;
    margin: auto;
    padding: 0 0 0 0.5rem;
    text-align: center;
    pointer-events: none;
  }
}

.window .cgi-button.portal {
  font-family: var(--font-family);
  font-size: 1.2rem;
  font-weight: 600;
  min-width: 5.5rem;
}

.window .cgi-button.portal.neutral {
  /* background: linear-gradient(#9e83f5, #5236ab); */
  background: #5236ab;
}
.window .cgi-button.portal.encourage {
  /* background: linear-gradient(#17a66b, #0f6541); */
  background: var(--cgi-confirmation);
}
.window .cgi-button.portal.discourage2 {
  background: none;
  border: 0.1rem solid var(--font-color);
  color: var(--font-color);
}
.window .cgi-button.portal.discourage {
  /* background: linear-gradient(var(--cgi-warning), #ff6a00); */
  /* background: linear-gradient(#ca0025, #a6001e); */
  background: var(--cgi-alert);
  color: white;
}

.cgi-button[disabled] {
  pointer-events: none;
  background-color: #b3b3b3;
}

/* 10.51 07.10.2025 DANIEL - TEXTAREA from admin */
/*label {
  & > input, & textarea, & select {
  }
}*/

label {
  & > input,
  & textarea,
  & select {
    &:hover {
      box-shadow: var(--input-hover);
      border: var(--input-hover-border) !important;
      outline: none !important;
    }
  }
}

.grid,
.nogrid {
  & > div {
    & > label {
      & textarea {
        background: var(--input-blur-bg);
        font-family: inherit;
        font-size: 1rem;
        padding: 0.375rem 0.75rem;
        border: 1px solid rgba(0, 0, 0, 0);
        border-radius: 0;
        box-sizing: border-box;
        box-shadow: none;
        line-height: 1;
        width: 100%;
        margin: 0;
        height: 100%;
        min-height: 9.375rem;
        transition:
          0.2s border,
          0.2s box-shadow;
        resize: none;
        border: var(--checkbox-span-border);
        border-top: var(--checkbox-span-highlight);
        border-left: var(--checkbox-span-highlight);
      }
    }
  }
}

div.grid input:hover,
div.grid textarea:hover,
div.grid select:hover,
.list_button:hover {
  box-shadow: var(--input-hover);
  position: relative;
  z-index: 2;
}

html[theme='light'],
html[theme='dark'] {
  & .grid {
    & > div {
      & > label {
        & > input,
        & textarea,
        & select {
          padding: 0 1rem;
          line-height: var(--input-height);
          min-height: var(--input-height);
          /* max-height: var(--input-max-height); */
          border-radius: var(--input-radius);
          width: 100%;
          font-size: 1rem;
          border: var(--border-width) solid var(--border-hl);
          border-top: var(--border-width) solid var(--border);
          border-left: var(--border-width) solid var(--border);
        }
      }
    }
  }
}

html[theme='light'],
html[theme='dark'] {
  & .grid {
    & > div {
      & > label {
        & textarea {
          padding: 0.75rem 1rem;
          font-size: 1.2rem;
          line-height: 1.25;
          min-height: 2.75rem;
          min-height: 10rem;
          max-height: unset;
        }
      }
    }
  }
}

html[theme='light'],
html[theme='dark'] {
  & div.grid input:hover,
  & div.grid textarea:hover,
  & div.grid select:hover,
  & .list_button:hover {
    box-shadow: var(--input-hover);
    position: relative;
    z-index: 2;
  }
}

html[theme='light'],
html[theme='dark'] {
  & .grid {
    & > label {
      & > input,
      & textarea,
      & select {
        &:hover {
          box-shadow: var(--input-hover);
          border: var(--input-hover-border);
          outline: none !important;
        }
      }
    }
  }
}

a.fetch.list_button > svg {
  display: block;
  margin: auto;
  padding-top: 0.65rem;
}

/*Apply pointer cursor to elements with the "post" attribute */
[post] {
  cursor: pointer;
}

.link {
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

.divPageTitle {
  white-space: nowrap !important;
  background: transparent;
  display: flex;
  width: 100%;
  padding: 0 0 1.125rem 0;
  box-sizing: border-box;
  flex-grow: 1;
  overflow: hidden;
  font-size: 1.5rem;
  color: var(--primary-color-hex-title);
  font-weight: 600;
  border: none;
  /* margin-top: 1rem; */
  /* margin-bottom: 0.438rem; */

  & .container {
    background: var(--subheader-background);
    border-top: var(--subheader-before-border);
    align-content: center;
  }
}

.tooltiptext {
  visibility: hidden;
  width: 130px;
  background-color: black;
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 65%;
  margin-left: -65px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.policy-container {
  line-height: 1.6rem;
}

.gridheading {
  color: black;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 1rem;
  max-width: none; /* Remove width constraints */
  overflow: visible; /* Ensure content is not clipped */
  text-overflow: unset; /* Disable ellipsis */
  white-space: normal; /* Allow text to wrap */
}

.window {
  opacity: 0;
  transition:
    0.5s,
    opacity 0.2s,
    background 0s;
  display: flex;
  border-radius: 1rem;
  background: var(--content);
  border: 0.066em solid var(--content-border);
  padding: 0;
  justify-content: flex-start;
  flex-direction: column;
  overflow: visible;
  /*width: 75rem;*/
  height: 100%;
  min-width: 0rem;
  min-height: 0rem;
  max-width: 0rem;
  max-height: fit-content !important;
  flex-grow: 1;
  box-sizing: border-box;

  ~ .window.open {
    margin-left: 0rem;
  }

  &.pinned {
    & svg[name='pin'] {
      display: none !important;
    }
    & svg[name='unpin'] {
      display: block !important;
      color: var(--color-primary);
    }
  }

  & svg[name='pin'] {
    display: block;
  }
  & svg[name='unpin'] {
    display: none;
  }

  & .modal {
    background: var(--color-background);
    position: absolute;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }

  &.open {
    .modals {
      &:has(.modal) {
        z-index: 10;
      }
      & bg {
        display: block;
        opacity: 0;
        top: 0;
        left: 0;
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: -1;
        background: rgba(0, 0, 0, 0.25);
        transition:
          opacity 0.5s,
          background 0.5s;
      }
    }

    .modals.open {
      opacity: 1;
      z-index: 10;
      & bg {
        opacity: 1;
        z-index: inherit;
      }
    }

    &.focus {
      /* 8.8.2025 */
      /* box-shadow: 0 0.063rem 0.525rem 0.125rem rgba(0,0,0,0.33), 0 0.063rem 0.925rem 0.025rem var(--color-primary-highlight); */
      box-shadow: 0 0.063rem 0.625rem 0.025rem #5236ab;
      box-shadow: 0 0rem 0.5rem 0.025rem #5236ab;
    }
  }

  &.show {
    /*box-shadow: 0 0.063rem 0.525rem 0.125rem rgba(0,0,0,0.33);*/
    box-shadow: 0 0.063rem 0.5rem 0rem rgba(0, 0, 0, 0.33);

    .header {
      opacity: 1;
      font-size: 1.6rem;
      .topmenu {
        opacity: 1;
      }
    }
    .topmenu {
      opacity: 1;
      display: flex;
      flex-wrap: nowrap;
      z-index: 4;
    }
    .content {
      opacity: 1;
      > .page-container {
        opacity: 1;
        scale: 1;
        min-width: 20rem;
        transition:
          opacity 0.2s,
          scale 0.2s,
          background 0s;
      }
    }
    > .footer {
      opacity: 1;
    }
  }

  &.refresh {
    .content {
      opacity: 0 !important;
      transition:
        opacity 0.25s,
        background 0s;

      > .page-container {
        scale: 0.99 1 !important;
      }
    }
  }

  &.overflow {
    transition:
      0.5s height,
      max-height 0.05s;
    position: relative;
  }
}

.window > .content {
  /* 15.8.2025 */
  /* margin: 1rem 1.5rem; */
  overflow: visible;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.35s;
  justify-content: center;
  /*background: var(--content);*/
  background: var(--content-blur);
  flex-grow: 1;
  position: relative;
  container-type: inline-size;
  container-name: content;

  > .page-container {
    transition: scale 0.3s;
    max-width: 66rem;
    scale: 0.975 1;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 2rem 2.5rem;
  }

  > * {
    box-sizing: border-box;
    margin: 0 auto;
  }
}

.window > .footer {
  opacity: 0;
  transition:
    opacity 0.25s,
    background 0s;
  position: relative;
  display: flex;
  bottom: 0;
  width: 100%;
  border: 0.1rem solid transparent;
  border-top: var(--content-border-height) solid var(--content-border-color);
  /*border-top: 0.1rem solid var(--content-border);*/
  background: white;
  box-sizing: border-box;
  z-index: inherit;
  justify-content: flex-start;
  flex-wrap: nowrap;
  height: 100%;
  padding: 0 1rem;
  height: var(--window-footer-height);
  max-height: 5rem;
  min-height: var(--window-footer-height);

  .left {
    display: flex;
    justify-items: center;
    grid-auto-flow: column;
    grid-column-gap: 0.25rem;
  }

  .middle {
    flex-grow: 1;
    display: grid;
    justify-items: center;
    grid-auto-flow: column;
    justify-content: center;
    grid-column-gap: 0.25rem;
  }

  .right {
    display: flex;
    text-align: center;
    width: min-content;
    grid-column-gap: 0.25rem;
    margin-left: auto;
  }
}

body > #info {
  background: rgba(0, 0, 0, 0);
  position: absolute;
  width: 100%;
  top: 7rem;
  height: calc(100% - (var(--window-header-height) + var(--window-footer-height)));
  z-index: -5;
  transition:
    0.35s background,
    0.2s opacity;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.5rem;

  &:has(div) {
    z-index: 1001;
  }

  > div:not(.dbox) {
    opacity: 0;
    scale: 0;
    background: var(--content);
    transition:
      0.35s scale,
      0.35s opacity;
    border-radius: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    align-self: center;

    &.open {
      opacity: 1;
      scale: 1;
    }
  }

  &:has(.dbox) {
    background: rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
  }

  &:has(.dbox.open) {
    opacity: 1;
  }

  & .dbox {
    display: flex;
    justify-content: center;
    flex-direction: column;
    background: var(--content);
    backdrop-filter: blur(0px);
    border-radius: var(--grid-radius);
    position: absolute;
    opacity: 0;
    top: 50%;
    left: 50%;
    transition:
      0.5s opacity,
      0.5s transform,
      backdrop-filter 0.5s;
    transform: translate(-50%, -50%) scale(0.5);
    box-shadow: 0rem 0.438rem 1.125rem -0.25rem rgba(0, 0, 0, 0.5);
    max-width: 95%;
    text-overflow: ellipsis;
    overflow: hidden;

    & .notetext {
      background: linear-gradient(rgba(0, 224, 128, 87.5), rgb(0, 176, 155, 87.5));
    }

    &.dangertext {
      display: block;
      margin: auto;
      margin-left: auto;
      margin-right: auto;
      padding: 0.5rem 2rem;
      top: 15%;
      max-width: max-content;
      text-align: center;
      font-weight: bold;
      color: white;
      text-shadow: none; /* 0 1px 3px black; */ /* SELKEÄMPI? */
      background: #b00020; /*linear-gradient(var(--color-secondary), var(--color-background));*/
      border-radius: 0.25rem !important;
      box-shadow: 0rem 0rem 1rem -0.25rem #b00020;
      /*opacity: 0;*/
      z-index: 999;
    }
    & .footer {
      display: flex;
    }

    &.open {
      opacity: 1;
      backdrop-filter: blur(10px);
      transform: translate(-50%, -50%) scale(1);
      transition:
        0.75s opacity,
        0.5s transform,
        backdrop-filter 0.5s;
    }
    &.small-dialog {
      max-width: 35rem;
    }
  }
}

.grid-container {
  margin-top: 1rem;
  padding: 0;
  label {
    .errortext {
      background: transparent;
      border: none;
      color: #b00020;
      font-weight: bold;
      font-size: 1.1rem;
      opacity: 0;
      padding: 0;
      height: 0rem;
      transition:
        height 0.25s,
        opacity 0.25s !important;

      &.error {
        opacity: 1;
        height: auto; /* Allow height to adjust dynamically */
        line-height: 2rem;
        margin-bottom: 0.2rem;
      }
    }
  }
}

.message {
  font-size: 1.2rem !important;

  /* CHANGED */
  &.success {
    background: #128354 !important;
    color: white;
    text-shadow: none;
    font-weight: 500 !important;
  }
  &.warning {
    background: #f1a425 !important;
    color: black;
    text-shadow: none;
    font-weight: 500 !important;
  }
  &.error {
    background: #b00020 !important;
    color: white;
    text-shadow: none;
    font-weight: 500 !important;
  }
}

checkbox {
  > span {
    font-size: 1.2rem;
  }

  &:hover {
    color: unset;
  }
}

.breadcrumb-container {
  min-height: 2.5rem;
  margin-top: 0.6rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

ol.breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  /*gap: 0rem 0.5rem;*/
  font-size: 1.2rem;
}

.breadcrumb-item {
  color: var(--font-color);
  font-weight: 400;

  &[post] {
    cursor: pointer;
    font-weight: 600;
    color: var(--cgi-dark-blue);
  }

  &[post]:hover {
    text-decoration: underline;
  }
}

.breadcrumb-separator {
  font-size: 1rem;
  color: var(--font-color);
  margin: 0 0.5rem;
}

.divSeparator {
  min-height: 1rem;
}

.divSeparatorLine {
  min-height: 1rem;
  border-top: 0.1rem solid #b3b3b3;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.list_button {
  cursor: pointer;
  box-sizing: border-box !important;
  display: flex;
  max-width: 2.2rem;
  min-width: 3rem;
  align-self: center;
  min-height: var(--input-height);

  > .svg-inline--fa {
    margin: auto;
  }
}

.window {
  & .divLink {
    margin-bottom: 0.5rem;
    font-size: 1.3rem !important;

    & > .lblPretext {
      font-size: 1.3rem !important;
      font-weight: 400;
      display: inline;
    }
  }
}

.login-fields {
  .input-container {
    display: flex;
    display: inline-flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: none;
    border: none;

    &:has(input:focus) {
      border: none;
    }

    .verifycode-input {
      width: 12rem;
      height: 2.8rem;
      text-align: center;
      outline: none;
      border: 0.125rem solid gray;
      border-radius: 0.25rem;
      font-size: 1.3rem;
      font-weight: bold;
      padding: 0.5rem;
      text-transform: capitalize;
      box-shadow: 0rem 0.125rem 0.35rem -0.1rem rgba(0, 0, 0, 0.35);

      &:focus {
        border: 0.125rem solid var(--cgi-color-purple-3);
      }
    }
  }
}

.container-button-print-portal {
  position: absolute;
  top: 100%;
  right: 0;

  > .cgi-button {
    border-radius: 0;
    border-bottom-left-radius: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1.375rem;
    background-color: transparent;
    color: black;

    .button-icon {
      margin-right: 0.5rem;
    }
  }
}

.cgi-button {
  &.disabled {
    background-color: var(--button-background-disabled) !important;
    color: var(--button-font-color-disabled) !important;
  }
}

/* Styles for mobile devices and small screens (max-width: 576px) */
@media (max-width: 576px) {
  .mainbar {
    max-width: 100% !important;
    padding: 1em !important;
    height: auto !important;
  }
  .cgilogo {
    & span {
      padding-right: 0.75rem;
    }
  }
  .cgi-button.tile svg {
    margin-right: 1rem;
  }
  #points-container {
    max-width: fit-content;
  }
  .portal-info-card-container {
    max-width: fit-content;
  }
  .window {
    .footer {
      padding: 0 2rem !important;
    }
    & .dialog {
      &.open {
        > div {
          top: 60%;
        }
      }
    }
  }
  .footer-portal {
    min-height: auto;
    & .footer-portal-container {
      padding: 0 1rem;
      margin-top: 1rem;
    }
  }
  .chart-canvas.flexitem {
    width: auto;
    height: auto;
    max-width: 320px;
  }
  #languages_data,
  #languages-dropdown {
    .textplace > .iso {
      font-size: 1.5rem;
    }
  }

  .window > .content > .page-container {
    padding: 2rem 2.5rem;

    &:has(.breadcrumb-container) {
      padding-top: 0.75rem !important;
    }
  }

  .container-button-print-portal {
    display: none;
  }
}

/* Print styles */
@media print {
  :root {
    --print-scale: 0.75;
  }

  @page {
    size: auto;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    transform: none !important;
    max-height: none !important;
  }

  /* Scale only the printable content */
  #data,
  #window-container {
    transform: none !important;
    zoom: var(--print-scale);
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Allow content to flow across pages */
  .window {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  .window > .content > .page-container {
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  nav,
  footer,
  .mainbar,
  .loginbar,
  .footer,
  .footer-portal,
  .divLink,
  .tHeader,
  button {
    display: none !important;
  }

  .site-breadcrumb {
    display: block !important;
  }

  .window {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: none !important;
    padding-bottom: 1px;
  }

  .window > .content {
    overflow: visible !important;
    height: auto !important;

    > .page-container {
      overflow: visible !important;
    }
  }

  .grid,
  .flex-container,
  .grid-container {
    page-break-inside: auto;
  }

  h1,
  h2,
  h3,
  .announcement,
  .lblAlert,
  .lblWarning {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  .announcement {
    > h2 {
      color: black !important;
    }

    > span {
      color: black !important;
    }
  }

  #background-wrap {
    display: none !important;
  }

  .gridtable {
    page-break-inside: auto;
  }

  .tRow {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  body,
  .window,
  .grid,
  .flex-container {
    font-size: 12pt !important;
  }

  .tHead {
    border: var(--table-border) !important;
    color: black !important;
  }

  .chart-canvas {
    margin-bottom: 2rem !important;
  }

  .lblAlert,
  .lblWarning {
    padding: 0 !important;
  }
}
