﻿html {
    font-size: 15px;
    font-family: Rajdhani;
}

* {
    box-sizing: border-box;
    font-family: Rajdhani;

}

p {
    font-size: 14pt;
}

/* === Page Transitions === */
#page-content {
    opacity: 0; /* default hidden until animate-in */
    transition: opacity 0.2s ease-in-out;
}

#page-content.animate-in {
    opacity: 1;
}

#page-content.animate-out {
    opacity: 0;
}

/* remove arrows from number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.table-detail {
    width: 90%;
}

table.dataTable th, table.dataTable td {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Buttons */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem;
}

table.dataTable.fixedHeader-floating, table.dataTable.fixedHeader-locked {
    position: relative !important;
    background-color: var(--bs-body-bg);
    margin-top: 0 !important;
    margin-bottom: 0 !important
}

div.dtfh-floatingparent-foot table {
    border-top-color: var(--bs-border-color);
    border-top-width: var(--bs-border-width);
    border-top-style: solid
}

@media print {
    table.fixedHeader-floating {
        display: none
    }
}

/* == custom button styling == */
.po-nbr-btn {
    display: inline-block;
    border: none;
    padding: 0px;
}

    button.active,
    button.active:focus,
    button.active:focus-visible,
    button.focus,
    .po-nbr-btn:focus,
    .po-nbr-btn:focus-visible,
    .po-nbr-btn:active,
    .po-nbr-btn:active:focus,
    .list-group-item-action:focus,
    .list-group-item-action:active,
    .list-group-item.active,
    tr.active td,
    tr.active:focus td,
    tr.active:focus-visible td {
        color: #E71316 !important;
        background-color: #f2f2f2 !important;
        border-color: none;
        outline: none !important;
        box-shadow: none !important;
    }

.btn-color {
    color: white !important;
    border-radius: 3px 3px !important;
    font-weight: bold !important;
}

.btn-color:hover {
    background-color: black !important;
    border-color: black !important;
    color: white !important;
}

.btn-red {
    background-color: #E71316 !important;
    border-color: #E71316 !important;
}

.btn-green {
    background-color: forestgreen !important;
    border-color: forestgreen !important;
}

.btn-blue {
    background-color: dodgerblue !important;
    border-color: dodgerblue !important;
}

.btn-gray {
    background-color: darkgray !important;
    font-weight: bold !important;
}

.btn-navy {
    background-color: #11213a !important;
    border-color: #11213a !important;
}

.btn-icon {
    width: fit-content;
    height: fit-content;
    padding: 0px;
}

    .btn-icon:hover {
        background-color: darkgray !important;
        color: white !important;
        border-radius: 0.5rem;
    }

.btn-red-text {
    color: #E71316 !important;
    border-bottom: 1px solid #E71316 !important;
    border-radius: 0 !important;
}

html, body {
    position: relative;
    height: 100%;
    margin: 0;
}

body {
    margin-bottom: 0;
    background-image: url("../images/background-image.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.centered-brand {
    width: 100%;
    text-align: center;
}

/* == Navbvar buttons == */

.nav-link {
    font-weight: 500;
}

.navbar-btn {
    position: relative;
    display: inline-block;
    font-size: large;
}

    .navbar-btn::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        width: 100%;
        height: 3px;
        background-color: black;
        transition: transform 0.3s ease;
    }

    .navbar-btn:hover::after {
        transform: translateX(-50%) scaleX(1);
    }

.nav-item {
    display:flex;
    align-items:center;
}

.nav-user.dropdown-toggle::after {
    display: none;
}

.navbar-custom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.navbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

    .navbar-logo img {
        height: 40px;
    }

/* === Registration and Sign In === */

#registration-form {
    text-align: center;
    position: relative;
}

    #registration-form fieldset {
        background: white;
        border: 0 none;
        border-radius: 0.5rem;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        padding-bottom: 20px;
        position: relative
    }

.finish {
    text-align: center
}

#registration-form fieldset:not(:first-of-type) {
    display: none
}

#registration-form .btn-step {
    width: 200px;
    font-weight: bold;
    color: white;
    border: solid 3px #11213a;
    border-radius: 0px;
    cursor: pointer;
    margin: 10px 5px 10px 0px;
    background-color: #11213a;
}

    #registration-form .btn-step:hover {
        background-color: white;
        color: #11213a;
    }

