/* Hand-written styles for www.taler.net.  Everything else under static/dist/
 * is an unmodified upstream distribution.  This file is loaded after
 * dist/bootstrap/bootstrap.min.css, so a rule here wins over Bootstrap's at
 * equal specificity.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  --brand-blue: #0042b3;
  --brand-blue-dark: #003281;
  --brand-blue-light: #eef4ff;
  --brand-green: #a5c663;
  --border: #d8dee8;
  --text-muted: #545b66;
  --focus-ring: #f5a623;
}

/* ------------------------------------------------------------------ base */

html {
  /* always reserve the scrollbar, so navigating between a short and a long
   * page does not shift the layout sideways
   */
  overflow-y: scroll;
}

a,
a:link,
a:visited {
  text-decoration: grey underline;
  color: black;
}

nav a,
nav a:link,
nav a:visited {
  text-decoration: none;
}

/* The skip link is off-screen until it takes focus; display:none would
 * take it out of the tab order as well.
 */
.skip {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  position: static;
  width: auto;
  height: auto;
  background: white;
  padding: 5px;
}

/* ------------------------------------------------------------ page frame */

#mybody {
  /* override ugly bootstrap defaults */
  color: black;
  position: relative;
  min-height: 100%;
}

#mybody nav {
  border-radius: 0px;
}

#body_content {
  /* push footer down */
  min-height: 80vh;
}

#body_content .container {
  margin-bottom: 2em;
  padding-top: 1em;
  padding-bottom: 1em;
}

#body_content a {
  transition: background-color 0.3s;
}

#body_content a:hover {
  background-color: rgba(200, 200, 200, 0.5);
}

footer {
  position: relative;
  min-height: 340px;
  padding-top: 2em;
  margin-top: 2em;
}

.footer-list {
  list-style: none;
}

/* Back-to-top button, rendered by common/news.j2 at the top of #body_content.
 * It is taken out of the flow and pinned to the bottom right corner; without
 * this it shows up as a stray chevron above the page heading.
 */
#jump-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0.15rem 0.5rem rgba(21, 39, 68, 0.18);
  color: var(--brand-blue);
  text-decoration: none;
}

#jump-top:link,
#jump-top:visited {
  color: var(--brand-blue);
  text-decoration: none;
}

#jump-top:hover {
  background: var(--brand-blue-light);
  color: var(--brand-blue-dark);
}

#jump-top:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

@media print {
  #jump-top {
    display: none;
  }
}

/* overrides bootstrap defaults.  */
.navbar-brand {
  display: contents;
}

.btn-dark {
  background-color: #595959;
}

/* ------------------------------------------------------------ components */

.c_acronym {
  background-color: var(--brand-green);
}

.checkmark {
  height: 1em;
  width: 1em;
  margin-right: 0.3em;
  vertical-align: baseline;
  position: relative;
  top: 0.2em;
}

.checklist {
  margin-top: 1em;
  margin-bottom: 1em;
  list-style-type: none;
  padding-left: 0px;
  font-size: 1.2rem;
}

/* text highlighted with a translucent marker-pen stroke */
.tlr {
  display: inline-block;
  position: relative;
}

.tlr::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 25%;
  bottom: 0;
  left: 0.2em;
  background: rgba(170, 57, 57, 0.3);
  z-index: -1;
}

.timeline header {
  text-align: left;
  margin-bottom: 5px;
}

ul.timeline {
  list-style-type: none;
  position: relative;
}

ul.timeline::before {
  content: ' ';
  background: #d4d9df;
  display: inline-block;
  position: absolute;
  left: 29px;
  width: 2px;
  height: 100%;
  z-index: 400;
}

ul.timeline > li {
  margin: 20px 0;
  padding-left: 20px;
}

ul.timeline > li::before {
  content: ' ';
  background: white;
  display: inline-block;
  position: absolute;
  border-radius: 50%;
  border: 3px solid var(--brand-blue);
  left: 20px;
  width: 20px;
  height: 20px;
  z-index: 400;
}

/* ------------------------------------------- consortium (NGI Taler) page */

.consortium a,
.consortium a:link,
.consortium a:visited {
  text-decoration: underline;
  color: black;
}

.consortium h4 {
  color: #555;
  text-align: left;
  text-transform: uppercase;
  font-weight: bold;
  position: relative;
  margin: 30px 0 60px;
  padding: 5px;
}

.consortium h4::after {
  content: "";
  width: 170px;
  position: absolute;
  text-align: left;
  height: 13%;
  bottom: 0;
  left: 0.2em;
  background: #4e7bca;
  z-index: -1;
}

