/*
 * Invantive Connect - what Invantive Cloud's stylesheet does not have.
 *
 * The chrome, the typography, the headings, the buttons, the fields and the tables come from
 * `site.css`, which is Invantive Cloud's own and copied unchanged. This file only adds the few
 * components Connect has and Cloud has not, in Cloud's colours, and follows Cloud's dark theme
 * where it has one.
 */

code
{ font-family: Consolas, "Courier New", monospace;
  padding: 0 2px;
}

.wrap
{ overflow-wrap: anywhere;
}

.num
{ text-align: right;
  white-space: nowrap;
}

/*
 * The grid rule of every product of ours (GEN-GLE-2026W33-itgen-010): a short number, a moment and a flag centred,
 * never wrapped.
 */
.c,
td.date,
td.datetime,
td.time,
th.date,
th.datetime,
th.time
{ text-align: center;
  white-space: nowrap;
}

.good
{ color: #3b8a00;
}

.bad
{ color: #d0021b;
}

.note
{ color: #646464;
  font-size: 11px;
}

.error
{ color: #d0021b;
}

/*
 * The breadcrumbs of the pages of users stand above the box of the page (_Layout), placed as on the pages of Invantive
 * Cloud: 10px under the top bar and 15px from the edge (.breadcrumb of its site.css), also above the centred panel of the
 * log-on; the frame of the landing pages would centre them in 1000px. A wide page has the plain title at 26px of Cloud
 * (.content > h1 of its cloud-refresh.css).
 */
.landingAppContent > .pageBreadcrumbs > .breadcrumb
{ margin: 10px 15px 5px 15px;
  padding: 0;
  text-align: left;
  width: auto;
}

.landingAppContent .content:not(.onBoardingWrapper) > h1
{ background: none;
  box-shadow: none;
  color: #222;
  font-size: 26px;
  font-weight: 300;
  margin: 6px 0 12px 0;
  padding: 0;
}

@media (prefers-color-scheme: dark)
{ .landingAppContent .content:not(.onBoardingWrapper) > h1
  { color: #eee;
  }
}

/*
 * A toolbar button whose action cannot be undone, such as Sign Out Everywhere (NavButtonsViewComponent.DangerCssClass), in
 * the look of Refresh Authorization of a data container in Invantive Cloud (ul.menu li.refresh-authorization.urgent).
 */
ul.menu li.danger
{ border: 1px solid #a30f0f;
}

ul.menu li.danger:hover
{ border-color: #fd1c1c;
}

/*
 * A button which removes or withdraws something. Cloud only styles an input this way; Connect
 * posts with buttons, so the same colours are given to a button here.
 */
button.delete
{ background: #ff0000;
  border: 1px solid #cc0000;
}

