/*
 * App frame on top of the TalTech theme (wwwroot/lib/taltech, copied unchanged from the design
 * system). Only what the theme does not provide: the page frame from the design canvas, the
 * header's language switch / user menu / section row, and the auth column. Theme colours and
 * components stay in the theme - do not restyle Bootstrap components here.
 */

:root {
  /* The canvas's link colours: the theme's magenta (#e4067e) reaches only 4.2:1 on the grey page. */
  --bs-link-color: #ab055f;
  --bs-link-color-rgb: 171, 5, 95;
  --bs-link-hover-color: #5b0232;
  --bs-link-hover-color-rgb: 91, 2, 50;
}

/* Page frame: footer at the bottom of short pages, content column at most 1320px. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tt-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tt-page-title {
  margin-bottom: 1.5rem;
}

.tt-page-title > h1 {
  margin: 0 0 .5rem;
}

.tt-page-title > .lead {
  margin: 0;
}

/* Data tables keep their columns and scroll inside the card on narrow screens (canvas Admin). */
.tt-table-wide {
  min-width: 640px;
}

/* Small initials badges (header user, tables) use 12px text, as on the canvas. */
.tt-initials-xs {
  font-size: .75rem;
}

/* Header: main bar padding as on the canvas, language switch, user menu, section row. */
.tt-header-main-inner {
  flex-wrap: wrap;
  gap: .5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.tt-lang {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: 0 1rem;
  font-size: .875rem;
}

.tt-lang-link {
  padding: .25rem .5rem;
  color: var(--bs-gray-800);
  text-decoration: none;
}

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

.tt-lang-link.active {
  color: var(--bs-primary);
  font-weight: 700;
}

.tt-lang-separator {
  color: var(--bs-gray-600);
}

button.tt-header-user {
  padding: .25rem 0;
  background: none;
  border: 0;
}

.tt-user-email {
  overflow-wrap: anywhere;
}

.tt-user-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tt-user-menu .dropdown-item .material-symbols-outlined {
  font-size: 1.25rem;
}

.tt-header-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1.5rem;
  padding: 0 1.5rem;
  background: var(--tt-surface);
  box-shadow: 0 1px 0 var(--bs-gray-400);
}

.tt-header-section-label {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--bs-gray-800);
}

.tt-header-section .nav-tabs {
  border-bottom: 0;
}

/* Sign-in and account pages: one centred column (Areas/Identity/Pages/_AuthLayout). */
.tt-auth {
  max-width: 560px;
  margin: 1rem auto 0;
}

.tt-auth-wide {
  max-width: 960px;
}

/* Primary action last, actions right-aligned and wrapping (canvas forms). */
.tt-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
}

/* "or" separator between the password form and the passkey / external sign-in options. */
.tt-separator-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--bs-gray-700);
  font-size: .875rem;
}

.tt-separator-text::before,
.tt-separator-text::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--tt-line);
}
