﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  /* color: #0366d6; */
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
}

/* Plain text typed into a textarea, shown with its paragraphs intact.
   Deliberately not the HtmlString display template: that one exists for Quill rich text and renders raw,
   which would turn author-typed text into markup on a page external signers open. */
.text-lines {
    white-space: pre-line;
}

.table-row-borderless > td {
    border-top: none;
}

/* Signature Pad
-------------------------------------------------- */

/* Sized here rather than inline, which is safe because site.css is cache-busted (asp-append-version).
   The geometry is deliberately IDENTICAL to the inline style it replaced, down to the 1px border.

   THE BORDER WIDTH IS LOAD-BEARING. Bootstrap sets box-sizing: border-box, so the border eats into the
   drawing area, while both of signature_pad's coordinate paths use the BORDER box: resizeCanvas() sizes the
   bitmap from offsetWidth/offsetHeight, and signature_pad's _createPoint subtracts getBoundingClientRect()
   left/top. Bitmap and content box therefore disagree by exactly the border, and the ink lands offset from
   the finger by that much. At 1px the error is invisible; a 10px frame (which is what used to be here, dead,
   because an inline `border: 1px solid blue` was overriding it) puts the ink 10px from the finger and
   compresses it ~10% vertically — worst on a phone, where the canvas is narrowest.

   So: do not thicken this border without first changing resizeCanvas() to measure the content box. */
#signature-pad-canvas {
    width: 600px;
    height: 200px;
    max-width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
}

/* Signature images
--------------------------------------------------
   One width per context, set here and never on the tag, because the presentational `width`/`height`
   attributes lose to an author `height: auto` rule and were silently ignored. */

.signature-image {
    max-width: 100%;
    height: auto;
}

/* Beside a name, in a table cell or a list row. */
.signature-image-row {
    width: 120px;
}

/* On a page whose subject is the signature itself. Capped at the composite's own 600px so it is never
   upscaled past the resolution actually stored. */
.signature-image-detail {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Inside the enlarge dialog. Here upscaling past 600px is the point: it is the only way to read one band of a
   three-signatory composite, since neither the stored image nor the row is allowed to grow. */
.signature-image-zoom {
    width: 100%;
}

/* The image is the whole control, so strip what btn-link would otherwise contribute. */
.signature-zoom {
    line-height: 1;
}

/* Page action bar
--------------------------------------------------
   The row of buttons at the foot of a page, rendered by Shared/_PageActions. Bootstrap 4 has no gap
   utility, so the spacing lives on the children; the bottom margin is what keeps two rows apart once the
   bar wraps on a narrow screen. */

.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-actions > .btn {
    margin-right: .5rem;
    margin-bottom: .5rem;
}