#registration-form .submit {
    background-color: #E71316;
    border: solid 3px #E71316;
}

    #registration-form .submit:hover {
        background-color: black;
        border: solid 3px #E71316;
        color: white;
    }

.progressbar-wrapper {
    position: sticky;
    width: 100%;
    margin-bottom: 20px;
    height: 60px;
}

/* line behind steps */
.progress-bar-line, .progress-bar-line-bkgd {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    transform: translateY(-50%);
}

.progress-bar-line {
    background-color: #E71316;
    z-index: 2;
    position: absolute;
    top: 50%;
    left: calc(50% / var(--steps));
    height: 4px;
    background-color: #E71316;
    transform: translateY(-50%);
    transition: width 0.3s ease-in-out;
}

.progress-bar-line-bkgd {
    background-color: lightgrey;
    z-index: 1;
    width: 100%;
}

.progress-bar-line:before {
    background-color: lightgray;
}

.progress-bar-line:after {
    background-color: #E71316;
}

/* Steps */
#progressbar {
    --steps: 3;
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    z-index: 2;
}

    #progressbar li {
        position: relative;
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: gray;
        z-index: 2;
    }

        /* Step circle */
        #progressbar li:before {
            transition: all 0.4s ease-in-out;
            content: close-quote;
            counter-increment: step;
            display: block;
            margin: 0 auto 10px;
            width: 30px;
            height: 30px;
            line-height: 20px;
            background-color: white;
            border: 3px solid lightgray;
            border-radius: 50%;
            color: gray;
            font-weight: bold;
            font-size: 18px;
            position: relative;
            z-index: 2;
        }

        /* Active styling */
        #progressbar li.active:before {
            border-color: #E71316;
            color: #E71316;
        }

        #progressbar li.active {
            color: #E71316;
        }

        #progressbar li.completed::before {
            content: '\2713';
            background-color: #E71316;
            color: white;
            border-color: #E71316;
        }

/* === Inventory and Orders === */

.inventory-table {
    text-align: left;
    outline-style: solid;
    outline-width: 1pt;
    border-radius: 5pt;
}

.custom-search {
    border-radius: 2rem;
    border: solid;
    border-width: 1pt;
}

.input-group-text {
    background-color: #f8f9fa;
    border: none;
    border-top-right-radius: 2rem;
    border-bottom-right-radius: 2rem;
    cursor: pointer;
    padding-right: 1rem;
}

/* PO Number box */

order-detail-container {
    display: flex;
    height: 100%;
}

.po-number-container {
    flex: 0 0 20%;
    display: flex;
    flex-direction: column;
    border: solid 0.5pt;
    overflow: hidden;
    max-width: 15rem;
}

.view-orders-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    position: relative;
}

.order-detail-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: solid 1pt;
    overflow: hidden;
}

/* Slideout container */

.filter-slideout-header {
    position: sticky; /* keeps it at the top INSIDE the panel */
    top: 0;
    background: white;
    z-index: 25;
    border-bottom: 1px solid #ddd;
}

.filter-slideout-dropdowns {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 80vh;
}

.applied-filters,
.applied-filters p {
    display: flex;
    align-items: baseline;
}

.sub-filter {
    margin-block-start: 2rem;
}
.sticky-summary {
    position: sticky;
    top: 0px; /* height of .filter-slideout-header */
    background: white;
    z-index: 10;
    border-bottom: 1px solid #ddd;
}



/* Slideout inside container */
.filter-slideout-container {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100%;
    background: white;
    border-right: 1px solid #ccc;
    box-shadow: 0 0 0px rgba(0,0,0,0);
    z-index: 2000;
    transition: left 0.3s ease-in-out;
}

    .filter-slideout-container.open {
        left: 0;
        box-shadow: 0 0 10px rgba(0,0,0,0.2);
    }

.sub-filter p {
    font-weight: bold;
}
.filter-count {
    color: red;
    margin-left: 4px;
}

/* + and - icon on subfilters */
.toggle-icon::before {
    font-family: "bootstrap-icons";
    content: "\f4fe"; /* plus */
}

details[open] .toggle-icon::before {
    content: "\f2ea"; /* dash */
}

.details-content {
    padding: 0.5rem;
    flex-grow: 1;
}



