/* Variables */
:root {
    --primary-color: #3b3b8e;
    --primary-button-color: #3b3b8e;
    --primary-button-hover-color: #2a2a67;
    --drawer-color: #1d2327;
}

/* General */
* {
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #F7F7F7;
}

h1 {
    font-size: 23px;
}

.form-control.main-control {
    font-weight: 700;
    font-size: 22px;
    height: 65px;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: inherit;
}

/* Forms */
.form-floating textarea.form-control {
    min-height: 100px;
}

/* Tabs */
.nav-tabs {
    border: none;
}

.nav-tabs .nav-link {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--bs-nav-tabs-link-active-border-color);
    margin-bottom: 0px;
}

.nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-button-color);
    border: 1px solid var(--primary-button-color);
    color: white;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus-visible {
    background-color: var(--primary-button-hover-color) !important;
    border: 1px solid var(--primary-button-hover-color) !important;
    color: white;
    box-shadow: none;
}

/* Login */
#login {
    width: 100vw;
    height: 100vh;
    position: relative;
    background-image: url("../images/login-hero.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

#login .content {
    background-color: white;
    border-radius: 0.375rem;
    max-width: 500px;
    width: 100%;
    padding: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

#login .content img {
    max-width: 75px;
    width: 100%;
    display: block;
}

#countries .dropdown-toggle {
    padding: 0px;
    margin: 0px;
    border: none !important;
}

#countries .dropdown-toggle:after {
    margin-left: 0px;
}

#countries .dropdown-menu {
    padding: 0px;
    margin: 0px;
    min-width: 0px;
}

#countries .dropdown-menu img {
    max-width: 25px;
}

#countries .dropdown-item:active {
    background-color: inherit;
}

#login .password-visibility {
    font-size: 13px;
    color: inherit;
}

/* Drawer */
#drawer {
    width: 250px;
    height: 100vh;
    float: left;
    background-color: #1d2327;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#drawer .menuContainer {
    height: 100%;
    overflow-y: auto;
}

#drawer .dropdownContainer {
    padding: 10px;
}

#drawer #logo img {
    max-width: 75px;
    width: 100%;
    margin: 0 auto;
    padding-top: 10px;
}

#drawer #logo span {
    color: black;
}

#drawer .nav-pills .nav-link.active,
#drawer .nav-pills .show>.nav-link {
    background-color: var(--primary-color);
    color: white;
}

#drawer .nav-pills .nav-link.active svg,
#drawer .nav-link:focus svg,
#drawer .nav-link:hover svg {
    filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(224deg) brightness(104%) contrast(104%);
}

#drawer .nav-link:focus,
#drawer .nav-link:hover {
    background-color: var(--primary-color);
    color: white !important;
}

#drawer .nav-link {
    transition: none;
    color: white;
    font-size: 14px;
    border-radius: 0px;
}

#drawer .nav-link span {
    vertical-align: middle;
}

#drawer #settings a {
    color: white;
}

#drawer #settings .dropdown-menu a {
    color: black;
}

/* Panel */
#panel {
    margin: 10px;
    padding: 30px;
    width: calc(100% - 270px);
    height: calc(100vh - 20px);
    overflow-y: auto;
    float: left;
}

/* Grid */
#grid {
    background-color: white;
    border-radius: 8px;
}

#grid th {
    border: none;
    padding: 15px;
    vertical-align: middle;
}

#grid td {
    border-top: 1px solid #F7F7F7;
    border-bottom: none;
    border-right: none;
    border-left: none;
    padding: 15px;
    vertical-align: middle;
}

#grid td.actions {
    white-space: nowrap;
}

#grid thead tr:first-child {
    background-color: white;
    padding: 10px;
    border-bottom: 1px solid #F7F7F7;
}

#grid thead tr:not(:first-child) {
    background-color: #F7F7F7;
}

#grid thead tr:not(:first-child) th:first-child {
    border-left: 10px solid white;
}

#grid thead tr:not(:first-child) th:last-child {
    border-right: 10px solid white;
}

#grid .icon-btn {
    padding: 7px 10px 3px 10px;
}

#grid .pagination .page-link {
    color: black;
}

#grid tbody td.image img {
    width: 80px;
    height: 80px;
}

#grid tbody .clickableField {
    text-decoration: underline;
    font-weight: normal;
    color: black;
}

#grid .actions .btn {
    background-color: #F7F7F7;
}

#grid .search input {
    max-width: 200px;
    border-bottom-right-radius: 0px;
    border-top-right-radius: 0px;
}

#grid .search button {
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    height: 38px;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Editor */
.editor {
    width: 100%;
    background-color: white;
    border-radius: 5px;
    padding: 20px 0px 20px 0px;
}

/* Image Upload */
#uploaded_image_container img {
    max-width: 100px;
    width: 100%;
    display: block;
    margin: 0px auto 10px auto;
}

#uploaded_image_container a {
    color: red;
    text-decoration: none;
}

