@import url('https://fonts.googleapis.com/css2?family=Exo:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --primary: rgb(0, 161, 190);
    --primary-hover: rgb(0, 131, 160);
    --secondary: rgb(220, 158, 67);
    --secondary-hover: rgb(200, 138, 47);
    --bg: rgb(245, 245, 245);
    --bg-accent: rgb(229, 299, 299);
    --black: rgb(46, 46, 46);
    --dark-blue: rgb(27, 39, 63);
    --success: rgb(0, 185, 0);
    --danger: rgb(212, 73, 80);
    --danger-hover: rgb(159, 53, 58);
    --shadow: 2px 2px 7px 1px rgba(0, 0, 0, 0.3);
}

* {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

/*Resets*/
:focus {
    outline: 2px solid var(--primary);
    border-color: transparent !important;
}

::-webkit-scrollbar {
      inline-size: 5px;
      block-size: 7px;
  }

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-corner {
    display: none;
}

body {
    background: var(--bg) !important;
}

/*custom components*/
.button {
    min-height: 2rem;
    padding: .75rem 1rem;
    border-radius: 0;
    border: none;
    font-size: .9rem;
    color: black;
    text-decoration: none;
    white-space: nowrap;
    &:hover {
        background: rgb(200, 200, 200);
    }
}

.w-btn {
    min-width: 175px;
}

.max-w-40 {
    max-width: 40rem;
    margin-inline: auto;
}

.primary {
    background: var(--primary);
    color: white;
    &:hover {
        background: var(--primary-hover);
    }
}

.secondary {
    background: var(--secondary);
    color: white;
    &:hover {
        background: var(--secondary-hover);
    }
}

.danger {
    background: var(--danger);
    color: white;
    &:hover {
        background: var(--danger-hover);
    }
}

.primary-bg {
    background: var(--primary);
    color: white;
}

.secondary-bg {
    background: var(--secondary);
    color: black;
}

.delete {
    height: 100%;
    aspect-ratio: 1;
    position: relative;
    &::after {
        content: url('data:image/svg+xml,%3C%3Fxml version=\'1.0\' encoding=\'utf-8\'%3F%3E%3C!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --%3E%3Csvg fill=\'%23ffffff\' width=\'20\' height=\'20\' viewBox=\'0 0 1920 1920\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M1581.176 1750.588c0 31.06-25.411 56.47-56.47 56.47H395.294c-31.059 0-56.47-25.41-56.47-56.47V564.706H225.882v1185.882c0 93.403 76.01 169.412 169.412 169.412h1129.412c93.402 0 169.412-76.01 169.412-169.412V564.706h-112.942v1185.882Zm-903.529-169.412h112.941V677.647h-112.94v903.53Zm451.765 0h112.94V677.647h-112.94v903.53Zm211.211-1242.352L1217.065 0H694.6L571.268 338.824H.01v112.94h1920v-112.94h-579.388Zm-649.299 0 82.334-225.883h364.462l82.334 225.883h-529.13Z\' fill-rule=\'evenodd\'/%3E%3C/svg%3E');
        position: absolute;
        top: 54%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/*Custom classes*/
.br-0 {
    border-radius: 0;
}

.blr-0 {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.brr-0 {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.w-7 {
    width: 7rem;
}

.ml-auto {
    margin-left: auto;
}

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

.svg-container {
    width: 100%;
    max-width: 250px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    svg {
        height: auto;
        width: 100%;
        max-width: 100%;
    }
}

.modal-body .svg-container {
    max-width: 500px;
}

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

#cncForm {
    margin-left: 4rem;
    & > select {
        width: 6rem;
        height: 2.85rem;
        padding: 0 .5rem;
        background: white;
        border: 1px solid rgb(200, 200, 200);
    }
}

#settingsForm select {
    border-radius: 0;
    &:focus {
        box-shadow: 0 0 0 .25rem rgba(0, 161, 190, .3);
    }
}

.tool-select {
    max-width: 90%;
    option {
        padding: 0 !important;
        margin: 0 !important;
    }
}

.tool-row {
    td {
        padding-block: 1rem !important;
    }
}

.loader-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9999;
    &:before {
        content: '';
        width: 10rem;
        height: 11rem;
        background: white;
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        border-radius: 15px;
    }
}

.back-btn {
    width: 7rem;
    margin: 0 1rem 0 auto;
    display: grid;
    place-content: center;
    &::before {
        margin-top: 5px;
    }
}

.back-svg:before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16' height='16'%3E%3Cg id='_01_align_center' data-name='01 align center'%3E%3Cpath d='M16.752,23.994,6.879,14.121a3,3,0,0,1,0-4.242L16.746.012,18.16,1.426,8.293,11.293a1,1,0,0,0,0,1.414l9.873,9.873Z'/%3E%3C/g%3E%3C/svg%3E");
}

/*Custom styles*/
.header {
    height: 4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgb(200, 200, 200);
    background: rgb(252, 252, 252);
}

.logo {
    width: 400px !important;
    margin: 0 0 0 1rem;
    &:focus-within {
        outline: none !important;
    }
}

a:has(.logo):focus-within {
    outline: none !important;
}

.button-group {
    display: flex;
    border: 1px solid rgb(200, 200, 200);
}

.filters {
    margin: 0 1rem 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    & > .date-filters {
        display: flex;
        gap: 2rem;
        text-align: center;
        & > .date-filter > label {
            margin-right: .75rem;
        }
    }
}

#order-table {
    background: rgb(252, 252, 252);
    thead {
        background: var(--primary);
        color: white;
    }
    td {
        padding: 0 0 0 .6rem;
    }
}

