/* ==========================================================================
   Premium Theme - customer portal and the public invoice / estimate / proposal
   pages your clients open from emails.

   Loaded after theme.css (tokens + shared components). Everything is scoped to
   body.customers, the class Perfex puts on every customers-area page.
   ========================================================================== */

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

body.customers {
    /* Let the page grow with its content so the sticky navigation stays stuck on long pages */
    height: auto;
    min-height: 100vh;
    background:
        radial-gradient(1100px 460px at 88% -8%, rgba(242, 115, 33, 0.08), transparent 60%),
        radial-gradient(1000px 520px at 0% -6%, rgba(82, 73, 196, 0.11), transparent 60%),
        var(--pt-bg);
    background-repeat: no-repeat;
}

body.customers #content {
    padding-top: 30px;
    padding-bottom: 48px;
}

body.customers #content h1,
body.customers #content h2,
body.customers #content h3,
body.customers #content h4 {
    color: var(--pt-ink);
    letter-spacing: -0.015em;
}

/* Plain text links in brand indigo; buttons, labels, menus and tabs keep their own colours */
body.customers #content a:not(.btn, .label, .dropdown-toggle, .dropdown-menu a, .nav a) {
    color: var(--pt-brand-600);
}

body.customers #content a:not(.btn, .label, .dropdown-toggle, .dropdown-menu a, .nav a):hover {
    color: var(--pt-brand-700);
}

/* --------------------------------------------------------------------------
   Navigation bar: frosted glass, pinned while scrolling
   -------------------------------------------------------------------------- */

body.customers .navbar-default {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(18, 18, 40, 0.07);
    box-shadow: none;
}

/* Blur on a pseudo-element so the bar doesn't become the containing block for fixed menus */
body.customers .navbar-default::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
}

body.customers .navbar-default .navbar-nav > li > a {
    color: var(--pt-ink-2);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: background-color 0.15s, color 0.15s;
}

body.customers .navbar-default .navbar-nav > li > a:hover,
body.customers .navbar-default .navbar-nav > li > a:focus {
    background: var(--pt-hover);
    border-radius: 10px;
    color: var(--pt-ink);
}

body.customers .navbar-default .navbar-nav > .active > a,
body.customers .navbar-default .navbar-nav > .active > a:hover,
body.customers .navbar-default .navbar-nav > .active > a:focus {
    background: var(--pt-brand-50);
    border-radius: 10px;
    color: var(--pt-brand-700);
    font-weight: 600;
}

/* Perfex styles the Login link with !important, so these need it too */
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a {
    background: var(--pt-grad-brand) !important;
    border-radius: 10px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 12px -4px rgba(82, 73, 196, 0.6);
    color: #fff !important;
    font-weight: 600;
}

