/* sso.css - single sign-on: the provider buttons on the sign-in screen and the Single Sign-On tab of Users & Access.
   Colours come from the theme tokens (one Carbon red pair for contrast), so every theme follows. */

/* the sign-in buttons (js/core/sso.js) */
.hx-sso { display: flex; flex-direction: column; gap: var(--cds-spacing-03); margin: 0 0 var(--cds-spacing-05); }
.hx-sso__btn { width: 100%; justify-content: center; min-height: 48px; }
.hx-sso__note { margin: 0; font-size: var(--f-md); }
.hx-sso__or { display: flex; align-items: center; gap: var(--cds-spacing-04); margin: var(--cds-spacing-03) 0 0;
  color: var(--mut); font-size: var(--f-ms); }
.hx-sso__or::before, .hx-sso__or::after { content: ""; flex: 1 1 0; border-top: 1px solid var(--border); }

/* the administration tab (js/views/views_sso_admin.js) */
.hx-sso-admin .hx-card > .hx-h2:first-child { margin-top: 0; }
.hx-sso-admin .hx-card__lede { margin: 0 0 var(--cds-spacing-04); color: var(--mut); font-size: var(--f-md); max-width: 72ch; }
.hx-sso__map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--cds-spacing-03);
  align-items: end; margin: 0 0 var(--cds-spacing-03); }
.hx-sso__map .hx-field { margin: 0; }
.hx-sso-admin .hx-switch-row { display: flex; flex-wrap: wrap; gap: var(--cds-spacing-05); align-items: center; }
.hx-sso-admin .hx-fieldset > .hx-field:last-child { margin-bottom: 0; }

@media (max-width: 671px) {
  .hx-sso__map { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--cds-spacing-04);
    border-bottom: 1px solid var(--border); }
}

/* the role picker's button sits on the field's baseline; a section's title and its action share a line */
.hx-sso-admin [data-scim-role] .hx-row { align-items: flex-end; }
.hx-sso-admin [data-scim-role] .hx-field { margin-bottom: 0; }
.hx-sso-admin .hx-detail-head { align-items: center; }

/* a destructive text button keeps 4.5:1 on every theme's panel (red 30 on the dark themes, red 60 on the light ones) */
.hx-sso-admin .hx-danger-text { color: var(--cds-text-error); }
[data-carbon-theme="g10"] .hx-sso-admin .hx-danger-text,
[data-carbon-theme="white"] .hx-sso-admin .hx-danger-text { color: var(--cds-text-error); }

/* a provider's four actions wrap inside their cell instead of pushing the table sideways */
.hx-sso-admin td.hx-sso-acts { white-space: normal; min-width: 12rem; }
.hx-sso-admin td.hx-sso-acts .hx-btn { margin: 0 var(--cds-spacing-02) var(--cds-spacing-02) 0; }
