:root {
    /* AdresData purple (#9b459c) darkened by 30% */
    --admin-primary: #6d306d;
    --admin-sidebar-width: 240px;
}

html, body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: #f5f6f8;
}

/* Main layout */

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    flex-shrink: 0;
    background-color: var(--admin-primary);
    color: #fff;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.admin-sidebar-brand img {
    height: 32px;
}

.admin-sidebar-brand span {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .8rem;
    opacity: .7;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem .5rem;
}

.admin-nav-heading {
    padding: 1rem .75rem .35rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-radius: .375rem;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.admin-nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .08);
}

.admin-nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .15);
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: .75rem 1.5rem;
    background-color: #fff;
    border-bottom: 1px solid #e3e6ea;
}

.admin-content {
    padding: 1.5rem;
}

@media (max-width: 767.98px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Headings don't work in the horizontal menu on small screens */
    .admin-nav-heading {
        display: none;
    }
}

/* Lists */

.list-search {
    max-width: 420px;
}

.clickable-rows tbody tr {
    cursor: pointer;
}

/* Contact messages */

.message-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* Faqs */

.faq-category-row td {
    background-color: #f8f9fb;
}

.faq-child-title {
    padding-left: 1.25rem;
}

.faq-search {
    max-width: 420px;
}

/* Categories */

.category-group-filter {
    max-width: 260px;
}

.category-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    border: 1px dashed var(--bs-border-color);
    border-radius: .375rem;
    background-color: var(--bs-tertiary-bg);
    overflow: hidden;
}

.category-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Filter menu */

.filter-menu {
    position: relative;
}

.filter-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.filter-menu-panel {
    position: absolute;
    top: calc(100% + .25rem);
    left: 0;
    z-index: 1050;
    min-width: 320px;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background-color: var(--bs-body-bg);
}

.tri-state-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .3rem 0;
}

.tri-state-filter-label {
    font-size: .875rem;
}

/* Icon picker */

.icon-picker-preview {
    font-size: 1.25rem;
    width: 2.75rem;
    justify-content: center;
}

.icon-picker-panel {
    margin-top: .25rem;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background-color: var(--bs-body-bg);
    max-height: 360px;
    overflow-y: auto;
}

.icon-picker-group {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin: .5rem 0 .25rem;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: .25rem;
}

.icon-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .5rem .25rem;
    border: 1px solid transparent;
    border-radius: .375rem;
    background: none;
    color: var(--bs-body-color);
    font-size: .7rem;
    line-height: 1.1;
    text-align: center;
}

.icon-picker-item i {
    font-size: 1.35rem;
}

.icon-picker-item:hover {
    background-color: var(--bs-tertiary-bg);
}

.icon-picker-item.selected {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

/* Regions */

.region-country-filter {
    max-width: 220px;
}

.region-zip-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
}

/* Scheduler status (dashboard) */

.job-status-table .job-status-scheduler td {
    background-color: var(--bs-tertiary-bg);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    padding-top: .4rem;
    padding-bottom: .4rem;
}

.job-status-table .job-status-description {
    max-width: 420px;
}

.job-status-table .job-status-has-error td {
    border-bottom-width: 0;
}

.job-status-table .job-status-error td {
    padding-top: 0;
    word-break: break-word;
}

/* Html editor (Quill) */

.html-editor .ql-toolbar.ql-snow {
    border-color: var(--bs-border-color);
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    font-family: inherit;
}

.html-editor .ql-container.ql-snow {
    border-color: var(--bs-border-color);
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
    font-family: inherit;
    font-size: 1rem;
}

.html-editor .ql-editor {
    min-height: 200px;
}

/* Auth layout */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--admin-primary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    height: 48px;
}

/* Blazor */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.validation-message {
    color: var(--bs-danger);
    font-size: .875rem;
}