/* Accordions */
.accordion-button:not(.collapsed) {
    color: initial;
    background-color: initial;
}

/* Media */
#media-grid .thumb {
    background-size: cover !important;
    background-position: 50% 50% !important;
    background-repeat: no-repeat !important;
    width: 125px;
    height: 125px;
    float: left;
    margin: 5px;
    border: 1px solid white;
    border-radius: 5px;
}

#media-grid .thumb a {
    display: block;
    width: 125px;
    height: 125px;
}

#mediaLibrary .modal-footer {
    display: block;
}

#mediaLibrary .modal-footer form {
    max-width: 400px;
    width: 100%;
    display: block;
    float: left;
}

#mediaLibrary .modal-footer button {
    display: block;
    float: right;
}

/* Dropzone */
.drop-zone {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    color: #cccccc;
    border-radius: 5px;
    background-color: #F7F7F7;
    background-position: center center !important;
    background-size: cover !important;
    border: 1px solid #e7e7e7;
}

.drop-zone-variation, .drop-zone-component {
    width: 124px;
    height: 124px;
    background-color: white !important;
}

/* Media List */
.media_list {
    list-style-type: none;
}

.media_list_item {
    display: block;
    width: calc(100% / 6);
    float: left;
}

.media_list_item input[type="checkbox"] {
    display: none;
}

.media_list_item label {
    border: 2px solid #fff;
    display: block;
    position: relative;
    cursor: pointer;
}

.media_list_item label:before {
    background-color: white;
    color: white;
    content: " ";
    display: block;
    border: 1px solid var(--primary-color);
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 28px;
    transition-duration: 0.4s;
    transform: scale(0);
    z-index: 10;
}

.media_list_item label::after {
    content: "";
    display: block;
    padding-bottom: 100%;
}

.media_list_item label img {
    transition-duration: 0.2s;
    transform-origin: 50% 50%;
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media_list_item :checked+label:before {
    content: "✓";
    background-color: var(--primary-color);
    transform: scale(1);
}

.media_list_item :checked+label img {
    transform: scale(0.9);
}

/* Gallery */
#gallery_images_container {
    overflow: hidden;
}

#gallery_images_container img {
    width: 100%;
    height: 100%;
}

#gallery_images_container .gallery_image {
    margin: 5px;
    width: calc(100% / 3 - 10px);
    height: 75px;
    float: left;
    text-align: center;
    position: relative;
}

#gallery_images_container .gallery_image a {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background-color: red;
    color: white;
    border-radius: 8px;
    padding: 5px 5px 0px 5px;
}

#gallery_images_container .gallery_image span {
    font-size: 14px;
}

.nav-tabs .nav-item .nav-link {
    color: black;
    border: 1px solid #E7E7E7;
    margin-bottom: inherit;
}

.nav-tabs .nav-item .nav-link.active {
    color: white;
    border: 1px solid var(--primary-color);
}

.tab-content {
    border-top-left-radius: 0px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 1px solid #E7E7E7;
    padding: 10px;
}

.supplier, .translation {
    padding: 10px;
    border: 1px solid #E7E7E7;
    border-radius: 8px;
}

.supplier:not(:last-child) {
    margin-bottom: 1rem;
}

#variations-tab .accordion:not(:last-child) {
    margin-bottom: 10px;
}

.spinner-border {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10;
    width: 65px;
    height: 65px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Order overview */
.order-overview {
    vertical-align: middle;
    background-color: white;
}

.order-overview td, .order-overview th {
    padding: 10px;
}

.order-overview tbody img {
    width: 75px;
    height: 75px;
}

/* Related products */
#related-results-tbody, #related-products-tbody {
    vertical-align: middle;
}

#related-results-tbody tr {
    cursor: pointer;
}

#related-results-tbody tr.active {
    background-color: var(--primary-button-color);
    color: white;
}

#related-results-tbody tr.active:hover td {
    color: white;
}

#related-results-tbody img, #related-products-tbody img {
    max-width: 75px;
    width: 100%;
}

#related-products-tbody span {
    color: red;
    cursor: pointer;
}

#no-components-container, #no-rules-container {
    background-color: #F7F7F7;
    padding: 50px;
    text-align: center;
}

#variations-container .accordion-item,
#components-container .accordion-item,
#rules-container .accordion-item {
    background-color: #f7f7f7;
}

/* Component products */
.component-products-results-tbody, .component-products-tbody {
    vertical-align: middle !important;
}

.component-products-results-tbody tr {
    cursor: pointer;
}

.component-products-results-tbody tr.active {
    background-color: var(--primary-button-color);
    color: white;
}

.component-products-results-tbody tr.active:hover td {
    color: white;
}

.component-products-results-tbody img, .component-products-tbody img {
    max-width: 75px;
    width: 100%;
}

.component-products-results-tbody span, .component-products-tbody span {
    color: red;
    cursor: pointer;
}