/* order details */
.selected-row td {
    color: #E71316 !important;
    font-weight: bold;
    background-color: lightgray !important;
}

.order-header-list,
.item-list {
    flex: 1;
    padding-bottom: 10px;
}
    .order-header-table,
    .po-number-list {
        border-collapse: separate;
        border-spacing: 0;
        width: 100%;
    }

    .order-header-table thead th,
    .inventory-list-table thead th{
        position: sticky;
        top: 0;
        background: white;
    }

.item-list,
.item-list thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}

/* Subitem formatting */
.subitems-table thead th {
    z-index: 0;
    position: static;
    
}

.subitems-container {
    margin-left: 10%; /* indent */
    width: fit-content;
    padding: 5px 10px;
    border-left: 3px solid #ccc;
}

/* Order detail floating box */
.order-detail-box {
    transform: translate(-50%);
    top: 15%;
    position: fixed;
    z-index: 1000;
    left: 50%;
    height: fit-content;
    width: 95%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-detail-container {
    max-height: 80vh;
    overflow-y: auto;
}

/* Used to darken the background when order details are open */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2); /* semi-transparent black */
    z-index: 999;
}


.table-wrapper {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}

.inventory-table-container {
    height: auto;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}


/* == inventory filters ==*/
.inventory-filter-container {
    width: fit-content !important;
    z-index: 1000;
    position: absolute;
    transform: translate(-50%,0%);
    left: 50%;
    top: 25%;
    border: solid 1px darkgray;
    padding: 10px;
    box-shadow: .3rem .3rem .5rem rgba(0, 0, 0, 0.75);
}

.inventory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999; /* behind .inventory-filter-container (which is 1000) */
    background-color: rgba(0, 0, 0, 0.2); /* semi-transparent black */
}

input[type="checkbox"] {
    accent-color: black;
}

/* == create order == */
.create-order-container {
    max-height: 75vh;
    width: fit-content;
}

.upload-file-box {
    max-height: fit-content;
    border: 4px dashed lightblue;
    border-radius: 1rem;
    padding: 1rem;
    margin: 1rem;
}

    .hover {
        background-color: lightblue;
        border-color: black;
        color: black;
    }

.file-uploaded {
    border: 1px solid black;
}

.form-check-label {
    white-space: nowrap;
}

.invalid {
    border: 1px solid #E71316 !important;
}

.valid {
    border: 1px solid green !important;
}


/* == branch list selection == */

.branch-list {
    overflow-y: auto;
    max-height: 45vh;
    margin: 1rem;
}


/* == manage users == */
.vertical-table th {
    text-align: right;
}

.vertical-table th, .vertical-table td {
    padding: 5px;
}
.vertical-table input[type="text"],
.vertical-table input[type="number"]
{
    width: 20rem;
}

#SelectBranchWindow {
    z-index: 1000;
    position: absolute;

    transform: translate(-50%);
    top: 20%;
    position: fixed;
    z-index: 1000;
    left: 50%;
    height: fit-content;
    width: fit-content;
    flex: 1;
    display: flex;
    flex-direction: column;
}


/* == CREATE ORDERS == */
#step-container {
    opacity: 0; /* default hidden until animate-in */
    transition: opacity 0.5s ease-in-out;
}

    #step-container.animate-in {
        opacity: 1;
    }

    #step-container.animate-out {
        opacity: 0;
    }

.order-list-container {
    position: relative;
}

    .order-list-container thead th {
        position: sticky;
        top: 0;
        background: white;
        max-height: 80%;
        z-index: 1;
    }

.price {
    text-align: right;
}

.bi-exclamation-triangle {
    color: red;
    padding: 15px;
    width: 100%;
    font-size: 1.3rem;
    margin-left: 10px;
}

.company-info-container {
    flex-grow: 1;
    margin-right: 4rem;
    width: 45%;
}

.shipping-info-container {
    flex-grow: 1;
    width: 55%;
}

/* Spinner */
.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: 3px solid;
    border-color: black black transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

    .loader::after {
        content: '';
        box-sizing: border-box;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        margin: auto;
        border: 3px solid;
        border-color: transparent #E71316 #E71316;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        animation: rotationBack 0.5s linear infinite;
        transform-origin: center center;
    }

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotationBack {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

