/* SSI Connect — shared modern styles.
 * Loaded LAST in the head of each page so it overrides any earlier
 * stylesheet (Bootstrap, /common/css/styles.css, etc.).
 * Used by: login.html, pwhelp_v2b.html, copyright.html, and the
 * ZUMCONN.NUSER / SSICONN.NUSER dynamic HTML output.
 *
 * Palette:
 *   #3f86ab  primary blue (headings)
 *   #3686ab  link / label blue
 *   #d1f3ff  container background (pale blue)
 *   #b6dbe8  agreement box border
 *   #b00     "danger" red (Step 1, agreement no-word)
 *   #d43f3a  required-asterisk red
 *   #fff8c5  has-error yellow
 *   #fff2cc  error-summary background
 */

/* ------------------------------------------------------------------ */
/* Utilities — general-purpose classes                                 */
/* ------------------------------------------------------------------ */

/* Text colors — replace <font color="…"> tags. */
.text-error  { color: #cc0000; }  /* alias: .text-danger */
.text-danger { color: #cc0000; }
.text-info   { color: #0066cc; }
.text-teal   { color: #008080; }
.text-purple { color: #663399; }
.text-black  { color: #000; }

/* Text sizes — replace <font size="…"> tags (HTML font-size scale). */
.text-xs  { font-size: 75%;  }  /* was size="1" or size="-1"          */
.text-sm  { font-size: 90%;  }  /* was size="2"                       */
.text-lg  { font-size: 120%; }  /* was size="+1"                      */
.text-xl  { font-size: 150%; }  /* was size="+2"                      */
.text-2xl { font-size: 175%; }  /* was size="+3"                      */
.text-bold { font-weight: bold; }

/* Cell backgrounds — replace bgcolor= on <td> cells. */
.cell-yellow { background: #ffffcc; }
.cell-blue   { background: #99ccff; }
.cell-gray   { background: #c0c0c0; }
.cell-white  { background: #ffffff; }
.cell-navy   { background: #0000ff; }

/* Table row / header colors returned by FALIB/GET.COLOR.VARS.
 * The BASIC subroutine returns one of two schemes based on NEWLOGIN:
 *   old scheme: pale yellow rows + pale blue header
 *   new scheme: soft blue rows + neutral gray header
 * Consumers apply the class via <tr class="':ROWCOLOR:'"> or
 *   <tr class="':HDRCOLOR:'">. */
.row-color-old { background: #ffffcc; }
.hdr-color-old { background: #99ccff; }
.row-color-new { background: #b3d7ea; }
.hdr-color-new { background: #cfcfcf; }

/* Status pills — bold text on colored background, used in report /
 * exception views. Replace inline STYLE="background:#XXX;font-weight:900". */
.status-red    { background: #f46c6c; font-weight: 900; }
.status-green  { background: #c0e1c0; font-weight: 900; }
.status-yellow { background: #f6ef54; font-weight: 900; }
.status-purple { background: #bbb3ec; font-weight: 900; }

/* Alignment — replace align= / valign= attributes. */
.align-left    { text-align: left;   }
.align-center  { text-align: center; }
.align-right   { text-align: right;  }
.valign-top    { vertical-align: top;    }
.valign-middle { vertical-align: middle; }
.valign-bottom { vertical-align: bottom; }

/* Layout helpers — replace common inline styles. */
.hidden { display: none; }
.nowrap { white-space: nowrap; }
.mt-0   { margin-top: 0; }
.mb-0   { margin-bottom: 0; }
.ml-20  { margin-left: 20px; }
.mr-10  { margin-right: 10px; }
.pad-10 { padding: 10px; }

/* Vertical spacer row inside a data table. One-cell <tr> that adds a
 * 10px gap between logical sections. Use on the <tr> itself:
 *     <tr class="spacer-10"><td colspan="N"></td></tr>
 * where colspan matches the table's total column count. */
.spacer-10 td { height: 10px; }

/* Full-page plain-text reports (ZUMCONN.FBQ POS/FB-HISTORY output).
 * .report-page replaces <body text="#000" bgcolor="#FFF">.
 * .report-body replaces <font size=-1><pre>...</pre>.
 * .report-msg is for a single-paragraph notice (e.g. "your report has
 * been spooled to the LASER printer"). */
.report-page {
    color: #000;
    background: #fff;
    margin: 0;
    padding: 12px;
    font-family: 'Open Sans', Verdana, Arial, Helvetica, sans-serif;
}
.report-body {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 90%;
    line-height: 1.3;
    color: #000;
    white-space: pre;
    margin: 0;
}
.report-msg {
    color: #000;
    font-size: 14px;
    margin: 20px 0;
}

/* ------------------------------------------------------------------ */
/* FBQ (Freight Bill Query) page — width harmonization                 */
/* ------------------------------------------------------------------ */
/* ZUMCONN.FB.TRANS adds class="fbq-form" to its stub <form>.
 * Scoping the width constraint to the form itself (rather than an
 * outer wrapping div) preserves the .contents > form direct-child
 * selector that /zum/pdfgenerate.js relies on to build the PDF.
 * The info tables (Stack #, Waybill, Bill To, etc.) use .fixed30
 * which totals 900px per row via .label15 (150) + value (300) x 2.
 * The Freight Charges and Miscellaneous Charges tables have no class
 * and would otherwise auto-size to their content, usually 1200-1600px
 * because their header cells use .label20 (200px) x 7-8 columns.
 * Capping the form to 1000px pulls those wide tables in line with the
 * info tables above; header cells shrink to fit. */
.fbq-form {
    max-width: 1100px;
    margin: -36px auto 24px auto;  /* pull up snug against the site header */
    padding: 40px 36px;
    background: #ffffff;
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid #d0d0d0;
    border-right: 1px solid #d0d0d0;
    /* Side shadows only — negative spread pulls the blur inward
       vertically so it doesn't bleed above/below the paper. */
    box-shadow: -8px 0 8px -4px rgba(0, 0, 0, 0.15),
                 8px 0 8px -4px rgba(0, 0, 0, 0.15);
    /* Soft-fade the top and bottom 24px of the whole element
       (background, borders, and shadow) into the page so there's
       no hard color-change line where the paper starts and ends. */
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%);
            mask-image: linear-gradient(to bottom,
        transparent 0,
        #000 24px,
        #000 calc(100% - 24px),
        transparent 100%);
}
.fbq-form table {
    max-width: 100%;
}

/* .btn-pdf / .btn-docs — real (blue) buttons in the FBQ page header.
 * Both inherit the standard .btn blue styling and add an icon via
 * ::after without overriding the background. The negative `top`
 * lifts them slightly above the h1 baseline so they visually clear
 * the button bar directly above the header. */
.btn.btn-pdf,
.btn.btn-docs {
    position: relative;
    padding-right: 34px;  /* reserve space for the icon */
    top: -6px;
    margin-left: 8px;
}
.btn.btn-pdf::after,
.btn.btn-docs::after {
    position: absolute;
    display: block;
    right: 10px;
}
/* PDF icon — legacy 16x16 gif, positioned to sit inside the button. */
.btn.btn-pdf::after {
    content: url('/zum/pdf.gif');
    height: 16px;
    width: 16px;
    top: 5px;
}
/* Docs icon — inline SVG (Feather-style line-art document, white
 * strokes so it reads on the blue button). Uses background-image so
 * we can size it precisely with background-size; ::after content is
 * a zero-width placeholder that just anchors the pseudo-element. */
.btn.btn-docs::after {
    content: "";
    background: url('/images/doc-icon.svg') center / contain no-repeat;
    height: 18px;
    width: 18px;
    top: 4px;
}

/* ------------------------------------------------------------------ */
/* ZUM pagination — larger arrow variant                               */
/* ------------------------------------------------------------------ */
/* Extends the base .pagi rules in /zum/index.css (10px arrows / no
 * explicit line-height) with a bigger, more prominent variant used
 * on the FB.TRANS single-record view. Uses .pagi.pagi-lg (double
 * class) so specificity beats the base rules regardless of load
 * order. Apply as:
 *     <div class="pagi pagi-lg">…</div>
 */
.pagi.pagi-lg span {
    line-height: 24px;
}
.pagi.pagi-lg a.left {
    border-top:    12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right:  20px solid #fb7904;
}
.pagi.pagi-lg a.right {
    border-top:    12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left:   20px solid #fb7904;
}

/* ------------------------------------------------------------------ */
/* Holiday / closure banner (injected by /js/ssi-banners.js)           */
/* ------------------------------------------------------------------ */

.ssi-banner {
    max-width: 780px;
    margin: 0 auto 16px;
    padding: 12px 20px;
    background: #fff2cc;
    border: 1px solid #f0c000;
    border-left: 4px solid #d43f3a;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}
.ssi-banner-label {
    display: inline-block;
    background: #d43f3a;
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: 2px;
}
.ssi-banner a { color: #3686ab; }

/* ------------------------------------------------------------------ */
/* Page wrappers                                                       */
/* ------------------------------------------------------------------ */

.login       { margin-top: 0; }

.login h3,
.nuser-page h3 {
    color: #3f86ab;
    text-align: center;
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 8px;
}

.login .logo      { text-align: center; margin-bottom: -36px; }
.nuser-page .logo { text-align: center; margin-bottom: -24px; }

/* ------------------------------------------------------------------ */
/* Form containers                                                     */
/* ------------------------------------------------------------------ */

/* Login & pwhelp — narrow (500px) stacked layout for short forms. */
.login .form_container {
    background: #d1f3ff;
    width: 500px;
    margin: auto;
    padding: 50px 0 30px 0;
    text-align: center;
    border-radius: 8px;
}

/* NUSER — wider (780px) horizontal grid.
 * .form_container.form-horizontal is a double-class selector
 * (specificity 020) and !important on the overridable properties,
 * so this beats /common/css/styles.css which sets
 *   .form_container { width: 500px; background: #dedddd; }
 * See /css/styles.css lines 201-208 in the site's older stylesheet.
 */
.nuser-page .form_container.form-horizontal {
    background: #d1f3ff !important;
    width: 100% !important;
    max-width: 780px !important;
    margin: 0 auto !important;
    padding: 40px 30px 30px !important;
    border: 1px solid #272727 !important;
    border-radius: 8px !important;
}

/* Lead paragraphs at top of NUSER form (instruction text) */
.nuser-page .form_container .lead {
    color: #333;
    text-align: center;
    font-size: 14px;
    margin-bottom: 14px;
}
.nuser-page .form_container .lead b { color: #b00; }

/* ------------------------------------------------------------------ */
/* Form labels + fields                                                */
/* ------------------------------------------------------------------ */

/* Base label styling (color, spacing) — inherited by both layouts */
.form-group .control-label {
    color: #3686ab;
    letter-spacing: 1.5px;
    padding-top: 7px;
}

/* NUSER: horizontal grid at md+, stacked at sm- */
@media (min-width: 768px) {
    .nuser-page .form-horizontal .control-label { text-align: right; }
}
@media (max-width: 767px) {
    .nuser-page .form-horizontal .control-label {
        text-align: left;
        padding-top: 0;
        margin-bottom: 4px;
    }
    .nuser-page .form_container { padding: 24px 18px; }
}

/* Login/pwhelp: always stacked-centered (short 1-2 field forms).
 * Neutralizes Bootstrap 3's negative row-margin on form-groups so
 * the input doesn't spill outside the container box.
 */
.login .form_container .form-group {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 18px;
}
.login .form-group .col-md-4.control-label {
    color: #3686ab;
    letter-spacing: 2px;
    display: block;
    float: none;
    width: 100%;
    padding: 0;
    margin-bottom: 6px;
    text-align: center;
}
.login .form-group .form-control {
    max-width: 290px;
    margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* NUSER form components                                               */
/* ------------------------------------------------------------------ */

.required-asterisk {
    color: #d43f3a;
    font-weight: bold;
    margin-left: 3px;
}

.section-heading {
    margin: 24px 0 14px;
    padding: 6px 12px;
    border-left: 4px solid #3f86ab;
    background: rgba(255, 255, 255, 0.5);
    color: #3f86ab;
    font-weight: bold;
    letter-spacing: 1px;
}

.agreement-body {
    background: #fff;
    border: 1px solid #b6dbe8;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    margin-bottom: 10px;
    text-align: left !important;
}
.agreement-body p  { margin: 6px 0; font-weight: bold; text-align: left !important; }
.agreement-body ol { margin: 0 0 4px 20px; padding: 0; text-align: left !important; }
.agreement-body li { margin: 4px 0; text-align: left !important; }
.agreement-body .no { color: #b00; font-weight: bold; }

.phone-ext-row .col-phone { padding-right: 5px; }
.phone-ext-row .col-ext   { padding-left: 5px; }

.has-error .form-control {
    background: #fff8c5;
    border-color: #d43f3a;
}

.error-summary {
    background: #fff2cc;
    border: 1px solid #f0c000;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.error-summary h4 { margin: 0 0 8px; color: #b00; }
.error-summary ol { margin: 0 0 0 18px; padding: 0; }

.actions {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #b6dbe8;
}
.actions .btn { margin: 0 6px; }

/* ------------------------------------------------------------------ */
/* Pwhelp helper notes                                                 */
/* ------------------------------------------------------------------ */

.pwhelp-notes {
    max-width: 500px;
    margin: 14px auto;
    color: #333;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}
.pwhelp-notes a { color: #3686ab; }

/* ------------------------------------------------------------------ */
/* Copyright page — wider container, left-aligned body                 */
/* ------------------------------------------------------------------ */

.copyright_container {
    background: #d1f3ff;
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 40px;
    border: 1px solid #272727;
    border-radius: 8px;
    text-align: left;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
.copyright_container h2 {
    color: #3f86ab;
    text-align: center;
    margin: 0 0 8px;
}
.copyright_container .lede {
    text-align: center;
    margin-bottom: 24px;
    color: #3686ab;
    font-weight: bold;
    letter-spacing: 1px;
}
.copyright_container p { margin: 0 0 14px; }
.copyright_container blockquote {
    background: #fff;
    border-left: 4px solid #3f86ab;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: 13px;
    color: #333;
}
.copyright_container a { color: #3686ab; }

/* ------------------------------------------------------------------ */
/* Footer rows                                                          */
/* ------------------------------------------------------------------ */

/* NUSER footer (below form container) */
.nuser-page .footer {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin: 20px auto;
    max-width: 780px;
}
.nuser-page .footer a { color: #3686ab; }

/* Login / pwhelp / copyright footer (button row).
 * Default width matches the narrow 500px form_container;
 * copyright's footer uses .wide to match the 780px content box.
 */
footer         { max-width: 100%; margin: 16px auto; }
footer .left   { float: left;  text-align: left; }
footer .right  { float: right; text-align: right; }
.login footer  { width: 500px; }
footer.wide    { width: 780px; }
