/* HEADER */

.user-nav {
  background: #4379b2;
}

.user-nav-inner {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: var(--edge);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  min-height: 50px;
}

.user-nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}

.user-nav-links a {
  color: var(--white);
  font-size: .9rem;
  text-decoration: none;
  padding: 0 .9rem;
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.user-nav-links a:first-child {
  padding-left: 0;
}

.user-nav-links span.is-current:first-child {
  padding-left: 0;
}

.user-nav-links a.is-current,
.user-nav-links span.is-current {
  font-weight: bold;
  color: var(--white);
  font-size: .9rem;
  background: none;
  padding: 0 .9rem;
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: center;
  cursor: default;
}

.user-nav-meta {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-nav-meta a {
  color: var(--white);
  font-size: .9rem;
  text-decoration: none;
  padding: 0 0 0 .9rem;
  display: flex;
  align-items: center;
}

@media (hover: hover) {
  .user-nav-links a:hover,
  .user-nav-meta a:hover {
    text-decoration-line: underline;
    text-underline-offset: 3px;
    color: var(--white);
  }
}

@media (max-width: 900px) {
  .user-nav-inner {
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
  }
  .user-nav-links {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    border-top: 2px solid rgba(0,0,0,.12);
  }
  .user-nav-links a {
    font-size: 1rem;
    padding: .7rem var(--edge);
    white-space: normal;
    align-self: auto;
    border-bottom: 1px solid rgba(0,0,0,.12);
  }
  .user-nav-links a:first-child {
    padding-left: var(--edge);
  }
  .user-nav-links span.is-current:first-child {
    padding-left: var(--edge);
  }
  .user-nav-links a.is-current,
  .user-nav-links span.is-current {
    font-size: 1rem;
    background: #4c81b8;
    padding: .7rem var(--edge);
    white-space: normal;
    align-self: auto;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,.12);
  }
  .user-nav-meta {
    flex-direction: column;
    white-space: normal;
  }
  .user-nav-meta a {
    font-size: 1rem;
    padding: .7rem var(--edge);
    border-bottom: 1px solid rgba(0,0,0,.12);
    display: flex;
    align-items: center;
  }
}


/* EXAM START */

.exam-start-wrap {
  text-align: center;
}

.progress-title {
  color: var(--txt);
  margin-bottom: .3rem;
}

.progress-bar-track {
  height: 16px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
}

.progress-info {
  font-size: .9rem;
  color: var(--txt);
  margin-bottom: 2rem;
}


/* STATISTICS */

.stat-total {
  padding: 0;
  text-align: center;
  margin-bottom: 0;
}

.stat-total-percent {
  font-size: 3rem;
  font-weight: normal;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-total-percent.is-pass {
  color: var(--green);
}

.stat-total-percent.is-fail {
  color: var(--red);
}

.stat-total-label {
  font-size: 1rem;
  color: var(--txt);
}

.stat-total-bar-track {
  position: relative;
  height: 16px;
  background: #e0e0e0;
  border-radius: 3px;
  margin: 1.1rem 0 0;
  overflow: hidden;
}

.stat-total-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.stat-total-bar-fill.is-pass {
  background: var(--green);
}

.stat-total-bar-fill.is-fail {
  background: var(--red);
}

.stat-total-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #55ac69;
  border-radius: 1px;
}

.stat-info {
  margin-top: .2rem;
  font-size: .9rem;
  color: var(--txt);
  text-align: center;
}

.stat-info:first-of-type {
  margin-top: .4rem;
}

.stat-categories {
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.stat-category-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem 0;
  padding: .7rem 0;
}

.stat-category-name {
  font-size: .9rem;
  color: var(--txt);
  align-self: end;
}

.stat-category-percent {
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  align-self: end;
}

.stat-category-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.stat-category-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.stat-category-bar-fill.is-pass {
  background: var(--green);
}

.stat-category-bar-fill.is-fail {
  background: var(--red);
}

.stat-history {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .85rem;
  margin-top: -.85rem;
}

.stat-card td {
  padding: .8rem 0;
  vertical-align: middle;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-card td:first-child {
  padding-left: .9rem;
  padding-right: .9rem;
  border-left: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  width: 3.5rem;
}

.stat-card td:last-child {
  padding-right: .9rem;
  border-right: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
}

.stat-card-percent {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1;
}

.stat-card-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding-inline: .9rem;
}

.stat-card-score {
  font-size: 1rem;
  color: var(--link);
  font-weight: normal;
}

.stat-card-muted {
  opacity: .5;
}

.stat-card-meta {
  font-size: .9rem;
  color: var(--txt);
}

.stat-card-right {
  text-align: right;
  white-space: nowrap;
}

.stat-card-date {
  font-size: .9rem;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}

.stat-card-time {
  font-size: .9rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stat-percent-pass {
  color: var(--green);
}

.stat-percent-fail {
  color: var(--red);
}

@media (max-width: 370px) {
  .stat-card-time {
    display: none;
  }
}


/* SEARCH */

.search-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.search-form .field-input {
  width: auto;
  flex: 1;
  max-width: 400px;
}

.search-form .search-submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .75rem;
  background: var(--white);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--txt);
  font-family: inherit;
}

@media (hover: hover) {
  .search-form .search-submit:hover {
    border-color: var(--txt);
  }
}

.search-meta {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.search-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 .6rem;
  margin-top: -.6rem;
}

.search-row td {
  padding: .8rem 0;
  vertical-align: middle;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.search-row td:first-child {
  padding-left: .9rem;
  border-left: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
}

.search-row td:last-child {
  padding-right: .9rem;
  padding-left: 1rem;
  border-right: 1px solid var(--border);
  border-radius: 0 8px 8px 0;
  width: 130px;
  text-align: right;
}

.search-row-question {
  font-size: 1rem;
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  padding-right: 1rem;
}

.search-row-question:visited {
  color: var(--link-visited);
}

.search-row-thumb {
  width: 120px;
  height: auto;
  max-height: 90px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.search-row-thumb.search-row-thumb-small {
  width: 70px;
}


/* RECEIPTS */

.receipt-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.receipt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem .9rem;
}

.receipt-date {
  font-size: 1rem;
  font-weight: bold;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}

.receipt-desc {
  font-size: 1rem;
  color: var(--txt);
}

.receipt-amount {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--txt);
  margin-bottom: .75rem;
}
