/***
Invoice page
***/

.pageview:not(.edit) {
    max-width: 11.5in;
    margin: 0 auto;
}

.pageview.legal,
.pageview.letter {
    max-width: 8.5in;
}

.pageview.legal.landscape {
    max-width: 14in;
}

.pageview.letter.landscape {
    max-width: 11in;
}

.pageview.a7 {
    max-width: 2.9in;
}

.pageview.a7.landscape {
    max-width: 4.1in;
}

.pageview.a6 {
    max-width: 4.1in;
}

.pageview.a6.landscape {
    max-width: 5.8in;
}

.pageview.a5 {
    max-width: 5.8in;
}

.pageview.a5.landscape {
    max-width: 8.3in;
}

.pageview.a4 {
    max-width: 8.3in;
}

.pageview.a4.landscape {
    max-width: 11.7in;
}

.pageview.a3 {
    max-width: 11.7in;
}

.pageview.a3.landscape {
    max-width: 16.5in;
}

.pageview.edit {
    max-width: inherit !important;
    margin: 0 auto;
}

.pageview .page-body,
.pageview .panel-body {
    padding: .5in;
}

.pageview .panel,
.pageview .wrapper {
    background: #FFF;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    border: 1px solid #DDDDDD;
    margin: 0 auto;
    margin-bottom: 15px;
    max-width: 100%;
}

.pageview > .row {
    margin-right: 0px !important;
    margin-left: 0px !important;
}

.pageview .btn-bar {
    margin-bottom: 10px;
}

.pageview .wrapper:before,
.pageview .wrapper:after,
.pageview .btn-bar:before,
.pageview .btn-bar:after {
    display: table;
    content: " ";
    clear: both;
}

/* top detail row */
.pageview .details {
    margin-bottom: 20px;
}

.printview .total-info table,
.pageview .details table {
    float: right;
    width: auto;
    min-width: 225px;
}

.pageview .total-info table th,
.pageview .total-info table td,
.pageview .details table th,
.pageview .details table td {
    font-size: 14px;
    text-align: left;
}

.pageview .details table thead h2,
.pageview .details table thead h3 {
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
    border-bottom: 1px dotted #CCC;
    margin-bottom: 5px;
    font-weight: 600;
}
.pageview .details table thead h2{
    font-size: 22px;
}

.pageview .details .logo {
    margin-bottom: 20px;
}

.details .logo img {
    max-width: 250px;
    max-height: 125px;
}

.pageview .details .logo name {
    padding: 5px 0;
    font-size: 50px;
    line-height: 50px;
    text-align: left;
    text-shadow: 1px 2px 5px #9E9E9E;
    font-style: italic;
    margin: 0px;
}

/* top contact row */
.pageview .contacts {
    margin-bottom: 15px;
}

.pageview .contacts h2 {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    text-align: left;
    border-bottom: 1px solid #CCC;
    margin: 0px;
    padding-bottom: 8px;
}

.pageview .contacts table {
    margin-top: 8px;
}

.pageview .contacts table th,
.pageview .contacts table td,
.pageview .total-info table th,
.pageview .total-info table td {
    font-size: 12px;
    text-align: left;
    padding: 0 4px;
}

.pageview .total-info table th,
.pageview .contacts table th {
    text-transform: uppercase;
    font-weight: 700;
}

table.align-right td {
    text-align: right;
}

.pageview .total-info table thead th,
.pageview .contacts table thead th {
    font-weight: 600;
    font-size: 18px;
    text-align: left;
}

.pageview .total-info tbody th:nth-child(1),
.pageview .total-info tbody td:nth-child(1),
.pageview .contacts tbody th:nth-child(1),
.pageview .contacts tbody td:nth-child(1),
.pageview .details tbody th:nth-child(1),
.pageview .details tbody td:nth-child(1) {
    vertical-align: top;
    text-align: left;
    min-width: 120px;
}

.pageview .contacts table.align-right tbody th:nth-child(2),
.pageview .contacts table.align-right tbody td:nth-child(2),
.pageview .total-info table tbody th:nth-child(2),
.pageview .total-info table tbody td:nth-child(2),
.pageview .details table tbody th:nth-child(2),
.pageview .details table tbody td:nth-child(2) {
    text-align: right;
}

.pageview .options {
    margin-bottom: 10px;
}

.pageview .info .option {
    display: inline-block;
    width: 250px;
}

.pageview .info .option span {
    display: inline-block;
    min-width: 65px;
    font-weight: 700;
}

.pageview hr {
    margin: 10px 0;
    border: none;
    border-bottom: 1px dashed #DDD;
    padding: 0;
}

.pageview .payment strong {
    margin-right: 5px;
}

.pageview .page-block {
    text-align: right;
}

.pageview .page-block .amounts {
    margin-top: 20px;
    font-size: 14px;
}

.pageview .footer {
    border-top: 1px solid #CCC;
    padding-top: 5px;
}

.tax-row .form-group {
    margin: 0;
    padding: 0;
}

