/*
 * Tahrirchi task pane.
 *
 * Reproduces the original Angular/Tailwind design with plain CSS. Values are
 * the resolved Tailwind ones from the old tailwind.config.js and templates -
 * space-x-3 is 12px, px-5 is 20px, rounded-2xl is 16px, text-lg is 18px, and so
 * on - so the result should be pixel-comparable to the 2023 build.
 *
 * IE11 constraints (docs/PLATFORM.md): no custom properties, no CSS Grid, no
 * position:sticky, no flexbox gap, no :is()/:where(). Flexbox uses explicit
 * three-value shorthands because IE11 miscomputes flex-basis when omitted.
 */

/* ============================================================
   Mulish, self-hosted.
   Linked from fonts.googleapis.com in the old build; self-hosted here so the
   pane renders correctly offline and the manifest needs no Google AppDomains.
   IE11 cannot read woff2, so the static woff faces are declared last - IE11
   also ignores unicode-range, and last-declared wins there.
   ============================================================ */

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/mulish-var-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/mulish-var-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/mulish-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/mulish-var-latin.woff2") format("woff2");
  /* U+02BB-02BC here are the Uzbek apostrophes - they must render in Mulish too. */
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IE11 fallbacks - one static file per weight, all scripts, no unicode-range. */
@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 400;
  src: url("assets/fonts/mulish-400.woff") format("woff");
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 600;
  src: url("assets/fonts/mulish-600.woff") format("woff");
}

@font-face {
  font-family: "Mulish";
  font-style: normal;
  font-weight: 700;
  src: url("assets/fonts/mulish-700.woff") format("woff");
}

/* ============================================================
   Reset
   ============================================================ */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

body {
  font-family: "Mulish", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #17171a;
  -webkit-text-size-adjust: 100%;
  /* The pane has its own scroll region; hide the outer scrollbar like the old build. */
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

img {
  border: 0;
  vertical-align: middle;
}

.select-none {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ============================================================
   Boot placeholder
   ============================================================ */

/* Also used by the JS loading state in views/shell.ts, so the handover from the
   static markup to the rendered app is invisible. */
.boot {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  /* Percentage heights need a height on every ancestor, which html/body have. */
  height: 100%;
  padding: 24px 20px;
  text-align: center;
}

.boot__logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  margin-bottom: 20px;
}

.boot__row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.boot__text {
  margin-left: 8px;
  font-size: 13px;
  color: #647481;
}

/* ============================================================
   Shell
   ============================================================ */

#app,
.app {
  height: 100%;
}

.app {
  position: relative;
  height: 100%;
}

/* Fixed 48px bar, matching max-h-12 + the old box-shadow. */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 48px;
  padding: 12px 20px;
  background: #ffffff;
  box-shadow: 0 3px 8px 2px rgba(0, 0, 0, 0.07);
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
}

.header__left {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
}

/* space-x-3 */
.header__left > * {
  margin-right: 12px;
}

.header__left > *:last-child {
  margin-right: 0;
}

/* Intrinsic 716x165 (4.34:1); height drives it, width follows. */
.header__logo {
  height: 22px;
  width: auto;
}

