:root {
    --primary-color: #2e5ca7;
    --secondary-color: #2dc7b3;
    --third-color: #108cd6;

    --box-shaodw: rgba(0, 0, 0, 0.1) 0rem 0rem 0.125rem 0rem;

    --black: 900;
    --ExtraBold: 800;
    --ExtraLight: 200;
    --light: 300;
    --medium: 500;
    --semi-bold: 600;
    --thin: 100;
}

/* ! Normalize */

:root {
    font-size: 14px;
}

p {
    margin: 0;
    padding: 0;
}
/* ! */

/* ! Sections */

body {
    margin: 0;
    font-family: "primary-font";
    background-color: hsla(0, 0%, 96%, 1);
    background-image: radial-gradient(
            at 100% 100%,
            hsla(217, 100%, 64%, 0.5) 0rem,
            transparent 50%
        ),
        radial-gradient(
            at 0% 0%,
            hsla(204, 68%, 47%, 0.5) 0rem,
            transparent 50%
        );
    min-height: 100vh;
}

#loader {
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    /* background-color: var(--third-color); */
    background: rgb(69, 140, 255);
    background: linear-gradient(233deg, rgb(13 142 214) 0%, rgb(0 47 88) 100%);
    transition: all 0.5s linear;
}

#loader h4 {
    color: white;
}

#loader small {
    opacity: 0.6;
    color: white;
    position: absolute;
    bottom: 0;
    font-size: 0.75rem;
}

.loader {
    width: 3.125rem;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 0.5rem solid #00000000;
    border-right-color: #ffffff;
    position: relative;
    animation: l24 1s infinite linear;
}
.loader:before,
.loader:after {
    content: "";
    position: absolute;
    inset: -0.5rem;
    border-radius: 50%;
    border: inherit;
    animation: inherit;
    animation-duration: 2s;
}
.loader:after {
    animation-duration: 4s;
}

@keyframes l24 {
    100% {
        transform: rotate(1turn);
    }
}

* {
    outline-color: var(--third-color);
    font-family: "primary-font";
}

.spinner-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading-btn {
    position: relative;
}

.loading-btn.loading .btn-text {
    color: transparent;
}

.loading-btn.loading .spinner-container {
    display: block;
}

.datepicker-container.pwt-mobile-view * {
    font-size: 1.375rem !important;
}

.datepicker-container.pwt-mobile-view .datepicker-navigator {
    margin-top: 1.875rem;
    margin-bottom: 1.875rem;
}

.datepicker-container.pwt-mobile-view .toolbox {
    margin-top: 1.875rem;
    padding-inline: 1.25rem;
}

.datepicker-container.pwt-mobile-view .toolbox > div {
    width: 30%;
    height: 3.125rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.datepicker-container.pwt-mobile-view
    .datepicker-plot-area
    .datepicker-day-view
    .month-grid-box
    .header {
    padding-bottom: 1.75rem;
}

header {
    /* background-color: var(--third-color); */
    background: rgb(69, 140, 255);
    background: linear-gradient(
        233deg,
        rgba(69, 140, 255, 1) 0%,
        rgba(38, 138, 203, 1) 100%
    );
    text-align: center;
    padding: 0.4375rem;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: white;
}

.address {
    font-size: 0.875rem;
    font-weight: var(--medium);
}

.main-content {
    width: 95%;
    margin-inline: auto;
    padding-bottom: 6.25rem;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding-top: 1.875rem;
    gap: 1.25rem;
}

.customer-info-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.625rem;
}

footer {
    background: var(--third-color);
    /* background: linear-gradient(
        233deg,
        var(--third-color) 100%,
        #108cd6 0%
    ); */
    color: white;
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 0.4375rem;
    font-size: 0.75rem;
}

label {
    font-family: "primary-font";
    margin-bottom: 0.4375rem;
    font-size: 20;
    font-weight: var(--semi-bold);
}

input[type="checkbox"][data-toggle="toggle"] {
    background-color: var(--third-color) !important;
}

.btn-on-switch {
    background-color: var(--secondary-color) !important;
    color: white;
}

.btn-on-switch:hover {
    color: white;
}

.btn-off-switch {
    background-color: crimson;
    color: white;
}

