/* The NanoParma ERP
 * nanoparma.css: The style sheet for the NanoParma ERP
 */

/*  Copyright (c) 2021-2022 NanoParma BioMedical Ltd., 2023 imacat.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/* Author: imacat@nanoparma.com (imacat)
 * First written: 2021/6/8
 */

/* The common styles */
.erp-logo {
    width: 32px;
    height: 32px;
}
span.nav-link {
    cursor: pointer;
}
.form-control.erp-clickable, .list-group-item.erp-clickable {
    cursor: pointer;
}
.erp-list-group-striped .list-group-item:nth-child(2n+1) {
    background-color: #f2f2f2;
}
.erp-list-group-hover .list-group-item:hover {
    background-color: #ececec;
}
.erp-list-group-striped .list-group-item-danger:nth-child(2n+1) {
    background-color: #eccccf;
}
.erp-list-group-hover .list-group-item-danger:hover {
    background-color: #e5c7ca;
}
.erp-amount {
    text-align: right;
    font-style: italic;
}
.form-floating > textarea.form-control {
    height: 6rem;
}
.erp-address-button {
    text-align: left;
}

/* The commodity management */
.erp-commodity-product-container {
    width: calc(100% - 2rem);
}
.erp-commodity-product-add-button {
    width: 100%;
}

/* The sales order management */
.erp-order-commodity-container {
    width: calc(100% - 2rem);
}
.erp-order-commodity-add-button {
    width: 100%;
}

/* The sales order shipment management */
.erp-order-shipment-container {
    cursor: pointer;
    width: calc(100% - 2rem);
}
.erp-shipment-product-quantity-container {
    width: 60%;
}
.erp-shipment-product-balance-container {
    width: 40%;
}

/* The supplier management */
.erp-supplier-contact-email-container, .erp-supplier-contact-phone-container {
    width: calc(100% - 3rem);
}
.erp-supplier-contact-add-data-button {
    width: 100%;
}
.erp-supplier-bank-account-passbook-undo-button {
    position: absolute;
    top: 1rem;
    right: -1.3rem;
    transform: scale(0.7);
}
.erp-supplier-bank-account-passbook-container {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
}

/* The purchase order management */
.erp-order-product-container {
    width: calc(100% - 2rem);
}
.erp-order-add-product-button {
    width: 100%;
}

/* The product journal entry management */
.erp-journal-entry-line-item-content {
    width: calc(100% - 3rem);
}
.erp-journal-entry-line-item-control {
    border-color: transparent;
}
.erp-journal-entry-add-line-item-button {
    width: 100%;
}