.buttons
{ align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.notice
{ background: #eef6ff;
  border-left: 4px solid #48aff2;
  margin: 8px 0;
  padding: 6px 10px;
}

.notice.warn
{ background: #fff6e0;
  border-left-color: #ecaa07;
}

.consent
{ display: grid;
  gap: 4px 16px;
  grid-template-columns: max-content 1fr;
  margin: 8px 0 12px 0;
}

.consent dt
{ color: #646464;
}

.consent dd
{ margin: 0;
}

.scope
{ color: #646464;
}

/*
 * Cloud's top bar starts with its app launcher, which is left out when no application is
 * configured (`Pages:AppLauncher`); without this the logo then touches the edge of the window.
 */
.invantive-connect .menuTop > .app:first-child
{ margin-left: 10px;
}

/*
 * The pages a user meets sit in Cloud's `onBoardingWrapper`, whose heading is a band across the
 * top. Cloud has nothing else in it than one form with a padding of 10 pixels; the paragraphs
 * Connect has beside its form get the same distance to the edge.
 */
.onBoardingWrapper.content > :not(h1):not(form)
{ margin: 10px;
}

.field
{ display: flex;
  flex-direction: column;
  margin: 8px 0;
}

/*
 * Cloud gives every label lex: 250px 0 0 for its rows of a label beside a value; in this
 * column that is a height of 250 pixels above every input.
 */
.field > label
{ flex: none;
  margin: 0 0 4px 0;
}

/*
 * The code of a second factor keeps the six boxes Cloud draws for it (`separateInputs`), whose
 * width is six digits; a full width would stretch the boxes and lose the one per digit.
 */
.field input[type="text"]:not([autocomplete="one-time-code"]),
.field input[type="email"],
.field input[type="password"]
{ box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.field-check
{ align-items: center;
  flex-direction: row;
  gap: 6px;
}

/*
 * In a row the flex: none of a field label keeps it at the width of its text on one line, so a
 * long text such as the trust of this computer runs out of the panel; here it shrinks and wraps.
 */
.field-check > label
{ flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

.field-check > input[type="checkbox"]
{ flex: none;
}

/*
 * In the panel a field is spaced as a list item of Cloud's log-on form, which puts its distance in
 * the margin of the label.
 */
.onBoardingWrapper .field
{ margin: 0;
}

.onBoardingWrapper .field > label
{ margin: 10px 0 3px;
}

.onBoardingWrapper .field-check
{ margin-top: 10px;
}

.onBoardingWrapper .field-check > label
{ margin: 0;
}

/*
 * Cloud centres every link of the form, except the one which belongs to a field, such as the
 * forgotten password under the password.
 */
.onBoardingWrapper form .field > a
{ text-align: left;
}

/*
 * Cloud centres the submit input of its form; Connect posts with buttons.
 */
.onBoardingWrapper form > button[type="submit"]
{ display: block;
  margin: 15px auto 5px;
}

.onBoardingWrapper .buttons
{ justify-content: center;
}

/*
 * Sign in with Exact Online as an outlined button with the logo of Exact Online, as wide as the log-on button, so it
 * reads as an equal way in; "or" between the two ways replaces a heading bar.
 */
.onBoardingWrapper form > button.exactOnline
{ align-items: center;
  background: #ffffff;
  border: 1px solid #ed1c24;
  box-shadow: none;
  color: #222222;
  display: flex;
  gap: 8px;
  justify-content: center;
  text-shadow: none;
}

.onBoardingWrapper form > button.exactOnline:hover,
.onBoardingWrapper form > button.exactOnline:focus-visible
{ background: #fdecec;
}

/*
 * Visma and Teamleader as outlined buttons like Exact Online, in a neutral grey, each a row below the one before.
 */
.onBoardingWrapper form > button.externalPlatform
{ align-items: center;
  background: #ffffff;
  border: 1px solid #8c8c8c;
  box-shadow: none;
  color: #222222;
  display: flex;
  gap: 8px;
  justify-content: center;
  text-shadow: none;
}

.onBoardingWrapper form > button.externalPlatform:hover,
.onBoardingWrapper form > button.externalPlatform:focus-visible
{ background: #f0f0f0;
}

.externalPlatformForm
{ margin-top: 10px;
}

.externalLastUsed
{ display: block;
  margin: 4px 0 8px 0;
  text-align: center;
}

/*
 * "Other platforms" under the at most three buttons of external parties (S-30), centred like "Last used on this device".
 */
.onBoardingWrapper.content .otherPlatforms
{ border: 1px solid #8c8c8c;
  border-radius: 4px;
  color: inherit;
  display: block;
  margin: 10px 0 0 0;
  opacity: 0.85;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
}

.onBoardingWrapper.content .otherPlatforms:hover,
.onBoardingWrapper.content .otherPlatforms:focus-visible
{ opacity: 1;
}

/*
 * A sign-in whose address belongs to an Invantive account (itgencnt600): the explanation as plain text, then Log On with
 * Invantive Connect as an outlined button like those of the parties, with the logo of Connect and its blue, at the inset
 * of the panel.
 */
.onBoardingWrapper.content > .knownAddress
{ margin: 12px 20px 0 20px;
}

.onBoardingWrapper.content > .refusedLogOn
{ margin: 18px 20px 4px 20px;
}

.onBoardingWrapper form > button.invantiveConnect
{ align-items: center;
  background: #ffffff;
  border: 1px solid #48aff2;
  box-shadow: none;
  color: #222222;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0 auto;
  text-shadow: none;
}

.onBoardingWrapper form > button.invantiveConnect:hover,
.onBoardingWrapper form > button.invantiveConnect:focus-visible
{ background: #eaf5fd;
}

/*
 * The tabs of the account page, in the look of the tabs of Invantive Cloud (cloudTabs of its cloud-refresh.css), built by
 * cloud-tabs.js. The colours follow the theme, so the line and the text read in the light and the dark one.
 */
.content .cloudTabs
{ border-bottom: 1px solid #8c8c8c;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 18px 0;
}

.content .cloudTab
{ border-bottom: 3px solid transparent;
  color: inherit !important;
  padding: 9px 18px;
  text-decoration: none !important;
}

.content .cloudTab:hover
{ border-bottom-color: #8c8c8c;
}

.content .cloudTab.active
{ border-bottom-color: #48aff2;
  font-weight: 600;
}

/*
 * Each way into the account as a card in the look of the connections of an installation in Invantive Cloud (storeChoice,
 * storeButtonDanger of its store.css): panel with a thin line, logo of the platform, its name, one muted line with the
 * user, since and last used, and Remove outlined in red at the right.
 */
.content .signInMethods
{ display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px 0;
  max-width: 900px;
}

.content .signInMethod
{ align-items: center;
  background: #ffffff;
  border: 1px solid #d6d6d6;
  border-radius: 3px;
  display: flex;
  gap: 14px;
  padding: 12px 16px;
}

.signInMethodIcon
{ flex: none;
  height: 28px;
  object-fit: contain;
  width: 28px;
}

.signInMethodText
{ display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.signInMethodTitle
{ font-size: 15px;
  font-weight: 600;
}

.signInMethodDetail
{ color: #666666;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/*
 * The buttons of a card at its right, as storeButton of Cloud: Change outlined in blue (storeButtonSecondary), Remove
 * outlined in red (storeButtonDanger). Remove is a form; site.css gives every form of the content a grey framed box, which
 * it drops.
 */
.content .signInMethodActions
{ display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
}

.content .signInMethodRemove
{ background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.content .signInMethodButton
{ background: transparent;
  border: 1px solid #2a6db0;
  border-radius: 3px;
  box-shadow: none;
  color: #2a6db0;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  min-width: 0;
  padding: 9px 20px;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
}

.content .signInMethodButton.signInMethodButtonDanger
{ border-color: #b3261e;
  color: #b3261e;
}

@media (prefers-color-scheme: dark)
{ .content .signInMethod
  { background: #262626;
    border-color: #4a4a4a;
  }

  .signInMethodDetail
  { color: #aaaaaa;
  }

  .content .signInMethodButton
  { border-color: #6db3f2;
    color: #6db3f2;
  }

  .content .signInMethodButton.signInMethodButtonDanger
  { border-color: #ff8a80;
    color: #ff8a80;
  }
}

.content .signInMethodsSetPassword
{ margin: 0 0 18px 0;
}

/*
 * The page of all platforms: the parties as tiles in three columns, two on a telephone. A tile is outlined and takes the
 * colours of the theme, so it does not glare in the dark one.
 */
.onBoardingWrapper.content > .platformGrid
{ display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 20px 14px 20px;
}

@media (max-width: 480px)
{ .onBoardingWrapper.content > .platformGrid
  { grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.onBoardingWrapper.content .platformTile
{ align-items: center;
  background: transparent;
  border: 1px solid #8c8c8c;
  border-radius: 6px;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 84px;
  padding: 12px 6px;
  text-align: center;
  text-decoration: none;
}

.onBoardingWrapper.content .platformTile:hover,
.onBoardingWrapper.content .platformTile:focus-visible
{ background: rgba(0, 0, 0, 0.05);
  border-color: #5f5f5f;
}

.platformTile > img
{ height: 28px;
  width: 28px;
}

.platformTileLastUsed
{ font-size: 0.8em;
  opacity: 0.8;
}

@media (prefers-color-scheme: dark)
{ .onBoardingWrapper.content .platformTile:hover,
  .onBoardingWrapper.content .platformTile:focus-visible
  { background: rgba(255, 255, 255, 0.08);
    border-color: #bfbfbf;
  }
}

.onBoardingWrapper.content > .platformBack
{ display: block;
  margin: 4px 20px 14px 20px;
}

.exactOnlineIcon
{ height: 18px;
  margin: -2px 0;
  width: 18px;
}

/*
 * The list of countries as wide as the fields of the log-on above it.
 */
.onBoardingWrapper .tooltipWrapper > select
{ flex: 1;
}

.onBoardingWrapper.content > .logonDivider
{ align-items: center;
  color: #646464;
  display: flex;
  gap: 10px;
  margin: 4px 20px;
}

.logonDivider::before,
.logonDivider::after
{ border-top: 1px solid #d6d6d6;
  content: "";
  flex: 1;
}

@media (prefers-color-scheme: dark)
{ .onBoardingWrapper.content > .logonDivider
  { color: #bfbfbf;
  }

  .logonDivider::before,
  .logonDivider::after
  { border-top-color: #6a6a6a;
  }
}

.appContent table.dataTable tbody tr[data-link]
{ cursor: pointer;
}

@media (prefers-color-scheme: dark)
{ .good
  { color: #7fd13b;
  }

  .bad,
  .error
  { color: #ff6b6b;
  }

  .note,
  .scope,
  .consent dt
  { color: #bfbfbf;
  }

  .notice
  { background: #2a2a2a;
    color: #ffffff;
  }

  .notice.warn
  { background: #3a3220;
  }

  .content,
  .content p,
  .consent dd
  { color: #ffffff;
  }
}

/*
 * The logo a client which registered itself states, beside the question on the consent page; its
 * size is fixed so an image of another site cannot take over the page.
 */
.client-logo
{ float: right;
  height: 64px;
  margin: 0 0 8px 16px;
  object-fit: contain;
  width: 64px;
}

/*
 * Skip link for keyboard and screen reader users (UI Automation / accessibility): out of sight until
 * it receives focus, then the first thing on the page.
 */
.skip-link
{ position: absolute;
  left: -10000px;
  top: 0;
  z-index: 10000;
  padding: 8px 16px;
  background: #fff;
  color: #000;
}

.skip-link:focus
{ left: 0;
}

/*
 * Text for assistive technology only.
 */
.visually-hidden
{ position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#main-content:focus
{ outline: none;
}

/*
 * The choice of language in the top bar: the language of the page, and a list of the others
 * under it. The bar is dark, so the button is drawn in white and the list in the white panel of
 * the menu of the user, which it is placed beside. A native disclosure: the list shows while
 * the element is open, and the button is at least 24 pixels high (WCAG 2.5.8).
 */
.languageWrapper
{ align-items: center;
  color: #fff;
  display: flex;
  margin-right: 10px;
  position: relative;
}

.languageWrapper form
{ background: none;
  border: 0;
  box-shadow: none;
  margin: 0;
  overflow: visible;
  padding: 0;
}

.languageMenu > summary
{ align-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  gap: 6px;
  list-style: none;
  min-height: 28px;
  padding: 2px 8px;
}

.languageMenu > summary::-webkit-details-marker
{ display: none;
}

.languageMenu > summary::after
{ border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  content: "";
  height: 0;
  width: 0;
}

.languageMenu[open] > summary::after
{ border-bottom: 6px solid currentColor;
  border-top: 0;
}

.languageMenu > summary:hover,
.languageMenu[open] > summary
{ border-color: #fff;
}

.languageMenu > summary:focus-visible,
.languageList button:focus-visible
{ outline: 2px solid #1b6ec2;
  outline-offset: 1px;
}

.languageMenu > summary:focus-visible
{ outline-color: #fff;
}

.languageList
{ background: #fff;
  border: 1px solid #646464;
  color: #000;
  list-style: none;
  margin: 6px 0 0;
  min-width: 160px;
  padding: 0;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
}

.languageList li
{ display: block;
  list-style: none;
}

.languageList button
{ background: none;
  border: 0;
  color: #000;
  cursor: pointer;
  font: inherit;
  min-height: 36px;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.languageList button:hover
{ background: #e2f4ff;
}

.languageList button[aria-current="true"]
{ font-weight: 700;
}

/*
 * A list of choices in a row of the edit form of Cloud, one under the other: the checkbox in front
 * of its label, as Cloud draws a list of choices inside a row, and not a run of labels which wraps
 * wherever the line ends.
 */
.edit-form li > ul.choices
{ display: flex;
  flex: 1 0 0;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.edit-form li > ul.choices > li
{ align-items: center;
  display: flex;
  gap: 6px;
  margin: 2px 0;
}

.edit-form li > ul.choices > li > label
{ flex: 0 1 auto;
  font-weight: 400;
  margin: 0;
}

/*
 * Links on the dark surfaces (the panel of the sign-in pages, the footer): the blue of Cloud for a
 * link is 3.4:1 against them, where WCAG 1.4.3 asks for 4.5:1, so they take a lighter blue.
 * Targets are at least 24 by 24 pixels (WCAG 2.5.8): a link on a line of its own is not exempt as
 * a link inside a sentence is.
 */
.onBoardingWrapper a,
.onBoardingWrapper form a,
footer a
{ color: #b3e0ff;
}

footer li a,
.onBoardingWrapper form .field > a,
.onBoardingWrapper .buttons a
{ display: inline-block;
  line-height: 24px;
  min-height: 24px;
}

.onBoardingWrapper input[type="checkbox"]
{ height: 24px;
  width: 24px;
}

/*
 * The contact links and the help link of the top bar are links on a line of their own: 24 by 24
 * pixels at least (WCAG 2.5.8).
 */
#top-phone,
#top-email
{ align-items: center;
  display: inline-flex;
  min-height: 24px;
}

#top-help
{ min-height: 24px;
  min-width: 24px;
}

/*
 * The Invantive account as an option of its own, as Exact Online is: the logo of Invantive Connect, what the option is,
 * and at the right whether it was last used on this device.
 */
.logonOption
{ align-items: center;
  display: flex;
  gap: 10px;
  margin: 0 0 14px 0;
}

.logonOption .appLogo
{ flex: 0 0 32px;
  width: 32px;
}

.logonOptionTitle
{ flex: 1 1 auto;
  font-weight: 600;
}

#logon-invantive-last-used
{ flex: 0 0 auto;
}

/* "Last used on this device" of Exact Online on a line of its own under its button. */
#logon-exact-online-last-used
{ display: block;
  margin: 4px 0 8px 0;
  text-align: center;
}

#logon-sign-up
{ display: inline-block;
  line-height: 24px;
  min-height: 24px;
}

/*
 * The menu under the user at the top right in dark mode, as in Invantive Cloud (site.css there); it stayed white. The
 * colours of the other dark panels: #2a2a2a with borders of #4a4a4a, headers and footer a step lighter.
 */
@media (prefers-color-scheme: dark)
{ #editSelectedDelegationForm.dropdown-collapsed .settingsList
  { background: #2a2a2a;
    border-color: #4a4a4a;
    color: #eee;
  }

  .settingsList ul li
, .settingsList ul li a
  { color: #eee;
  }

  .settingsList ul li:hover
  { background: #3a3f47;
  }

  .settingsList li.selected-organisation
  { background-color: #333;
    border-bottom-color: #4a4a4a;
    border-top-color: #4a4a4a;
  }

  .settingsList ul li.selected-organisation:hover
  { background: #44505c;
  }

  .settingsList .listHeader
, .settingsList .listFooter
  { background: #3a3a3a;
  }

  .settingsList .listHeader span
, .settingsList .listFooter a
, .settingsList .listFooter span
  { color: #bbb;
  }

  .settingsList .listFooter span#nodeMachineName
  { background: #646464;
    color: #fff;
  }
}