body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:hover,
body.customers .navbar-default .navbar-nav > li.customers-nav-item-login > a:active {
    background: linear-gradient(180deg, #574ecf 0%, #433bb0 100%) !important;
    border-radius: 10px !important;
}

body.customers .navbar-default .navbar-nav > li.dropdown > a.dropdown-toggle:hover,
body.customers .navbar-default .navbar-nav > li.dropdown > a.dropdown-toggle:focus {
    background: var(--pt-hover);
    border-radius: 10px;
}

body.customers .navbar-default .navbar-collapse {
    border-color: var(--pt-border);
}

body.customers .navbar-default .navbar-toggle .icon-bar {
    background-color: var(--pt-ink-2);
}

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

body.customers footer.footer {
    height: auto;
    padding: 20px 15px;
    background: transparent;
    border-top: 1px solid var(--pt-border);
    color: var(--pt-muted);
    font-size: 13px;
}

body.customers footer.footer a {
    color: var(--pt-brand-600);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Customer login
   -------------------------------------------------------------------------- */

/* Same faint brand grid as the staff login, fading out toward the edges */
body.customers.customers_login::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(68, 61, 166, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(68, 61, 166, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 40%, #000 0%, transparent 80%);
    mask-image: radial-gradient(ellipse 55% 50% at 50% 40%, #000 0%, transparent 80%);
}

body.customers.customers_login #wrapper,
body.customers.customers_login footer.footer {
    position: relative;
    z-index: 1;
}

body.customers.customers_login #content {
    padding-top: 6vh;
}

body.customers .login-heading {
    margin-bottom: 22px;
    color: var(--pt-ink);
    font-size: 28px;
    letter-spacing: -0.025em;
}

body.customers .login-form .panel_s {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(18, 18, 40, 0.04), 0 30px 60px -24px rgba(26, 22, 80, 0.3);
}

body.customers .login-form .panel_s > .panel-body {
    padding: 28px;
    border-radius: 19px;
}

body.customers .login-form input.form-control {
    height: 44px;
    border-radius: 12px;
}

body.customers .login-form :not(.simple-bootstrap-select) > .bootstrap-select > .dropdown-toggle {
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
    border-radius: 12px;
}

body.customers .login-form .btn-primary {
    height: 46px;
    border-radius: 12px;
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 24px -10px rgba(82, 73, 196, 0.8);
}

/* --------------------------------------------------------------------------
   Invoice / estimate / proposal pages clients open from emails: the document as paper
   -------------------------------------------------------------------------- */

body.customers.viewinvoice #content > .container,
body.customers.viewestimate #content > .container {
    max-width: 1000px;
}

body.customers.viewinvoice .panel_s,
body.customers.viewestimate .panel_s,
body.customers.proposal-view .proposal-left .panel_s {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(18, 18, 40, 0.04), 0 30px 60px -26px rgba(26, 22, 80, 0.24);
}

/* Thin brand stripe across the top of the document */
body.customers.viewinvoice .panel_s::before,
body.customers.viewestimate .panel_s::before,
body.customers.proposal-view .proposal-left .panel_s::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 4px;
    background: linear-gradient(90deg, #5249c4 0%, #8c84e0 60%, #f27321 100%);
}

body.customers.viewinvoice .panel_s > .panel-body,
body.customers.viewestimate .panel_s > .panel-body {
    padding-top: 30px;
    padding-bottom: 30px;
    border-radius: 19px;
}

body.customers .transaction-html-info-col-left h4 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Proposals: roomy reading text on the left, the summary as a floating card that stays in view */
body.customers.proposal-view .proposal-left .proposal-content {
    padding: 34px 38px;
    color: var(--pt-ink-2);
    font-size: 14.5px;
    line-height: 1.7;
}

body.customers.proposal-view .proposal-right .inner {
    position: sticky;
    top: 96px;
    padding: 18px 20px;
    background: var(--pt-surface);
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    box-shadow: var(--pt-shadow-sm);
    /* Attachment names are often one long word */
    overflow-wrap: anywhere;
}

/* Last row of the totals (Amount Due on invoices, Total on estimates) as a tinted summary bar */
body.customers:is(.viewinvoice, .viewestimate) .col-md-offset-6 > table.text-right tr:last-child td {
    padding-top: 14px;
    padding-bottom: 14px;
    background: var(--pt-brand-50);
    border-top: 0;
    color: var(--pt-ink);
    font-size: 16px;
    font-weight: 700;
}

body.customers:is(.viewinvoice, .viewestimate) .col-md-offset-6 > table.text-right tr:last-child td span {
    color: var(--pt-ink);
}

body.customers:is(.viewinvoice, .viewestimate) .col-md-offset-6 > table.text-right tr:last-child td:first-child {
    border-radius: 12px 0 0 12px;
}

body.customers:is(.viewinvoice, .viewestimate) .col-md-offset-6 > table.text-right tr:last-child td:last-child {
    border-radius: 0 12px 12px 0;
}

/* The bar with status + Download / Pay now, once it sticks while scrolling */
body.customers .preview-sticky-header {
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 1px 0 rgba(18, 18, 40, 0.07), 0 12px 30px -20px rgba(18, 18, 40, 0.3);
}

body.customers .invoice-html-status .label,
body.customers .estimate-html-status .label {
    padding: 5px 12px;
    font-size: 12px;
}

body.customers .action-button {
    height: 38px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    body.customers .navbar-default .navbar-nav > .active > a,
    body.customers .navbar-default .navbar-nav > .active > a:hover,
    body.customers .navbar-default .navbar-nav > .active > a:focus {
        background: var(--pt-brand-50);
    }

    body.customers .login-form .panel_s > .panel-body {
        padding: 22px 18px;
    }

    body.customers.viewinvoice .panel_s,
    body.customers.viewestimate .panel_s,
    body.customers.proposal-view .proposal-left .panel_s {
        border-radius: 16px;
    }

    body.customers.proposal-view .proposal-left .proposal-content {
        padding: 24px 20px;
    }

    /* Columns stack on phones, so the summary shouldn't stick */
    body.customers.proposal-view .proposal-right .inner {
        position: static;
    }
}