/* form grid */
@media (min-width: 767px) {
    .invoice .form-grid .gheader {
        background: #CCC;
    }

    .invoice .form-grid .gheader .gh {
        border-color: #E2E2E2;
    }

    .invoice .form-grid .gr .gd {
        border-color: #CCC;
    }

    .invoice .form-grid .gbody .gr .gd {
        padding: 0px;
        border-right-style: dotted;
        border-left-style: dotted;
    }

    .invoice .form-grid .gbody .gr .gd:first-child {
        border-left-style: solid;
    }

    .invoice .form-grid .gbody .gr .gd:last-child {
        border-right-style: solid;
    }

    .invoice .form-grid .gr .gd .form-control .selectize-input,
    .invoice .form-grid .gr .gd .form-control {
        border: none !important;
        border-bottom: 0px solid #CCC;
        resize: none;
        -webkit-border-radius: 0px;
        -moz-border-radius: 0px;
        -ms-border-radius: 0px;
        -o-border-radius: 0px;
        border-radius: 0px;
        outline: none;
    }

    .invoice .form-grid .gr .gh.itemName {
        min-width: 150px;
    }

    .invoice .form-grid .gr .gh.itemUnit {
        min-width: 120px;
    }

    .invoice .form-grid .bootstrap-select .bs-searchbox {
        padding: 0;
        margin: 0;
    }

    .invoice .form-grid .bootstrap-select .dropdown-menu .form-control {
        border-bottom: 1px solid #E5E5E5 !important;
        box-shadow: none;
    }

    .invoice .form-grid .bootstrap-select.btn-group .dropdown-menu {
        margin-top: -2px;
        -webkit-border-radius: 0px 0px 4px 4px;
        -moz-border-radius: 0px 0px 4px 4px;
        -ms-border-radius: 0px 0px 4px 4px;
        -o-border-radius: 0px 0px 4px 4px;
        border-radius: 0px 0px 4px 4px;
    }
}

/* Signatures */

.signature .image {
    display: block;
    height: 50px
}

.signature {
    display: block;
    max-height: 100px
}

.signature .image img {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto;
    display: block;
}

.signature .name {
    line-height: 24px;
    height: 24px;
}

.signature .title,
.signature-title {
    margin-top: 3px;
    border-top: 1px dashed #525252;
    padding-top: 3px;
}

/* Print View */
.printview table {
    margin: 0;
}

.printview .print-header {
    display: none;
}

.printview .print-header:first-child {
    display: block;
}

.printview .table-pages thead {
    display: none;
}

.printview .page-table-1 thead {
    display: table-header-group;
}

.printview .print-footer {
    display: none;
    border-bottom: 1px dashed #CCC;
    height: 30px;
    line-height: 30px;
    padding: 0 6px;
}

.printview .print-footer:last-child {
    display: block;
}

.print-footer .page-num {
    display: none;
    float: right;
}

.print-footer p {
    display: block;
    margin: 0;
    float: left;
}

.page-brdeak {
    page-break-after: always !important;
}

@media (max-width: 767px) {
    /*.pageview .details div[class*="col-"] {
        width: 50%;
        float: left;
    }*/
}

@media (max-width: 480px) {
    .pageview div[class*="col-"] {
        width: 100%;
    }

    .pageview .total-info table,
    .pageview .details table {
        float: none;
        width: 100%;
    }

    .pageview .details .logo {
        text-align: center !important;
    }
}

@media print {

    @page {
        margin: 0.5in;
        size: portrait;
        /*size: portrait;*/
        /*size: 8.3in 11.6in;*/
        resize: both;
    }

    .pageview .btn-bar {
        display: none !important;
    }

    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }

    a[href]:after {
        content: none !important;
    }

    .pageview .wrapper,
    .pageview .panel {
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pageview .wrapper {
        max-width: 100%;
        margin: 0 auto;
    }

    .pageview .page-body,
    .pageview .panel-body {
        padding: 2px;
    }

    .pageview .header div[class*="col-"],
    .pageview .footer div[class*="col-"],
    .pageview .details div[class*="col-"],
    .pageview .info div[class*="col-"] {
        width: 50%;
        float: left;
    }

    .pageview .header div[class*="col-"]:last-child,
    .pageview .footer div[class*="col-"]:last-child {
        text-align: right !important;
    }

    .pageview .contacts .col-sm-4,
    .pageview .contacts .col-md-4,
    .pageview .contacts .col-lg-4 {
        width: 33%;
        float: left;
    }

    .pageview .contacts .col-sm-6,
    .pageview .contacts .col-md-6,
    .pageview .contacts .col-lg-6 {
        width: 50%;
        float: left;
    }

    .pageview .contacts .col-lg-6,
    .pageview .details .col-lg-6,
    .pageview .info .col-lg-6 {
        width: 50%;
        float: left;
    }

    .pageview .page-body {
        width: 100%;
    }

    .pageview .footer {
        display: block;
        width: 100%;
        position: fixed;
        bottom: 0;
    }

    .page-brdeak {
        page-break-after: always !important;
    }

    /*.pageview table tr {
        page-break-after: always !important;
    }*/
    .printview .text-right {
        text-align: right !important;
    }

    .printview .pull-right {
        float: right !important;
    }

    /* Print View */
    .printview table {
        margin: 0 !important;
    }

    .printview .print-header {
        display: block !important;
    }

    .printview .print-header:first-child {
        display: block !important;
    }

    .printview .table-pages thead {
        display: table-header-group !important;
    }

    .printview .print-footer {
        display: block !important;
        height: 30px;
        line-height: 30px;
        background-color: #EEEEEE;
        width: 100%;
        border-bottom: none;
    }

    .printview .print-footer:last-child {
        display: block !important;
    }

    .printview .print-footer:after {
        content: " ";
        display: table;
    }

    .printview .print-footer .page-num {
        display: block;
        float: right;
    }

    .printview .print-footer p {
        display: block;
        float: left;
    }

    .printview th .fa {
        display: none;
    }

    .page-brdeak {
        page-break-after: always !important;
    }
}