.header__badge {
  display: -ms-inline-flexbox;
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Korxona and Max seats read as a distinct tier, not just "paid". */
.header__badge--enterprise {
  color: #2b579a;
  background: #dfeaf4;
}

.header__badge-star {
  width: 12px;
  height: 12px;
  margin-right: 4px;
}

.header__settings {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 9999px;
  line-height: 0;
  text-align: center;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.header__settings:hover {
  background: #f4f4f4;
}

.header__settings img {
  width: 20px;
  height: 20px;
}

/* Content sits below the fixed bar, exactly like the old mt-12. */
.content {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* Hide the scrollbar as the old app did (-ms- for IE, ::-webkit- below). */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

/* When signed out there is neither header nor tab bar, so content fills the pane. */
.content--full {
  top: 0;
  bottom: 0;
}

.content--with-nav {
  bottom: 56px;
}

/* ============================================================
   Bottom tab bar
   ============================================================ */

.nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: 56px;
  background: #ffffff;
  box-shadow: 0 -3px 8px 2px rgba(0, 0, 0, 0.07);
  display: -ms-flexbox;
  display: flex;
}

.nav__tab {
  -ms-flex: 1 1 0%;
  flex: 1 1 0%;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 0;
  color: #647481;
  -webkit-transition: color 0.15s;
  transition: color 0.15s;
}

.nav__tab:hover {
  color: #3bb467;
}

/* Both icons draw with currentColor, so the tint is all this needs. */
.nav__tab--active {
  color: #3bb467;
}

.nav__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.nav__label {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
}

/* ============================================================
   Editor
   ============================================================ */

.editor {
  padding: 16px 0;
}

.editor__summary {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
  padding: 0 16px;
  margin-bottom: 16px;
}

.editor__summary-left {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
}

.editor__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-right: 8px;
}

.editor__count {
  padding: 4px 8px;
  border-radius: 6px;
  background: #dfeaf4;
  font-size: 12px;
  font-weight: 600;
}

.editor__summary-right {
  display: -ms-inline-flexbox;
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
}

.editor__score {
  font-size: 16px;
  font-weight: 700;
  color: #40d275;
}

/* ============================================================
   Cards - the accordion from the old mat-expansion-panel
   ============================================================ */

.list {
  padding: 0 16px 40px 16px;
}

.card {
  margin-bottom: 12px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  -webkit-transition: box-shadow 0.2s;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.card:hover,
.card--open {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card__head {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  padding: 12px 20px;
  text-align: left;
}

.card__dot {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border-radius: 9999px;
  background: #f95a5a;
}

.card__dot--apostrophe {
  background: #1d92f1;
}

/* Advice from the speller: split, hyphenate, capitals, the Uzbek word. */
.card__dot--advice {
  background: #e5b435;
}

/* An unknown name: may well be right. */
.card__dot--info {
  background: #6f86d9;
}

.card__word {
  font-size: 18px;
  font-weight: 600;
  color: #17171a;
  margin-right: 12px;
  /* Long tokens wrap instead of widening the pane. */
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.card__type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #647481;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.card__count {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #647481;
  background: #f3f7f9;
}

.card__body {
  padding: 0 20px 12px 20px;
}

.card__fixes {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;
}

.fix {
  margin: 0 8px 8px 0;
  padding: 8px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: #ffffff;
  background: #40d275;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.fix:hover {
  background: #3bb467;
}

.fix--busy {
  opacity: 0.6;
  cursor: default;
}

.card__desc {
  padding-bottom: 8px;
  color: #17171a;
}

.card__actions {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;
}

.link {
  margin-right: 16px;
  padding: 0;
  font-size: 12px;
  color: #647481;
  text-decoration: underline;
  -webkit-transition: color 0.15s;
  transition: color 0.15s;
}

.link:hover {
  color: #17171a;
}

.link:last-child {
  margin-right: 0;
}

.card__error {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #f95a5a;
  background: #fee5e5;
}

.list__more {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #647481;
  background: #f3f7f9;
}

/* ============================================================
   Apostrophe banner - same card treatment as the old component
   ============================================================ */

.banner {
  margin: 0 16px 12px 16px;
  padding: 12px 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.banner__head {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 8px;
}

.banner__text {
  margin-bottom: 8px;
  font-size: 14px;
}

.banner__button {
  display: -ms-inline-flexbox;
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  color: #ffffff;
  background: #40d275;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.banner__button:hover {
  background: #3bb467;
}

.banner__button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.banner__note {
  margin-top: 8px;
  font-size: 12px;
  color: #647481;
}

/* ============================================================
   Empty / success / error states
   ============================================================ */

.state {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  /* The old layout pulled these up out of centre. */
  margin-top: 15vh;
}

.state__art {
  height: 128px;
  width: auto;
  margin-bottom: 8px;
}

.state__title {
  font-size: 18px;
  font-weight: 600;
}

.state__sub {
  margin-top: 4px;
  font-size: 14px;
  color: #647481;
}

.state__detail {
  margin-top: 8px;
  font-size: 11px;
  color: #a1a7b7;
}

/* Boot failure detail - must be selectable so a user can send it to support. */
.boot-error {
  margin-top: 20px;
  text-align: left;
}

.boot-error__detail {
  font-size: 11px;
  line-height: 1.5;
  color: #647481;
  /* Preserves the newline between the error and the environment line. */
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.boot-error .linkbox__copy {
  display: block;
  margin: 10px auto 0 auto;
}

.state .btn {
  margin-top: 16px;
}

/* ============================================================
   Skeleton
   ============================================================ */

.skeleton {
  padding: 0 16px;
}

.skeleton-card {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 12px;
  padding: 20px 16px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.skeleton-dot {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 9999px;
  background: #f3f4f6;
}

.skeleton-line {
  width: 128px;
  height: 8px;
  border-radius: 9999px;
  background: #f3f4f6;
}

.skeleton-card {
  -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@-webkit-keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

/* ============================================================
   Loading spinner - the old rotate + dash SVG animation
   ============================================================ */

.loading-spinner {
  width: 20px;
  height: 20px;
  color: #2cc162;
  -webkit-animation: rotate 1.4s linear infinite;
  animation: rotate 1.4s linear infinite;
}

.loading-spinner .path {
  stroke-linecap: round;
  -webkit-animation: dash 1.4s ease-in-out infinite;
  animation: dash 1.4s ease-in-out infinite;
}

@-webkit-keyframes rotate {
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes dash {
  0% {
    stroke-dasharray: 1, 126;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 126;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 126;
    stroke-dashoffset: -124;
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 126;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 126;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 126;
    stroke-dashoffset: -124;
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: -ms-inline-flexbox;
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 700;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.btn--primary {
  color: #ffffff;
  background: #40d275;
}

.btn--primary:hover {
  background: #3bb467;
}

.btn--ghost {
  color: #17171a;
  background: #ecf5fa;
}

.btn--ghost:hover {
  background: #dfeaf4;
}

/* ============================================================
   Settings dropdown - the old cdkConnectedOverlay menu
   ============================================================ */

.menu-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
}

.menu {
  position: absolute;
  top: 44px;
  right: 12px;
  z-index: 61;
  width: 212px;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.1);
}

.menu__row {
  padding: 8px 12px;
  border-bottom: 1px solid #e9ebf0;
}

.menu__row:last-child {
  border-bottom: 0;
}

.menu__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__email {
  color: #647481;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__org {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #2b579a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__quota {
  margin-top: 2px;
  font-size: 12px;
  color: #647481;
}

.menu__label {
  margin-bottom: 8px;
}

.menu__link {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-bottom: 1px solid #e9ebf0;
  text-align: left;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.menu__link:hover {
  background: #f3f4f6;
}

.menu__link-label {
  display: -ms-inline-flexbox;
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
}

.menu__link-label img {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  opacity: 0.5;
}

.menu__link-icon {
  width: 16px;
  height: 16px;
}

.menu__link--danger {
  color: #f95a5a;
  border-bottom: 0;
  border-radius: 0 0 8px 8px;
}

.menu__link--danger:hover {
  background: #fee5e5;
}

.radio {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  cursor: pointer;
}

.radio:last-child {
  margin-bottom: 0;
}

.radio__input {
  margin: 0 6px 0 0;
  vertical-align: middle;
}

.radio__text {
  vertical-align: middle;
}

.radio code {
  font-family: Menlo, Consolas, monospace;
  font-size: 11px;
  color: #647481;
}






/* ============================================================
   Onboarding
   ============================================================ */

/*
 * Logo pinned top, everything else centred in the remaining space.
 *
 * A CSS table rather than flexbox: IE11 overflows a centred flex column upward
 * and makes the top unreachable, while a table row grows past its container
 * when the content is taller, so a short pane scrolls instead of clipping.
 */
.onboarding {
  display: table;
  width: 100%;
  height: 100%;
  text-align: center;
}

.onboarding__top {
  display: table-row;
}

.onboarding__top-cell {
  display: table-cell;
  /* Shrink-to-fit: a table row with a tiny height gives its space to the
     other row, which is what pins the logo to the top. */
  height: 1px;
  vertical-align: top;
  /* Overrides the centring inherited from .onboarding - the logo is chrome,
     not part of the centred block below it. */
  text-align: left;
  padding: 18px 20px 0 20px;
}

.onboarding__mid {
  display: table-row;
}

.onboarding__mid-cell {
  display: table-cell;
  /* Top, not middle: centred in a tall pane the login block sat so far down
     that a user saw "a white screen with a logo" and reported a crash. */
  vertical-align: top;
  padding: 24px 20px 36px 20px;
}

/* ---- the login form ---- */

.onboarding__form {
  margin-top: 16px;
  text-align: left;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #647481;
}

.field__input {
  display: block;
  width: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #e9ebf0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #17171a;
  background: #ffffff;
}

.field__input:focus {
  outline: none;
  border-color: #40d275;
  -webkit-box-shadow: 0 0 0 3px rgba(64, 210, 117, 0.2);
  box-shadow: 0 0 0 3px rgba(64, 210, 117, 0.2);
}

.field__input:disabled {
  color: #647481;
  background: #f3f7f9;
}

.field__input--invalid {
  border-color: #ee5a5a;
}

.field__error {
  margin: 4px 0 0 0;
  font-size: 11px;
  color: #ee5a5a;
}

.form__error {
  margin: 0 0 12px 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #b3261e;
  background: #fde8e6;
}

.onboarding__form .onboarding__cta {
  width: 100%;
  margin-top: 4px;
}

.onboarding__links {
  margin-top: 20px;
  font-size: 12px;
  line-height: 1.5;
  color: #647481;
  text-align: center;
}

.onboarding__links-row {
  margin: 0 0 6px 0;
}

.onboarding__links-row--muted {
  margin-top: 12px;
  font-size: 11px;
}

.onboarding__link {
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: #2b579a;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.onboarding__link:hover {
  color: #1e3f73;
}

.onboarding__reason {
  margin: 0 0 12px 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #8a5a00;
  background: #fff4d6;
}

.onboarding__logo {
  height: 26px;
  width: auto;
  /* Never let the lockup overflow a narrow pane. */
  max-width: 100%;
}

.onboarding__title {
  font-size: 18px;
  font-weight: 700;
}

.onboarding__text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #647481;
}

/* One primary action, sized consistently rather than hugging its label. */
.onboarding__cta {
  margin-top: 20px;
  min-width: 190px;
}

.onboarding__hint {
  margin-top: 22px;
  font-size: 12px;
  color: #647481;
}

/* "YOKI" between the form and the pairing link: a rule either side of the
   word. A table, not flex: IE11 gets table-cell widths right and needs no
   prefixes for it. */
.onboarding__divider {
  display: table;
  width: 100%;
  margin-top: 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #98a4ad;
}

.onboarding__divider::before,
.onboarding__divider::after {
  content: "";
  display: table-cell;
  width: 50%;
  background-image: linear-gradient(#e9ebf0, #e9ebf0);
  background-size: 100% 1px;
  background-position: center;
  background-repeat: no-repeat;
}

.onboarding__divider-text {
  display: table-cell;
  padding: 0 10px;
  white-space: nowrap;
}

.onboarding__pairing .onboarding__hint {
  margin-top: 12px;
}

/* URL plus its copy action, as one centred object. */
.linkbox {
  margin-top: 6px;
  padding: 12px;
  border-radius: 10px;
  background: #f3f7f9;
  text-align: center;
}

.linkbox__url {
  font-size: 11px;
  line-height: 1.6;
  color: #647481;
  /* A login URL has no spaces, so it can only wrap mid-token. */
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.linkbox__copy {
  margin-top: 10px;
  padding: 6px 16px;
  border: 1px solid #e9ebf0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2b579a;
  background: #ffffff;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.linkbox__copy:hover {
  background: #ecf5fa;
}

.linkbox__copy--done {
  color: #3bb467;
  border-color: #40d275;
}

.onboarding__spinner-row {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin-top: 24px;
}

.onboarding__status {
  margin-left: 8px;
  font-size: 12px;
  color: #647481;
}

/* ============================================================
   Transliteration tab
   ============================================================ */

.translit {
  display: table;
  width: 100%;
  height: 100%;
  text-align: center;
}

.translit__inner {
  display: table-cell;
  /* Top, not middle: the screen has four states of different heights and the
     title must not jump between them. */
  vertical-align: top;
  padding: 20px 20px 32px 20px;
}

.translit__art {
  width: 108px;
  max-width: 60%;
  height: auto;
  margin-bottom: 8px;
}

.translit__section {
  margin-top: 4px;
}

.translit__subtitle {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
}

.translit__detect {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #647481;
}

/* What happens to the document. It used to be 11px #98a4ad - 2.6:1 on white,
   unreadable for the one sentence that says the original is left alone. */
.translit__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #647481;
}

/* The user picked the direction the detection argues against. */
.translit__detect--warn {
  color: #8a5a00;
}

/* "Batafsil · Orqaga" under the failed screen's one button. */
.translit__links {
  margin-top: 16px;
  font-size: 12px;
  color: #647481;
}

.translit__dot {
  margin: 0 8px;
}

.translit__out {
  margin-top: 16px;
}

/* The website, offered beside the button rather than after a failure. */
.translit__alt {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #647481;
}

.translit__stage {
  margin-top: 10px;
  font-size: 12px;
  color: #647481;
}

.translit__file {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #17171a;
  word-wrap: break-word;
  word-break: break-all;
}

.translit__text.translit__text--error {
  color: #b3261e;
}

.translit__actions .btn {
  margin: 16px 4px 0 4px;
}

/* Direction: two halves of one control. Flex with explicit basis - IE11 gets
   the shorthand wrong - and a 50% width so the halves stay equal. */
.seg {
  display: -ms-flexbox;
  display: flex;
  margin-top: 16px;
  border: 1px solid #e9ebf0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.seg__btn {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  width: 50%;
  padding: 9px 8px;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #647481;
  background: transparent;
  cursor: pointer;
  -webkit-transition: background-color 0.15s;
  transition: background-color 0.15s;
}

.seg__btn + .seg__btn {
  border-left: 1px solid #e9ebf0;
}

.seg__btn:hover {
  background: #f6fcff;
}

.seg__btn--on {
  color: #17171a;
  background: #ecf5fa;
}

/* One bar for the whole conversion; a stage of unknown length shimmers. */
.progress {
  height: 6px;
  margin-top: 20px;
  border-radius: 3px;
  background: #e9ebf0;
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: #40d275;
  -webkit-transition: width 0.25s;
  transition: width 0.25s;
}

.progress__bar--indeterminate {
  -webkit-animation: progress-slide 1.4s ease-in-out infinite;
  animation: progress-slide 1.4s ease-in-out infinite;
}

@-webkit-keyframes progress-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

@keyframes progress-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

.translit__title {
  font-size: 18px;
  font-weight: 700;
}

.translit__text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #647481;
}

.translit__cta {
  margin-top: 20px;
  min-width: 190px;
}

/* ============================================================
   Premium modal
   ============================================================ */

.modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(23, 23, 26, 0.4);
}

.modal__box {
  margin: 48px 16px 0 16px;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  /* Slides down into place, like the old bottom sheet did from below. */
  -webkit-animation: modal-in 220ms ease-out;
  animation: modal-in 220ms ease-out;
}

@-webkit-keyframes modal-in {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-24px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}

@keyframes modal-in {
  0% {
    opacity: 0;
    transform: translateY(-24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Update island - views/update-island.ts
   A dark pill that drops in over the header when a newer build is deployed.
   ============================================================ */

.island {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  z-index: 90;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding: 10px 8px 10px 14px;
  border-radius: 22px;
  background: #17171a;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  -webkit-animation: island-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  animation: island-in 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.island__dot {
  -ms-flex: none;
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: #40d275;
  box-shadow: 0 0 0 4px rgba(64, 210, 117, 0.25);
}

.island__body {
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
}

.island__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.island__text {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.7);
}

.island__action {
  -ms-flex: none;
  flex: none;
  margin-left: 8px;
  padding: 6px 12px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #17171a;
  background: #40d275;
  cursor: pointer;
}

.island__action:hover {
  background: #5ddc8a;
}

.island__close {
  -ms-flex: none;
  flex: none;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
}

.island__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

@-webkit-keyframes island-in {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-40px) scale(0.92);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
  }
}

@keyframes island-in {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* The diagnostic report inside the error sheet - see views/error-modal.ts. */
.modal__report {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f7f9;
  font-size: 11px;
  line-height: 1.5;
  color: #647481;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
  max-height: 40vh;
  overflow-y: auto;
}

.modal__actions .btn {
  margin-top: 8px;
}

.btn--done {
  background: #3bb467;
  border-color: #3bb467;
}

.state__spinner {
  margin: 24px auto 4px auto;
  width: 32px;
  height: 32px;
  color: #40d275;
}

.state__spinner .loading-spinner {
  width: 32px;
  height: 32px;
}

.state__actions .btn {
  margin: 16px 4px 0 4px;
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
}

.modal__text {
  margin-top: 8px;
  color: #647481;
}

.modal__fallback {
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed #c2c7d4;
  border-radius: 8px;
  font-size: 12px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
}

.modal__actions {
  margin-top: 20px;
}

.modal__actions .btn {
  margin-right: 8px;
}