.button-container {
    display: flex;
    gap: .5rem;
    padding: .5rem 0 .5rem 1rem !important;
    & > form {
        margin: 0;
    }
    & > span {
        max-width: 110px;
        font-size: .8rem;
        font-weight: bold;
        color: var(--primary);
    }
}

td:has(button.button.primary.w-100) {
    vertical-align: middle;
}

.custom-check {
    width: 4rem;
    height: 2rem;
    background: rgb(225, 225, 225);
    border: 1px solid rgb(200, 200, 200);
    position: relative;

    &:has(input[checked]) {
        background: var(--success);
        border: none;

        &::after {
            content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Capa_1' fill='white' x='0px' y='0px' viewBox='0 0 507.506 507.506' style='enable-background:new 0 0 507.506 507.506;' xml:space='preserve' width='20' height='20'%3E%3Cg%3E%3Cpath d='M163.865,436.934c-14.406,0.006-28.222-5.72-38.4-15.915L9.369,304.966c-12.492-12.496-12.492-32.752,0-45.248l0,0 c12.496-12.492,32.752-12.492,45.248,0l109.248,109.248L452.889,79.942c12.496-12.492,32.752-12.492,45.248,0l0,0 c12.492,12.496,12.492,32.752,0,45.248L202.265,421.019C192.087,431.214,178.271,436.94,163.865,436.934z'/%3E%3C/g%3E%3C/svg%3E%0A");
            position: absolute;
            top: 59%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
    }
    &:has(input[disabled]) {
        backdrop-filter: grayscale(1);
    }
    input {
        width: 0;
        height: 0;
        position: absolute;
        opacity: 0;
    }
}

.settings-btn {
    margin: 0 1rem 0 0;
    padding: .65rem;
    background: var(--primary);
    border: none;
    cursor: pointer;

    &:hover {
        background: var(--primary-hover);
    }
}

.table.table-bordered thead tr {
    background: var(--primary);
    th {
        background: none;
        color: white;
    }
}

.dt-layout-row:has(#dt-length-0) {
    margin-bottom: 1rem;
}

.dt-layout-row.dt-layout-table {
    margin-bottom: 1rem;
}

.checkbox-center {
    vertical-align: middle;
    text-align: center;
    input {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.modal-dialog {
    margin-block: 0 !important;
    top: 50% !important;
    transform: translateY(-55%) !important;
}

.modal-content {
    border-radius: 0 !important;
    border: none !important;
    & > .modal-header {
        border-radius: 0;
    }
    & > .modal-footer {
        border: none;
        justify-content: space-between;
        & > button {
            margin: 0;
        }
    }
}

.btn-close {
    background: none !important;
    position: relative;
    opacity: 1 !important;
    &::before {
        content: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' id='Outline' viewBox='0 0 24 24' fill='white' width='20' height='20'%3E%3Cpath d='M23.707.293h0a1,1,0,0,0-1.414,0L12,10.586,1.707.293a1,1,0,0,0-1.414,0h0a1,1,0,0,0,0,1.414L10.586,12,.293,22.293a1,1,0,0,0,0,1.414h0a1,1,0,0,0,1.414,0L12,13.414,22.293,23.707a1,1,0,0,0,1.414,0h0a1,1,0,0,0,0-1.414L13.414,12,23.707,1.707A1,1,0,0,0,23.707.293Z'/%3E%3C/svg%3E%0A");
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    &:focus {
        box-shadow: none !important;
    }
}

.svg-container > svg > text {
    stroke: white;
}

ul {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
}

.description {
    max-height: 300px;
    overflow: auto;
}

.panel-item {
    border-bottom: 1px solid rgb(200, 200, 200);
    & > td {
        padding: .75rem;
    }
}

#orderDone {
    display: flex;
    flex-direction: column;
    align-items: center;
    & > div {
        margin-top: 2rem;
        display: flex;
        gap: 1rem;
    }
}

.productToolsToggle {
    width: min-content;
    margin-left: auto;
    display: flex;
    border: 1px solid rgb(200, 200, 200);

    & button {
        padding: .5rem 1rem;
        border: none;
        background: white;
        cursor: pointer;
        &:hover {
            background: var(--primary);
            color: white;
        }
        &.active {
            background: var(--primary);
            color: white;
            &:hover {
                background: var(--primary-hover);
            }
        }
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