.btn-off-switch:hover {
    color: white;
    background-color: crimson;
}

input[type="text"],
input[type="number"],
input[type="search"] {
    /* outline: none; */
    font-family: "primary-font";
    border: 0.0625rem solid var(--secondary-color);
    padding: 0.3125rem;
    border-radius: 0.3438rem;
    transition: box-shadow 0.2s linear;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

::placeholder {
    text-align: right;
    font-size: 0.875rem;
}

/* or, for legacy browsers */

::-webkit-input-placeholder {
    text-align: right;
}

:-moz-placeholder {
    /* Firefox 18- */
    text-align: right;
}

::-moz-placeholder {
    /* Firefox 19+ */
    text-align: right;
}

:-ms-input-placeholder {
    text-align: right;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

input:not(:disabled):is(:hover, :focus) {
    box-shadow: 0rem 0rem 0.625rem #2dc7b279;
}

input.border-danger:is(:hover, :focus) {
    box-shadow: 0rem 0rem 0.625rem #c72d2d79;
}

input:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* .m-divider {
    padding: 0rem .9375rem;
} */

.m-divider small {
    font-size: 0.75rem;
    color: gray;
}

.m-divider hr {
    color: gray;
    margin: 0 !important;
}

button {
    border: none;
}

button:disabled {
    opacity: 0.5;
}

.cards-table-container th {
    text-align: center !important;
}

#m-table-body td:not(.delete-td) {
    /* padding: .625rem; */
    text-align: center;
    font-size: 1rem;
    font-family: "primary-font";
}

.skip-row td {
    padding: 0rem 0rem 0.625rem 0rem !important;
}

.skip-row:last-of-type td {
    padding: 0.625rem 0rem 0rem 0rem !important;
}

.delete-td {
    background-color: white;
    border-radius: 0.625rem;
    text-align: center;
    width: 6.25rem;
}

.del-btn {
    text-decoration: none;
    padding: 0.625rem;
    font-size: 0.875rem;
    color: white;
    border: none;
    border-radius: 0.3125rem;
    background-color: rgb(201, 0, 0);
}

#m-table-body tr:nth-child(even):not(.skip-row) {
    background-color: #f1f1f1;
}

.customer-info-table-container tr:nth-child(odd):not(.skip-row) {
    background-color: #f5f5f5;
}

#m-table tbody tr:not(.skip-row) td:first-of-type:not(.btn-add-more) {
    background-color: #e9e9e9;
    font-weight: bold;
}

.cards-table-container tbody tr:nth-of-type(odd) td:not(:first-of-type) {
    background-color: #f5f5f5;
}

table.dataTable tbody td:first-of-type {
    background-color: #e7e7e7;
    font-weight: bold;
}

.cards-table-container tbody tr:nth-of-type(even) td:not(:first-of-type) {
    background-color: #f1f1f1;
}

#m-table-body tr:nth-child(3) td:first-of-type {
    border-top-right-radius: 0.9375rem;
}
.customer-info-table-container
    #m-table-body
    tr:nth-last-child(2)
    td:first-of-type {
    border-bottom-right-radius: 0.9375rem;
}
.customer-info-table-container
    #m-table-body
    tr:nth-last-child(2)
    td:nth-last-of-type(2) {
    border-bottom-left-radius: 0.9375rem;
}

.dataTables_empty {
    padding: 1.875rem !important;
}

.dataTables_filter {
    display: none;
}

table.dataTable.no-footer,
table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td {
    border-bottom: none;
}

.input-amount {
    width: 6.25rem;
}

select {
    /* outline: none; */
    border: 0.0625rem solid var(--secondary-color);
    padding: 0.125rem;
    border-radius: 0.3438rem;
}

.th-head {
    background-color: var(--third-color);
    padding-top: 0.3125rem;
    color: white;
    font-family: "primary-font";
    text-align: center;
    font-size: 0.9375rem;
    font-weight: var(--semi-bold);
    border-left: 0.0625rem solid white;
}

/* .th-head:first-child {
    border: none;
} */

.th-head:last-child {
    border: none;
}

.rial {
    font-weight: var(--light);
}

.date-title {
    font-family: "primary-font";
    font-weight: var(--semi-bold);
    font-size: 1rem;
}