/* The image upload fields */
.erp-image-field-container {
    width: 240px;
    height: 266px;
    padding: 0;
    position: relative;
}
.erp-image-field-thumbnail {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.erp-image-field-caption {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erp-new-image-field-button {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    opacity: 25%;
    cursor: pointer;
}
.erp-image-field-remove {
    position: absolute;
    top: -1.2rem;
    right: -1.1rem;
    transform: scale(0.7);
}
.erp-image-field-remove button {
    display: block;
}

/* The purchase order arrival management */
.erp-order-arrival-container {
    cursor: pointer;
    width: calc(100% - 2rem);
}
.erp-arrival-product-quantity-container {
    width: 60%;
}
.erp-arrival-product-balance-container {
    width: 40%;
}

/* The accounting journal entry management */
.erp-journal-entry-block {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    margin: 1rem;
    padding: 2rem 1.5rem;
}
@media(max-width:767px) {
    .erp-journal-entry-block {
        padding: 1rem 1rem;
    }
}
.erp-journal-entry-block h2 {
    border-bottom: thick double slategray;
}
.erp-journal-entry-add-currency-button {
    width: 100%;
}
.erp-journal-entry-currency-code-container {
    width: calc(100% - 3rem);
}
.erp-list-group-item-line-item {
    border: none;
}
.erp-list-group-item-line-item-header {
    font-weight: bolder;
    border-bottom: thick double slategray;
}
.list-group-item.erp-list-group-item-line-item-total {
    font-weight: bolder;
    border-top: thick double slategray;
}
.erp-accounting-line-item-offsets {
    border-top: thin solid slategray;
    border-bottom: thin solid slategray;
}
.erp-accounting-line-item-offsets a {
    color: inherit;
    text-decoration: none;
}

/* The journal */
.table .erp-journal-description-credit {
    padding-left: 24px;
}
.list-group-item-journal-credit {
    padding-left: 32px;
}

/* The report block */
.erp-report-block {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    margin: 1rem;
    padding: 2rem 1.5rem;
}
@media(max-width:767px) {
    .erp-report-block {
        padding: 1rem 1rem;
    }
}
.erp-report-block h2 {
    border-bottom: thick double slategray;
}
.erp-list-group-item-report {
    border: none;
}

/* The trial balance */
.erp-trial-balance-header {
    font-weight: bolder;
    border-bottom: thick double slategray;
}
.erp-list-group-item-report + .erp-trial-balance-total {
    font-weight: bolder;
    border-top: thick double slategray;
}
.erp-trial-balance-amounts {
    width: 50%;
}
.erp-trial-balance-amounts .erp-amount {
    width: 50%;
}

/* The income statement */
.erp-list-group-income-statement {
    border-bottom: thick double slategray;
}
.erp-income-statement-header {
    text-align: right;
    font-weight: bolder;
    font-style: italic;
    border-bottom: thick double slategray;
}
.erp-income-statement-base-account {
    font-weight: bolder;
    font-size: 1.2rem;
}
.erp-income-statement-secondary-account {
    padding-left: 2rem;
    font-weight: bolder;
}
.erp-income-statement-account-title {
    padding-left: 2rem;
}
.erp-income-statement-account-amount {
    padding-right: 2rem;
}
.erp-list-group-item-report + .list-group-item.erp-income-statement-total {
    border-top: thin solid slategray;
}
.erp-income-statement-accumulated {
    font-weight: bolder;
    font-size: 1.2rem;
}
@media(max-width:767px) {
    .erp-income-statement-secondary-account {
        padding-left: 1.5rem;
    }
    .erp-income-statement-account-title {
        padding-left: 1.5rem;
    }
    .erp-income-statement-account-amount {
        padding-right: 1.5rem;
    }
}

/* The balance sheet */
.erp-balance-sheet-base-account {
    font-weight: bolder;
    font-size: 1.21rem;
    border-bottom: thick double slategray;
}
.erp-balance-sheet-secondary-account {
    font-weight: bolder;
    font-size: 1.1rem;
}
.erp-balance-sheet-account {
    padding-left: 1.5rem;
}
.erp-list-group-item-report + .erp-balance-sheet-subtotal {
    font-weight: bolder;
    font-size: 1.1rem;
    border-top: thick double slategray;
}
.erp-balance-sheet-total {
    font-weight: bolder;
    font-size: 1.21rem;
    border-top: thick double slategray;
}

/* The Material Design text field (floating form control in Bootstrap) */
.erp-material-text-field {
    position: relative;
    min-height: calc(3.5rem + 2px);
    padding-top: 1.625rem;
}
.erp-material-text-field > .form-label {
    position: absolute;
    top: 0;
    left: 0;
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out,transform .1s ease-in-out;
}
.erp-material-text-field.erp-not-empty > .form-label {
    opacity: 0.65;
    transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}

/* The Material Design floating action buttons */
.erp-material-fab {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 10;
}
.erp-material-fab .btn {
    transform: scale(1.5);
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0,0,0,.12);
}
.erp-material-fab .btn:hover, .erp-material-fab .btn:focus {
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0,0,0,.12);
}
.erp-material-fab-button {
    transition: transform .1s ease-in-out, right .1s ease-in-out, bottom .1s ease-in-out;
}
.erp-show .erp-material-fab-button {
    transform: scale(1.5) rotate(-45deg);
}
.erp-material-fab-speed-dial-group {
    position: absolute;
    right: -2rem;
    bottom: -7rem;
    text-align: right;
    opacity: 0;
    transform: scale(0.1);
    line-height: 5.5rem;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out, right .1s ease-in-out, bottom .1s ease-in-out;
}
.erp-show .erp-material-fab-speed-dial-group {
    opacity: 1;
    transform: scale(0.6);
    right: -0.5rem;
    bottom: 0.7rem;
}
.erp-material-fab-speed-dial-group .btn {
    background-color: white;
    white-space: nowrap;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0,0,0,.12);
}
.erp-material-fab-speed-dial-group .btn:hover, .erp-material-fab-speed-dial-group .btn:focus {
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0,0,0,.12);
}

@media(max-width:767px){
    .erp-material-fab-fused {
        position: fixed;
        right: 2rem;
        bottom: 1rem;
        z-index: 10;
        flex-direction: column-reverse;
    }
    .erp-material-fab-fused.erp-toolbar.btn-group .btn {
        border-radius: 50%;
        transform: scale(1.5);
        box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0,0,0,.12);
        display: block;
        margin-top: 2.5rem;
    }
    .erp-material-fab-fused .btn:hover, .erp-material-fab-fused .btn:focus {
        box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0,0,0,.12);
    }
    .form-switch {
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        padding-left: 0;
    }
}
