@import url("https://fonts.googleapis.com/css2?family=Jaro:opsz@6..72&family=Lacquer&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Sour+Gummy:ital,wght@0,100..900;1,100..900&family=Syne+Mono&family=Teko:wght@300..700&family=Titan+One&family=VT323&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap");

:root {
    --main-color: #36c69d;
    --success-color: #36c69d;
    --error-color: #d9534f;
    --color-body-bg: #f4f4f4;
    --color-surface: #ffffff;
    --color-surface-subtle: #f0f4f4;
    --color-border: #d1d5db;
    --color-border-strong: #9ca3af;
    --color-text-primary: #111827;
    --color-text-muted: #6b7280;
    --color-shadow: rgba(15, 23, 42, 0.15);
    --overlay-color: rgba(15, 23, 42, 0.75);
    --theme-toggle-track: #d1d5db;
    --theme-toggle-thumb: #ffffff;
    --theme-toggle-icon-color: #111827;
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --color-body-bg: #0f172a;
    --color-surface: #111827;
    --color-surface-subtle: #1e293b;
    --color-border: #334155;
    --color-border-strong: #475569;
    --color-text-primary: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-shadow: rgba(8, 47, 73, 0.45);
    --overlay-color: rgba(8, 47, 73, 0.85);
    --theme-toggle-track: #475569;
    --theme-toggle-thumb: #0ea5e9;
    --theme-toggle-icon-color: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none;
}

