﻿.mud-button-root,
.mud-icon-button,
.mud-chip,
.mud-nav-link,
.mud-table-row {
    transition: background-color .15s ease, box-shadow .15s ease, color .15s ease, transform .1s ease !important;
}

.mud-button-filled:active {
    transform: scale(.98);
}

.mud-paper {
    transition: box-shadow .2s ease;
}

.mud-table-row:hover {
    background-color: var(--mud-palette-action-default-hover) !important;
}

.mud-nav-link.mud-nav-link-active {
    font-weight: 600;
}

.mud-avatar {
    font-weight: 600;
}

.mud-dialog {
    border-radius: 16px !important;
    animation: takeit-dialog-in .22s cubic-bezier(.25, .8, .4, 1) both !important;
}

@keyframes takeit-dialog-in {
    0% {
        opacity: 0;
        transform: scale(.94) translateY(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mud-overlay .mud-overlay-scrim {
    animation-duration: .22s !important;
}

.mud-appbar {
    border-bottom: 1px solid var(--mud-palette-divider);
    position: relative;
    z-index: calc(var(--mud-zindex-appbar) + 2);
}

.mud-appbar-breadcrumbs .mud-breadcrumb-item,
.mud-appbar-breadcrumbs .mud-breadcrumb-item-text,
.mud-appbar-breadcrumbs .mud-breadcrumb-separator {
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

.mud-drawer {
    border-right: 1px solid var(--mud-palette-divider);
    padding-top: 2rem;
}

.mud-container-maxwidth-lg {
    max-width: none !important;
}

.mud-paper {
    border: 1px solid var(--mud-palette-divider);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04) !important;
}

.mud-table-container {
    border-radius: var(--mud-default-borderradius);
}

.mud-table-toolbar {
    padding: 12px 4px !important;
}

.mud-table-head .mud-table-cell {
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--mud-palette-text-secondary);
    background-color: var(--mud-palette-background);
}

.mud-table-cell {
    padding: 12px 16px !important;
}

.mud-table-row {
    transition: background-color .12s ease;
}

.mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

.mud-table-pagination-toolbar {
    border-top: 1px solid var(--mud-palette-divider);
}

.mud-dialog-content {
    padding-top: 8px !important;
}

.mud-dialog-actions {
    padding: 12px 24px !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-default);
    border-radius: 100px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

#app-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f6f4;
    transition: opacity .25s ease;
}

#app-splash.app-splash-hidden {
    opacity: 0;
    pointer-events: none;
}

.app-splash-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #e1e7e3;
    border-top-color: #13852a;
    animation: app-splash-spin .7s linear infinite;
}

@keyframes app-splash-spin {
    to {
        transform: rotate(360deg);
    }
}

html.takeit-dark-mode #app-splash {
    background: #0c0f18;
}

html.takeit-dark-mode .app-splash-spinner {
    border-color: #232a38;
    border-top-color: #17b81f;
}

/* Reconnect modal (Components/Layout/ReconnectModal.razor). blazor.server.js sets one components-reconnect-* state
   class on it; each text / button is shown only for its states. Colors as AppTheme, light and dark. */
.takeit-reconnect {
    --takeit-reconnect-scrim: rgba(12, 15, 24, .45);
    --takeit-reconnect-surface: #ffffff;
    --takeit-reconnect-text: #18211c;
    --takeit-reconnect-border: #e1e7e3;
    --takeit-reconnect-primary: #13852a;
    --takeit-reconnect-on-primary: #ffffff;
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--takeit-reconnect-scrim);
    backdrop-filter: blur(2px);
}

html.takeit-dark-mode .takeit-reconnect {
    --takeit-reconnect-scrim: rgba(0, 0, 0, .6);
    --takeit-reconnect-surface: #131824;
    --takeit-reconnect-text: #e8ecf2;
    --takeit-reconnect-border: #232a38;
    --takeit-reconnect-primary: #17b81f;
    --takeit-reconnect-on-primary: #0c0f18;
}