.consortium .list-group {
  max-height: 400px;
  margin-bottom: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.consortium .mb-1 {
  color: #555;
}

.consortium .list-group-item,
.consortium .list-group-item-action {
  text-decoration: none;
}

/* ----------------------------------------------------------- wallet page */

.wallet-hero {
  background: linear-gradient(135deg, #f7faff 0%, var(--brand-blue-light) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1rem 3rem;
  text-align: center;
}

#body_content .wallet-hero .container {
  margin-bottom: 0;
  max-width: 800px;
  padding-bottom: 0;
  padding-top: 0;
}

.wallet-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.wallet-lead {
  color: #303641;
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 720px;
}

.wallet-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.wallet-highlights li::before {
  color: #357a22;
  content: "\2713";
  font-weight: 700;
  margin-right: 0.4rem;
}

/* The element also carries .container, so .wallet-page is needed to outrank
 * #body_content .container above, which is otherwise equally specific and
 * comes later.
 */
#body_content .wallet-page .wallet-content {
  max-width: 1120px;
  padding-top: 1rem;
  padding-bottom: 0;
}

.wallet-section {
  margin-top: 3.5rem;
}

.wallet-section-heading {
  margin-bottom: 1.25rem;
}

.wallet-section-heading h2,
.wallet-action-notice h2,
.wallet-demo h2,
.wallet-resources h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.wallet-section-heading p {
  color: var(--text-muted);
  margin: 0;
}

.wallet-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wallet-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1rem rgba(21, 39, 68, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
  padding: 1.5rem;
}

.wallet-card h3 {
  font-size: 1.65rem;
  margin-bottom: 0.65rem;
}

.wallet-card p:not(.wallet-platform-label) {
  color: var(--text-muted);
}

.wallet-platform-label {
  color: var(--brand-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

#body_content .wallet-page a.wallet-button {
  align-items: center;
  border: 2px solid var(--brand-blue);
  border-radius: 0.4rem;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  text-align: center;
  text-decoration: none;
}

#body_content .wallet-page a.wallet-button-primary,
#body_content .wallet-page a.wallet-button-primary:link,
#body_content .wallet-page a.wallet-button-primary:visited {
  background: var(--brand-blue);
  color: #fff;
}

#body_content .wallet-page a.wallet-button-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #fff;
}

#body_content .wallet-page a.wallet-button-secondary,
#body_content .wallet-page a.wallet-button-secondary:link,
#body_content .wallet-page a.wallet-button-secondary:visited {
  background: #fff;
  color: var(--brand-blue-dark);
}

#body_content .wallet-page a.wallet-button-secondary:hover {
  background: var(--brand-blue-light);
  color: var(--brand-blue-dark);
}

#body_content .wallet-page a.wallet-button:focus-visible,
.wallet-action-direct:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.wallet-advanced-options {
  border-bottom: 1px solid var(--border);
}

.wallet-advanced-options details {
  border-top: 1px solid var(--border);
  padding: 0;
}

.wallet-advanced-options summary {
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 650;
  padding: 1.15rem 0.25rem;
}

.wallet-advanced-options summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.wallet-details-content {
  max-width: 800px;
  padding: 0 0.25rem 1.5rem 1.5rem;
}

.wallet-warning {
  background: #fff7e6;
  border-left: 4px solid #b96a00;
  padding: 0.85rem 1rem;
}

.wallet-action-notice,
.wallet-demo {
  align-items: center;
  background: var(--brand-blue-light);
  border-left: 5px solid var(--brand-blue);
  border-radius: 0.5rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 4rem;
  padding: 1.75rem 2rem;
}

.wallet-action-notice {
  margin-top: 2rem;
}

.wallet-action-notice[hidden] {
  display: none;
}

.wallet-action-notice p,
.wallet-demo p {
  margin-bottom: 0;
}

.wallet-action-notice .wallet-button,
.wallet-demo .wallet-button {
  flex: 0 0 auto;
}

.wallet-action-options {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
  text-align: center;
}

.wallet-action-direct {
  font-size: 0.9rem;
  min-height: 44px;
  padding: 0.5rem;
}

.wallet-resources {
  margin: 3.5rem 0 1rem;
}

.wallet-resources ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.wallet-resources a {
  font-weight: 550;
}

@media (max-width: 767.98px) {
  .wallet-hero {
    padding: 2.5rem 0.5rem 2.25rem;
  }

  .wallet-highlights {
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
  }

  .wallet-section {
    margin-top: 2.75rem;
  }

  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .wallet-card {
    min-height: auto;
  }

  .wallet-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-action-notice,
  .wallet-demo {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.5rem;
  }

  .wallet-action-notice {
    margin-top: 2rem;
  }

  .wallet-action-options,
  .wallet-demo .wallet-button {
    width: 100%;
  }
}