body {
    background-color: var(--color-body-bg);
    height: 100vh;
    width: 100vw;
    font-family: "Roboto", sans-serif;
    scrollbar-color: var(--main-color) var(--color-body-bg);
    color: var(--color-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-container {
    width: 53vw;
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-logo-container {
    height: 100vh;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15vh;
    color: white;
}

.inputs {
    margin-top: 100px;
    width: 350px;
    display: flex;
    flex-direction: column;
}

.title {
    font-weight: bold;
}

.form-control,
datalist,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
input[type="date"] {
    padding: 15px;
}

input,
select {
    display: inline-block;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    width: 100%;
    padding: 5px 10px;
    margin: 8px 0;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
    -webkit-appearance: none;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease,
        color 0.2s ease;
}

input:focus,
select:focus {
    outline: var(--main-color);
    border: 1px solid var(--main-color);
}

textarea {
    padding: 10px;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease,
        color 0.2s ease;
}

button {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background-color: var(--main-color);
    color: white;
    font-size: 20px;
    cursor: pointer;
    min-width: 100px;
    height: min-content;
}

.login {
    width: 100%;
    margin-top: 20px;
}

.error {
    color: red;
    font-weight: bold;
    align-self: center;
}

.sidebar-logo-image {
    width: 50px;
    aspect-ratio: 1/1;
}

.sidebar-logo-title {
    font-size: 2em;
    font-weight: 900;
    margin-top: 5px;
    letter-spacing: 2px;
    font-family: "Quicksand", monospace;
}

.container {
    height: 100%;
    display: grid;
    grid-template: 1fr / min-content 1fr;
    gap: 50px;
}

.sidebar {
    background-color: var(--main-color);
    height: 100%;
    width: 50px;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 15px 35px var(--color-shadow);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: space-between;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    text-wrap: nowrap;

    overflow-y: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-closed {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar > *:first-child {
    opacity: 1;
    margin-left: -20px;
    position: absolute;
    top: 50vh;
}

.sidebar > * {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.sidebar:hover {
    width: 350px;
}

.sidebar:hover > * {
    opacity: 1;
    pointer-events: auto;
}

.sidebar:hover > *:first-child {
    opacity: 0;
    position: absolute;
}

.open-fully {
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
}

.open-fully > * {
    opacity: 1;
    pointer-events: auto;
}

.sidebar .title {
    font-size: 1.3em;
    padding-top: 20px;
}

.sidebar .title:hover {
    cursor: pointer;
    color: var(--main-color);
    background-color: var(--color-surface);
    padding: 20px;
    border-radius: 5px;
}

.sidebar .title:hover > .banner-count {
    color: var(--main-color);
}

.content {
    font-size: 1.5em;
    padding: 20px;
    padding-bottom: 40px;
    overflow-x: hidden;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.content-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    border-radius: 999px;
    padding: 6px 14px 6px 10px;
    font-size: 0.65em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, color 0.2s ease;
}

.theme-toggle-track {
    position: relative;
    width: 38px;
    height: 18px;
    border-radius: 999px;
    background-color: var(--theme-toggle-track);
    transition: background-color 0.2s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--theme-toggle-thumb);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle-icons {
    display: flex;
    gap: 6px;
    color: var(--theme-toggle-icon-color);
    font-size: 0.8em;
}

.theme-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.theme-toggle[data-theme="light"] .theme-toggle-icon-sun,
.theme-toggle[data-theme="dark"] .theme-toggle-icon-moon {
    opacity: 1;
}

.theme-toggle[data-theme="light"] .theme-toggle-icon-moon,
.theme-toggle[data-theme="dark"] .theme-toggle-icon-sun {
    opacity: 0.45;
}

.theme-toggle-text {
    font-size: 0.7em;
}

.theme-toggle:focus-visible {
    outline: 3px solid var(--main-color);
    outline-offset: 3px;
}

.theme-toggle:hover {
    box-shadow: 0 8px 20px var(--color-shadow);
}

.theme-toggle[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(20px);
}

.theme-toggle[data-theme="dark"] .theme-toggle-track {
    background-color: var(--main-color);
}

.active-sidebar {
    margin-top: 10px;
    color: var(--main-color);
    background-color: var(--color-surface);
    padding: 20px;
    border-radius: 5px;
}

.active-sidebar > .banner-count {
    color: var(--main-color);
}

.sidebar-view-button {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
}

.sidebar-view-button path {
    stroke: var(--color-text-primary);
}

svg {
    height: 1.6em;
    cursor: pointer;
}

.sidebar-close-button {
    display: none;
    border: 2px solid white;
    border-radius: 50%;
}

.sidebar-close-button svg,
.sidebar-close-button path,
.sidebar-close-button g,
.sidebar-close-button circle {
    fill: white;
}

.sidebar-title {
    display: flex;
    justify-content: space-between;
}

.table-scroll {
    margin-top: 20px;
    grid-column: 1 / -1;
    width: 100%;
    height: min-content;
    background-color: var(--color-surface-subtle);
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease,
        color 0.3s ease;
}

table {
    width: 100%;
    height: 95%;
}

th {
    top: -1px;
    position: sticky;
    background-color: var(--main-color);
    color: white;
    cursor: default;
    text-align: left;
}

td,
th {
    padding: 15px 20px;
    font-size: 0.9em;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}

tr {
    border: 1px solid var(--color-border);
    /*text-align: center;*/
}

tr:hover {
    background-color: var(--main-color);
    color: white;
    cursor: pointer;
}

.table-pagination-nav {
    padding: 10px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.delete-button,
.delete-modal-button {
    background-color: var(--error-color);
}

.details-container {
    display: grid;
    grid-template: 1fr / repeat(3, 30%);
    gap: 10px;
    justify-content: space-between;
    padding-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 5px;
}

.detail {
    margin-top: 10px;
}

.self-row {
    grid-column: 1 / -1;
}

.detail-row > div {
    width: 50%;
}

.inline-modal {
    grid-column: 1 / -1;
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid var(--color-border);
    background-color: var(--color-surface);
    overflow-y: scroll;
    transition: background-color 0.3s ease, border-color 0.3s ease,
        color 0.3s ease;
}

.inline-modal-title {
    display: flex;
    align-content: center;
    margin-bottom: 10px;
}

.inline-modal-content {
    display: grid;
    grid-template: 1fr / repeat(3, 30%);
    gap: 5%;
}

.title-divide {
    border-top: 1px solid var(--color-border);
    grid-column: 1 / -1;
    font-size: 1.4em;
    font-weight: bold;
    margin-top: 30px;
    padding-top: 20px;
    display: flex;
}

.title-divide > div {
    width: 100%;
}

.fullpage {
    display: none;
    position: fixed;
    z-index: 0;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: contain;
    background-repeat: no-repeat no-repeat;
    background-position: center center;
    background-color: var(--overlay-color);
    padding: 20px;
    justify-content: center;
}

.exit-button-container {
    height: 100%;
}

.exit-button {
    fill: var(--main-color);
    font-size: 2em;
    margin-left: 10px;
    opacity: 0.5;
}

.image-input-container {
    display: flex;
    gap: 5px;
}

.image-input-container > button {
    align-self: center;
    padding: 18px;
}

button > svg {
    height: 15px;
    width: 40px;
}

dialog {
    position: relative;
    background-color: var(--color-surface);
    border: 2px solid var(--color-border-strong);
    border-radius: 10px;
    margin: auto;
    height: 30vh;
    width: 50vw;
    padding: 50px;
    color: var(--color-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease,
        border-color 0.3s ease;
}

dialog::backdrop {
    background-color: var(--overlay-color);
}

.modal-dialog {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-header {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 20px;
}

.modal-description {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-buttons {
    display: flex;
    margin-top: 20px;
    padding-bottom: 20px;
    gap: 10px;
}

.modal-buttons > * {
    flex-grow: 1;
}

.secondary-button {
    background-color: var(--color-surface);
    color: var(--main-color);
    border: 1px solid var(--main-color);
}

.pagination {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
    list-style: none;
    width: 100%;
}

li {
    align-self: center;
}

a {
    text-decoration: none;
    color: var(--color-text-primary);
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--main-color);
}

.active {
    color: var(--main-color);
    font-weight: bold;
}

#filter-dialog {
    height: 85vh;
    width: 50vw;
}

.checkbox-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    padding-left: 10px;
}

input[type="radio"],
input[type="checkbox"] {
    -webkit-appearance: radio;
    width: min-content;
    scale: 1.5;
    margin-right: 5px;
}

.divide-3-column {
    display: grid;
    grid-template: 1fr / repeat(3, 30%);
    gap: 5%;
}

.loader {
    border: 16px solid var(--color-surface-subtle);
    border-top: 16px solid var(--main-color);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    align-self: center;
}

.alert-box {
    display: none;
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 30px 20px;
    min-width: 25vh;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    animation: bounce 5s ease-in-out forwards;
    background-color: var(--success-color);
    color: white;
}

.divide-2-column {
    display: grid;
    grid-template: 1fr / repeat(2, 45%);
    gap: 10%;
}

.zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
}

.highlight-rectangle {
    position: absolute;
    background-color: rgba(255, 0, 0, 0.2);
    pointer-events: none;
}

.zoom-image {
    width: 100%;
}

.zoom-lens {
    position: absolute;
    width: 200px; /* Set the radius (diameter) of the zoom area */
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.zoom-lens img {
    position: absolute;
    transform-origin: center;
}

.with-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-count {
    font-size: 20px;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 900;
}

#suggested-images {
    display: flex;
    overflow-y: hidden;
    overflow-x: scroll;
    gap: 10px;
    padding: 10px;
    height: 200px;
}

#suggested-names {
    display: flex;
    overflow-y: hidden;
    overflow-x: scroll;
    gap: 10px;
    white-space: nowrap;
    font-size: 15px;
    padding: 5px;
    outline: none;
}

.suggested-name {
    background-color: var(--color-surface);
    padding: 5px;
    border-radius: 5px;
}

.clickable-container {
    position: relative;
    border: 2px solid var(--main-color);
    border-radius: 5px;
    cursor: pointer;
}

.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    opacity: 0;
    transition: 0.5s ease;
    background-color: var(--main-color);

    display: flex;
    justify-content: center;
    align-items: center;
}

.clickable-container:hover .overlay {
    opacity: 0.5;
}

#suggest-names-from-system {
    height: 30vh;
    overflow-y: scroll;
    cursor: pointer;
    border: 2px solid var(--main-color);
}

#suggest-names-from-system > * {
    width: 100%;
    text-align: center;
    background-color: var(--color-surface);
    color: var(--main-color);
}

#suggest-names-from-system > *:hover {
    background-color: var(--main-color);
    color: white;
    border: 2px solid var(--main-color);
}

.overview-cards {
    display: flex;
    justify-content: space-around;
}

.overview-card {
    border: 2px solid var(--color-border);
    border-radius: 6px;
    padding: 20px;
    width: 100%;
    margin: 20px;
    background-color: var(--color-surface);
    transition: background-color 0.3s ease, border-color 0.3s ease,
        color 0.3s ease, box-shadow 0.3s ease;
}

.overview-card > *:first-child {
    font-size: 18px;
    margin-bottom: 10px;
}

legend {
    margin: 0 auto;
    padding-right: 10px;
    padding-left: 10px;
    font-weight: normal;
}

.admin-only-show {
    display: none;
}

.admin-only-click {
    pointer-events: none;
}

.status-active {
    background-color: var(--success-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-inactive {
    background-color: var(--error-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

#name-info {
    font-size: 0.7em;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
    100% {
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media screen and (max-width: 1190px) {
    .container {
        grid-template: 1fr / 1fr;
    }

    .sidebar {
        display: none;
        margin-right: 20px;
    }

    .sidebar-view-button {
        display: block;
    }

    .sidebar-close-button {
        display: block;
    }

    .content-toolbar {
        justify-content: flex-start;
    }

    .theme-toggle {
        font-size: 0.75em;
        width: auto;
    }

    .column-not-important {
        display: none;
    }

    .title-container {
        justify-content: flex-start;
        gap: 20px;
    }

    .details-container {
        grid-template: 1fr / 1fr;
    }

    .inline-modal-content {
        grid-template: 1fr / 1fr;
    }

    dialog,
    #filter-dialog {
        min-width: 90vw;
        padding: 20px;
    }

    button {
        width: min-content;
    }

    .detail-row {
        flex-direction: column;
        align-items: center;
    }

    .detail-row > div {
        width: 100%;
    }

    .divide-3-column,
    .divide-2-column {
        display: flex;
        flex-direction: column;
    }

    .products-on-hold-modal-buttons {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .overview-cards {
        flex-direction: column;
    }

    .overview-card {
        text-align: center;
        width: 90%;
    }

    .sidebar > *:first-child {
        display: none;
    }

    .login-container {
        height: 100%;
        width: 100%;
        margin-bottom: 20px;
        margin-top: 20px;
    }

    td,
    th {
        padding: 20px 5px;
        text-wrap: wrap;
    }

    .modal-buttons {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .modal-buttons > * {
        width: 100%;
    }
}