.takeit-reconnect.components-reconnect-show,
.takeit-reconnect.components-reconnect-failed,
.takeit-reconnect.components-reconnect-paused,
.takeit-reconnect.components-reconnect-resume-failed,
.takeit-reconnect.components-reconnect-rejected {
    display: flex;
}

.takeit-reconnect-card {
    width: 100%;
    max-width: 380px;
    padding: 28px 24px 24px;
    border-radius: 16px;
    border: 1px solid var(--takeit-reconnect-border);
    background: var(--takeit-reconnect-surface);
    color: var(--takeit-reconnect-text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    text-align: center;
    font-family: var(--mud-typography-default-family, Roboto, Helvetica, Arial, sans-serif);
    animation: takeit-dialog-in .22s cubic-bezier(.25, .8, .4, 1) both;
}

.takeit-reconnect-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid var(--takeit-reconnect-border);
    border-top-color: var(--takeit-reconnect-primary);
    animation: app-splash-spin .7s linear infinite;
}

.takeit-reconnect-text {
    margin: 0;
    font-size: .95rem;
    line-height: 1.5;
}

.takeit-reconnect-actions {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.takeit-reconnect-button {
    display: none;
    padding: 8px 18px;
    border: 1px solid var(--takeit-reconnect-primary);
    border-radius: 8px;
    background: var(--takeit-reconnect-primary);
    color: var(--takeit-reconnect-on-primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.takeit-reconnect-button:hover {
    filter: brightness(1.08);
}

.takeit-reconnect-button-secondary {
    background: transparent;
    color: var(--takeit-reconnect-primary);
}

/* What each state shows. "show": rejoining (first attempt) or, with "retrying", waiting for the next attempt. */
.takeit-reconnect-text.takeit-reconnect-when-rejoining,
.takeit-reconnect-text.takeit-reconnect-when-retrying,
.takeit-reconnect-text.takeit-reconnect-when-failed,
.takeit-reconnect-text.takeit-reconnect-when-paused,
.takeit-reconnect-text.takeit-reconnect-when-resume-failed,
.takeit-reconnect-text.takeit-reconnect-when-rejected {
    display: none;
}

.components-reconnect-show:not(.components-reconnect-retrying) .takeit-reconnect-text.takeit-reconnect-when-rejoining,
.components-reconnect-show.components-reconnect-retrying .takeit-reconnect-text.takeit-reconnect-when-retrying,
.components-reconnect-failed .takeit-reconnect-text.takeit-reconnect-when-failed,
.components-reconnect-paused .takeit-reconnect-text.takeit-reconnect-when-paused,
.components-reconnect-resume-failed .takeit-reconnect-text.takeit-reconnect-when-resume-failed,
.components-reconnect-rejected .takeit-reconnect-text.takeit-reconnect-when-rejected {
    display: block;
}

/* The buttons only when the user has to act; the spinner only while something is happening. */
.components-reconnect-failed .takeit-reconnect-actions,
.components-reconnect-paused .takeit-reconnect-actions,
.components-reconnect-resume-failed .takeit-reconnect-actions {
    display: flex;
}

.components-reconnect-failed .takeit-reconnect-button.takeit-reconnect-when-failed,
.components-reconnect-paused .takeit-reconnect-button.takeit-reconnect-when-paused,
.components-reconnect-resume-failed .takeit-reconnect-button.takeit-reconnect-when-resume-failed {
    display: inline-block;
}

.components-reconnect-failed .takeit-reconnect-spinner,
.components-reconnect-paused .takeit-reconnect-spinner,
.components-reconnect-resume-failed .takeit-reconnect-spinner {
    display: none;
}

.fw-600 {
    font-weight: 600 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.takeit-drawer-quick-actions {
    background: var(--mud-palette-background-grey);
}

.takeit-drawer-divider {
    flex: 0 0 auto !important;
}

.takeit-mobile-card {
    border-radius: 14px !important;
}

.takeit-mobile-card:active {
    background-color: var(--mud-palette-action-default-hover);
}

/* Contact messages page. */
.takeit-stat-link[role="button"] {
    cursor: pointer;
}

.takeit-contact-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.takeit-contact-filters > * {
    flex: 1 1 180px;
    min-width: 0;
}

.takeit-contact-filters > .takeit-contact-search {
    flex: 2 1 260px;
}

.takeit-contact-row {
    cursor: pointer;
}

.takeit-contact-unread .takeit-contact-name {
    font-weight: 700;
}

tr.takeit-contact-unread {
    background-color: var(--mud-palette-primary-hover);
}

.takeit-mobile-card.takeit-contact-unread {
    border-left: 3px solid var(--mud-palette-primary);
}

.takeit-unread-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background-color: var(--mud-palette-primary);
}

.takeit-contact-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 320px;
    overflow-y: auto;
}

.takeit-contact-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

/* Edit / delete buttons in a grid row: always on one line. */
.takeit-row-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
    min-width: max-content;
}

/* Dashboard stat cards that link to their page. */
.takeit-stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.takeit-stat-link:hover .takeit-stat-card {
    background-color: var(--mud-palette-action-default-hover);
}

/* One line of text cut with "…" instead of wrapping (Categories / Products pages). */
.takeit-ellipsis {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Flex wrappers (MudStack) around .takeit-ellipsis must be allowed to shrink. */
.takeit-ellipsis-row {
    min-width: 0;
    flex: 1 1 auto;
}

/* Grid cells ignore max-width, so the limit goes on the cell content. */
.takeit-cell-text {
    max-width: 260px;
}

.takeit-list-ellipsis .mud-list-item-text {
    min-width: 0;
}

.takeit-chipset-ellipsis .mud-chip {
    max-width: 100%;
}

/* Image preview in the Category editor. */
.takeit-image-preview {
    position: relative;
    width: 160px;
    height: 120px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px !important;
}

.takeit-image-preview-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
}

/* Thumbnails that open ImagePreviewDialog. */
.takeit-zoomable {
    cursor: zoom-in;
    display: inline-flex;
}

.takeit-lightbox .mud-dialog-title {
    min-width: 0;
    padding-right: 56px; /* room for the close button */
}

.takeit-lightbox-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-gray);
    cursor: zoom-out;
}