.modal-title {
    font-family: "primary-font";
    font-weight: var(--semi-bold);
    font-size: 1.25rem;
}

.date-date {
    font-family: "primary-font";
    font-size: 0.9375rem;
    font-weight: var(--semi-bold);
    border-bottom: var(--secondary-color) 0.125rem solid;
}

.btn-change-date {
    color: white;
    font-family: "primary-font";
    font-size: 0.875rem;
    font-weight: var(--semi-bold);
    padding: 0 8px;
    border: none;
    border-radius: 0.3125rem;
    background-color: var(--secondary-color);
}

.btn-add-more {
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: all 0.1s linear;
    padding: 0.625rem;
}

.btn-add-more i {
    scale: 1.3;
    transition: all 0.1s linear;
}

.btn-add-more:hover i {
    scale: 1.5;
}

.btn-add-more:hover {
    background-color: var(--third-color);
}

.m-btn {
    max-width: 25rem;
    padding: 0.625rem 0.9375rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0.625rem;
}

.m-btn:active {
    scale: 0.9;
}

.m-btn-1 {
    background-color: var(--secondary-color);
    color: white;
    border: 0.0625rem solid var(--secondary-color);
}

.m-btn-1:not(:disabled):hover {
    background-color: white;
    color: var(--secondary-color);
    border: 0.0625rem solid var(--secondary-color);
}

.m-btn-2 {
    background-color: var(--third-color);
    color: white;
    border: 0.0625rem solid var(--third-color);
}

.m-btn-2:not(:disabled):hover {
    background-color: white;
    color: var(--third-color);
    border: 0.0625rem solid var(--third-color);
}

.m-btn-3 {
    background-color: var(--primary-color);
    color: white;
    border: 0.0625rem solid var(--primary-color);
}

.m-btn-3:not(:disabled):hover,
.m-btn-3.active {
    background-color: white;
    color: var(--primary-color);
    border: 0.0625rem solid var(--primary-color);
}

.m-btn-4 {
    background-color: whitesmoke;
    color: #141414;
    /* border: .0625rem solid #141414; */
}

.m-btn-4:not(:disabled):hover {
    background-color: #dfdfdf;
}

.m-btn-5 {
    background-color: whitesmoke;
    color: crimson;
    /* border: .0625rem solid crimson; */
}

.m-btn-5:not(:disabled):hover {
    background-color: crimson;
    color: whitesmoke;
    /* border: .0625rem solid white; */
}

.error-txt {
    color: rgba(var(--bs-danger-rgb), 1) !important;
    background-color: var(--bs-danger-bg-subtle);
    border-radius: 0.625rem;
    padding: 0.625rem;
    display: inline-block;
}

.m-cards-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1.25rem;
}

tr.skip-row td {
    background-color: transparent !important;
}

.m-card {
    width: 100%;
    background-color: white;
    padding: 1.875rem;
    box-shadow: var(--box-shaodw);
    border-radius: 0.9375rem;
}

.top-nav-mobile {
    display: none;
}

.sidebar-btn-container {
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 0.75rem;
    width: 20%;
    position: sticky;
    height: calc(100vh - 8.125rem - 0.8125rem);
    min-height: fit-content;
    top: 1.25rem;
}

.side-btn {
    max-width: 25rem;
    background-color: unset;
    color: var(--primary-color);
    padding: 0.625rem 0.9375rem;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 0.625rem;
}

.logout-side-btn {
    color: crimson !important;
}

.logout-side-btn:hover {
    background-color: rgba(220, 20, 60, 0.07) !important;
}

.side-btn:not(.side-btn.logout-side-btn, .side-btn.active):hover {
    background-color: #2e5ca713;
}

.side-btn:hover span {
    translate: -0.125rem;
}
.side-btn:hover i {
    translate: 0.125rem;
}

.side-btn :where(span, i) {
    transition: all 0.1s linear;
}

.side-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-btn-container a:nth-last-of-type(2) {
    margin-top: auto;
}

.customer-info-table-container {
    flex-direction: column;
    width: 100%;
}

.customer-info-table-container .table-container table {
    width: 100%;
}

/* .product-filter {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: .625rem;
    justify-content: center;
} */