/* The whole lightbox fits the window: no scrollbars, the image shrinks instead. */
.takeit-lightbox .mud-dialog-content {
    overflow: hidden;
}

.takeit-lightbox-img {
    display: block;
    max-width: 100%;
    /* window minus dialog margins, title bar and thumbnail strip */
    max-height: calc(100vh - 240px);
    object-fit: contain;
    cursor: default;
}

.takeit-lightbox-body {
    position: relative;
}

.takeit-lightbox-nav {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    opacity: .85;
}

.takeit-lightbox-prev { left: 12px; }
.takeit-lightbox-next { right: 12px; }

.takeit-lightbox-strip {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
}

.takeit-lightbox-strip img {
    width: 64px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: .55;
    border: 2px solid transparent;
}

.takeit-lightbox-strip img.active {
    opacity: 1;
    border-color: var(--mud-palette-primary);
}

/* Product gallery tiles in the editor. */
.takeit-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.takeit-gallery-tile {
    position: relative;
    width: 112px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
}

.takeit-gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.takeit-gallery-tile-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, .45);
}

.takeit-gallery-tile-actions .mud-icon-button {
    color: #fff;
    padding: 4px;
}

.takeit-gallery-add {
    width: 112px;
    height: 84px;
    border-radius: 8px;
    border: 2px dashed var(--mud-palette-lines-inputs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.takeit-lang-tag {
    min-width: 28px;
    font-weight: 700;
}

.takeit-stat-card,
.takeit-chart-card {
    position: relative;
    border-radius: 16px !important;
    overflow: hidden;
}

.takeit-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-primary-lighten));
}

.takeit-stat-card:hover,
.takeit-chart-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08) !important;
    transform: translateY(-2px);
}

.takeit-stat-header {
    margin-bottom: 12px;
}

.takeit-stat-label {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .75rem;
    line-height: 1;
}

.takeit-stat-icon,
.takeit-chart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.takeit-chart-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    margin-bottom: 0;
}

.takeit-stat-icon-primary {
    color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover);
}

.takeit-stat-icon-info {
    color: var(--mud-palette-info);
    background: var(--mud-palette-info-hover);
}

.takeit-stat-icon-success {
    color: var(--mud-palette-success);
    background: var(--mud-palette-success-hover);
}

.takeit-stat-icon-warning {
    color: var(--mud-palette-warning);
    background: var(--mud-palette-warning-hover);
}

.takeit-stat-icon-default {
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-action-default-hover);
}

/* Dashboard: the rows of the offers pipeline and of the recent activity, each a link to its record or list. */
.takeit-dashboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.takeit-dashboard-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.takeit-dashboard-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor; /* the color of its takeit-stat-icon-* class, full */
}

.takeit-dashboard-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 959.95px) {
    .mud-drawer {
        padding-top: 1rem;
        width: 260px !important;
    }

    .mud-main-content {
        margin-left: 0 !important;
    }

    .mud-container-maxwidth-lg {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .mud-main-content>.mud-container.my-6 {
        margin-top: 16px !important;
        margin-bottom: 16px !important;
    }

    .mud-paper.pa-6 {
        padding: 16px !important;
    }

    .mud-paper.pa-5 {
        padding: 16px !important;
    }

    .takeit-appbar-title {
        min-width: 0;
        overflow: hidden;
    }

    .takeit-appbar-title .mud-typography-h5 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .takeit-appbar-breadcrumbs {
        display: none;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar) {
        flex-wrap: wrap;
        height: auto !important;
        min-height: unset !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        row-gap: 8px;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-input-control,
    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-select {
        max-width: 100% !important;
        width: 100%;
        flex: 1 1 100%;
        margin-left: 0 !important;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-spacer {
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-typography,
    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-tooltip-root,
    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-button-root {
        order: 2;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-button-root.mud-button-filled {
        flex: 1 1 auto;
        justify-content: center;
    }

    .mud-toolbar-gutters:not(.mud-toolbar-appbar)>.mud-button-root.mud-button-filled .mud-button-label {
        justify-content: center;
    }

    .mud-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mud-table-cell {
        padding: 8px 12px !important;
    }

    .mud-dialog {
        margin: 12px !important;
        max-width: calc(100vw - 24px) !important;
    }

    .mud-dialog-actions {
        padding: 8px 16px !important;
    }
}

@media (max-width: 599.95px) {
    .mud-container-maxwidth-xs {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .mud-container-maxwidth-xs .mud-paper.pa-8 {
        padding: 24px !important;
    }

    .mud-appbar {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .takeit-stat-icon,
    .takeit-chart-icon {
        width: 30px;
        height: 30px;
    }
}
/* Count next to a sidebar item (new contact requests) */
.takeit-nav-badge {
    display: inline-block;
    margin-left: 8px;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background-color: var(--mud-palette-warning);
    color: var(--mud-palette-warning-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

/* Partner logos: on light grey in both themes, as on the website, so a white logo or a missing transparency is obvious. */
.takeit-partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 56px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #eef0f3;
}

.takeit-partner-logo-large {
    width: 240px;
    height: 96px;
}

.takeit-partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* News article editor: the images drop square. The file input covers it (a click opens the picker, a drop adds the files). */
.takeit-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    text-align: center;
    border: 2px dashed var(--mud-palette-lines-inputs);
    border-radius: 12px;
    background: var(--mud-palette-background-gray);
    transition: border-color .15s, background-color .15s;
}

.takeit-dropzone:hover,
.takeit-dropzone-active {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary-hover);
}

.takeit-dropzone input[type=file] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* News article editor: the gallery, big tiles. */
.takeit-news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.takeit-news-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-gray);
}

.takeit-news-tile-main {
    border: 2px solid var(--mud-palette-primary);
}

.takeit-news-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.takeit-news-tile-tags {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    gap: 4px;
}

.takeit-news-tile-tags .mud-chip {
    margin: 0;
}

.takeit-news-tile-actions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}

.takeit-news-tile-actions .mud-icon-button {
    color: #fff;
}

.takeit-news-tile-actions .mud-icon-button:disabled {
    color: rgba(255, 255, 255, .35);
}

/* Rich text descriptions (Quill, see RichTextEditor.razor): same height as the old 12-line text box, theme colours. */
.takeit-richtext {
    margin-top: 12px;
}

.takeit-richtext-label {
    display: block;
    margin: 0 0 4px 2px;
}

.takeit-richtext .ql-toolbar.ql-snow {
    border-color: var(--mud-palette-lines-inputs);
    border-radius: 4px 4px 0 0;
    font-family: inherit;
}

.takeit-richtext .ql-container.ql-snow {
    height: 280px;
    border-color: var(--mud-palette-lines-inputs);
    border-radius: 0 0 4px 4px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--mud-palette-text-primary);
}

.takeit-richtext .ql-editor.ql-blank::before {
    color: var(--mud-palette-text-secondary);
}

.takeit-richtext .ql-snow .ql-stroke {
    stroke: var(--mud-palette-text-secondary);
}

.takeit-richtext .ql-snow .ql-fill {
    fill: var(--mud-palette-text-secondary);
}

.takeit-richtext .ql-snow .ql-picker {
    color: var(--mud-palette-text-secondary);
}

.takeit-richtext .ql-snow button:hover .ql-stroke,
.takeit-richtext .ql-snow button.ql-active .ql-stroke,
.takeit-richtext .ql-snow .ql-picker-label:hover .ql-stroke,
.takeit-richtext .ql-snow .ql-picker-label.ql-active .ql-stroke {
    stroke: var(--mud-palette-primary);
}

.takeit-richtext .ql-snow button:hover .ql-fill,
.takeit-richtext .ql-snow button.ql-active .ql-fill {
    fill: var(--mud-palette-primary);
}

.takeit-richtext .ql-snow .ql-picker-label:hover,
.takeit-richtext .ql-snow .ql-picker-label.ql-active,
.takeit-richtext .ql-snow .ql-picker-item:hover,
.takeit-richtext .ql-snow .ql-picker-item.ql-selected {
    color: var(--mud-palette-primary);
}

.takeit-richtext .ql-snow .ql-picker-options,
.takeit-richtext .ql-snow .ql-tooltip {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-color: var(--mud-palette-lines-default);
    z-index: 2;
}

.takeit-richtext .ql-snow .ql-tooltip input[type=text] {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-color: var(--mud-palette-lines-inputs);
}

/* Contact requests: two lines of the message in the list, the whole text with its line breaks in the details. */
.takeit-contact-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 360px;
    font-weight: 400;
}

.takeit-contact-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: 320px;
    overflow-y: auto;
}

/* Products of an order: scrolls inside the dialog, the header row stays visible */
.takeit-order-items {
    max-height: 360px;
    overflow-y: auto;
}

.takeit-order-items .mud-table-container {
    overflow: visible;
}

.takeit-order-item-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--mud-palette-background-gray);
}

/* Product preview (/product-preview) */
.takeit-preview-main-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-gray);
}

img.takeit-preview-main-image {
    cursor: zoom-in;
}

.takeit-preview-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.takeit-preview-thumbs img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid transparent;
    background: var(--mud-palette-background-gray);
    cursor: pointer;
}

.takeit-preview-thumbs img.selected {
    border-color: var(--mud-palette-primary);
}

.takeit-preview-description img {
    max-width: 100%;
    height: auto;
}

.takeit-preview-compatible {
    max-width: 320px;
}