.sidebar-btn-container .accordion-item .accordion-button {
    max-width: 25rem;
    background-color: unset;
    color: var(--primary-color);
    padding: 0.75rem 0.9375rem;
    border-radius: 0.625rem !important;
    text-decoration: none;
    transition: all 0.1s linear;
    gap: 0.625rem;
    box-shadow: none;
}

.sidebar-btn-container .accordion-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-btn-container .accordion-item .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
    scale: 0.7;
}

.sidebar-btn-container .accordion-item .accordion-button:not(.collapsed) {
    background-color: #2e5ca713;
}

/* .sidebar-btn-container .accordion-button:not(.collapsed)::after {
    filter: invert() brightness(1000);
} */

.cards-table-container {
    flex-direction: column;
}

.btn-search {
    justify-content: center;
    font-family: "primary-font";
    padding: 0.3125rem 0.625rem;
    background-color: var(--primary-color);
    border: none;
    color: white;
    border-radius: 0.75rem;
    text-decoration: none;
}

.modal-header {
    background-color: var(--third-color);
    color: white;
}

.status-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.625rem;
    margin-top: 0.625rem;
}

.status-switch-container.half {
    width: calc(50% - 0.625rem);
    margin-inline: auto;
    margin-top: 0;
}

.item-create-modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.item-create-modal-body .inputs-container {
    width: 100%;
    margin-top: 0.625rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.item-create-modal-body .inputs-container :where(input, select) {
    width: calc(100% / 2 - 0.625rem);
    padding: 0.5rem;
}

.category-items-container > span {
    border-radius: 0.9375rem;
    padding: 0.625rem;
    color: white;
    background-color: #2e79aa;
    font-family: "primary-font";
    cursor: pointer;
}

.factor-table {
    border: 0.0625rem solid black;
}

.factor-table .t-r:not(:last-of-type) {
    border-bottom: 0.0625rem solid black;
}
.factor-table .t-d {
    text-align: right;
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
    padding-right: 0.3125rem;
    padding-left: 0.3125rem;
}

.more-options {
    padding: 0 1.875rem;
    cursor: pointer;
}

.dropdown-menu {
    /* position: fixed !important; */
    padding: 0;
    border-radius: 0.9375rem;
    overflow: hidden;
}

.dropdown-menu a {
    text-align: right;
    padding: 0.625rem;
}

.dropdown-menu a:not(.dropdown-delete):hover {
    background: #f0f0f0;
}
.dropdown-menu a:not(.dropdown-delete):active {
    color: var(--third-color);
}

.dropdown-delete:hover {
    background-color: crimson;
    color: white;
}

#history-table th {
    border-left: 0.0625rem solid black;
    border-bottom: 0.0625rem dashed black;
    padding: 0.625rem;
}
#history-table td {
    border-left: 0.0625rem solid black;
    padding: 0.625rem;
}
#history-table {
    border: 0.0625rem solid black;
    border-top: 0;
}

.m-black-overlay {
    position: fixed;
    height: 100%;
    width: 100%;
    background-color: black;
    transition: opacity 0.3s linear;
    opacity: 0;
    z-index: -1;
    display: none;
}

.m-black-overlay.show {
    display: block;
    opacity: 0.6;
    z-index: 89;
}

/* ! */

/* ! Media Query */

@media only screen and (max-width: 1210px) {
    .customer-info-table-container {
        width: 100%;
    }

    .sidebar-plus-box-container {
        flex-direction: column;
        height: 100%;
    }

    .top-nav-mobile {
        display: flex;
        justify-content: space-between;
    }

    .sidebar-btn-container {
        translate: 100vw;
        transition: translate 0.4s linear;
        position: fixed;
        top: 0;
        right: 0;
        border-radius: 0;
        height: 100%;
        width: fit-content;
        z-index: 90;
    }

    .sidebar-btn-container.show {
        translate: 0vw;
    }

    /* .sidebar-btn-container a:nth-last-of-type(2) {
        margin-top: 0;
    } */

    /* .sidebar-btn-container :where(a, button) {
        justify-content: center;
        width: calc(100% / 3 - 0.75rem);
    } */

    header,
    footer {
        display: none;
    }

    .main-content {
        padding-bottom: 0;
        height: 100%;
        justify-content: start;
    }

    /* .main-form {
        height: 100vh;
    } */
}
