:root {
    --smd-bg: #f8fafc;
    --smd-surface: #ffffff;
    --smd-surface-glass: rgba(255, 255, 255, 0.85);
    --smd-border: #e2e8f0;
    --smd-border-hover: #cbd5e1;
    --smd-text: #1e293b;
    --smd-text-muted: #64748b;
    --smd-primary: #3b82f6;
    --smd-primary-hover: #2563eb;
    --smd-danger: #ef4444;
    --smd-danger-hover: #dc2626;
    --smd-radius: 12px;
    --smd-radius-sm: 8px;
    --smd-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --smd-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --smd-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
    --smd-font: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
}

.smd-container {
    font-family: var(--smd-font);
    background-color: var(--smd-bg);
    border-radius: var(--smd-radius);
    box-shadow: var(--smd-shadow);
    overflow: hidden;
    color: var(--smd-text);
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-height: 550px;
    border: 1px solid var(--smd-border);
    box-sizing: border-box;
}

.smd-container * {
    box-sizing: border-box;
}

.smd-layout-row {
    display: flex;
    flex-direction: row;
    height: 100%;
}

/* SIDEBAR */
.smd-sidebar {
    width: 80px;
    background: var(--smd-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 4px;
    border-right: 1px solid var(--smd-border);
    z-index: 20;
    flex-shrink: 0;
    overflow-y: auto;
}

.smd-sidebar-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.smd-tool-btn {
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    color: var(--smd-text-muted);
    border-radius: var(--smd-radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.smd-tool-btn svg {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.smd-tool-btn span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    width: 100%;
}

.smd-tool-btn * {
    pointer-events: none;
}

.smd-tool-btn:hover {
    background-color: var(--smd-bg);
    color: var(--smd-primary);
    transform: none;
    border-color: var(--smd-border);
    box-shadow: var(--smd-shadow-sm);
}

.smd-tool-btn:hover svg {
    transform: scale(1.1);
}

.smd-tool-btn-small {
    height: 48px;
    width: 64px;
    margin-bottom: 6px;
}

.smd-tool-btn-small svg {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
}

.smd-tool-btn-small span {
    font-size: 9px;
}

.smd-spacer {
    flex-grow: 1;
}

/* WORKSPACE */
.smd-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at 50% 50%, #f1f5f9 0%, #e2e8f0 100%);
    min-width: 0;
    /* Ensures the flex item can shrink and won't push the right sidebar out on load */
}

/* TOPBAR */
.smd-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-sizing: border-box;
    padding: 0 24px;
    background: var(--smd-surface-glass);
    /* Using glass effect for premium feel */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--smd-border);
    z-index: 100;
    position: relative;
}

/* Zapobiegamy psuciu UI przez tagi paragrafów dodawanych przez WP */
.smd-container p {
    margin: 0 !important;
    padding: 0 !important;
}

/* PASEK HISTORII */
.smd-history-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smd-divider-v {
    width: 1px;
    height: 24px;
    background-color: var(--smd-border);
    margin: 0 4px;
}

.smd-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--smd-text-muted);
    transition: all 0.2s;
}

.smd-icon-btn * {
    pointer-events: none;
}

.smd-icon-btn:hover:not(:disabled) {
    background-color: var(--smd-border);
    color: var(--smd-text);
}

.smd-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.smd-danger:hover:not(:disabled) {
    background-color: #fee2e2;
    color: var(--smd-danger);
}

.smd-cart-group {
    display: flex;
    align-items: center;
}

.smd-btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    cursor: pointer;
    height: 40px !important;
    padding: 0 24px !important;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1 !important;
    margin: 0 !important;
    transition: all 0.2s;
    border: none;
    box-sizing: border-box !important;
}

.smd-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none !important;
}

.smd-btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

/* Poziomy separator dla bocznego panelu */
.smd-divider-h {
    width: 40px;
    height: 1px;
    background-color: var(--smd-border);
    margin: 8px 0;
}

.smd-sidebar-sep {
    width: 80%;
    height: 2px;
    background: var(--smd-bg);
    margin: 20px 0;
    border-radius: 99px;
}

.smd-sidebar-title {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--smd-text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.smd-sidebar-group-hidden {
    display: none;
}

/* Poziomy pasek wariantów */
.smd-variations-bar {
    background: var(--smd-surface);
    border-bottom: 1px solid var(--smd-border);
    padding: 10px 20px;
    z-index: 90;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.smd-v-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.smd-v-bar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smd-v-bar-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--smd-text-muted);
    white-space: nowrap;
}

.smd-select-sm {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    min-width: 120px;
}


.smd-sidebar-group label {
    margin-bottom: 4px;
    display: block;
    text-align: center;
}

.smd-sidebar-group select {
    width: 100%;
}

/* SIDE PANELS (Layers etc) */
.smd-side-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: var(--smd-surface);
    border-right: 1px solid var(--smd-border);
    z-index: 150;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.05);
    animation: slideInLeft 0.2s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.smd-side-panel[hidden] {
    display: none !important;
}

.smd-side-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--smd-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smd-side-panel-header span {
    font-weight: 700;
    font-size: 14px;
    color: var(--smd-text);
}

.smd-close-panel {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--smd-text-muted);
    line-height: 1;
}

.smd-layers-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smd-layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--smd-bg);
    border: 1px solid var(--smd-border);
    border-radius: var(--smd-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.smd-layer-item:hover {
    border-color: var(--smd-primary);
    background: var(--smd-surface);
}

.smd-layer-item.active {
    border-color: var(--smd-primary);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: inset 0 0 0 1px var(--smd-primary);
}

.smd-layer-preview {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--smd-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.smd-layer-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.smd-layer-info {
    flex-grow: 1;
    min-width: 0;
}

.smd-layer-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--smd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.smd-layer-type {
    font-size: 10px;
    color: var(--smd-text-muted);
    text-transform: uppercase;
}

/* PROPERTIES PANEL */
.smd-properties-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 110;
    pointer-events: none;
}

.smd-slide-panel {
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    width: 100%;
    background: var(--smd-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--smd-border);
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.15s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smd-slide-panel[hidden] {
    display: none !important;
}

.smd-prop-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Opcje idealnie wyśrodkowane pod napisem */
    gap: 8px;
    padding: 0 32px;
    position: relative;
}

/* LEPSZY SEPARATOR (Pionowa Liniia) */
.smd-prop-group::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: var(--smd-border-hover);
}

.smd-prop-group:last-of-type::after {
    display: none;
}

.smd-prop-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--smd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smd-select,
.smd-input-number {
    background: var(--smd-surface);
    border: 1px solid var(--smd-border);
    border-radius: var(--smd-radius-sm);
    padding: 6px 10px;
    font-size: 13px;
    color: var(--smd-text);
    outline: none;
    transition: all 0.2s;
}

.smd-select:focus,
.smd-input-number:focus {
    border-color: var(--smd-primary);
    box-shadow: var(--smd-ring);
}

.smd-input-number {
    width: 70px;
}

.smd-color-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--smd-border);
}

.smd-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.smd-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.smd-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.smd-shape-btn {
    background: var(--smd-surface);
    border: 1px solid var(--smd-border);
    border-radius: var(--smd-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--smd-text);
    cursor: pointer;
    transition: all 0.2s;
}

.smd-shape-btn:hover {
    background: var(--smd-bg);
    border-color: var(--smd-primary);
    color: var(--smd-primary);
}

/* CLIPARTS */
.smd-cliparts-grid {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 12px 4px;
    /* padding-bottom for scrollbar */
    max-width: 100%;
}

.smd-cliparts-grid::-webkit-scrollbar {
    height: 6px;
}

.smd-cliparts-grid::-webkit-scrollbar-track {
    background: var(--smd-bg);
    border-radius: 4px;
}

.smd-cliparts-grid::-webkit-scrollbar-thumb {
    background: var(--smd-border-hover);
    border-radius: 4px;
}

.smd-clipart-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--smd-surface);
    border: 1px solid var(--smd-border);
    border-radius: var(--smd-radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
}

.smd-clipart-wrap:hover {
    border-color: var(--smd-primary);
    transform: scale(1.05);
    box-shadow: var(--smd-shadow-sm);
}

.smd-clipart-item {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.smd-notice {
    font-size: 13px;
    color: var(--smd-text-muted);
}

.smd-products-grid {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 12px 4px;
    max-width: 100%;
}

.smd-products-grid::-webkit-scrollbar {
    height: 6px;
}

.smd-products-grid::-webkit-scrollbar-track {
    background: var(--smd-bg);
    border-radius: 4px;
}

.smd-products-grid::-webkit-scrollbar-thumb {
    background: var(--smd-border-hover);
    border-radius: 4px;
}

.smd-product-item {
    flex-shrink: 0;
    width: 72px;
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    transition: transform 0.2s;
    user-select: none;
}

.smd-product-item:hover {
    transform: translateY(-2px);
}

.smd-product-item img,
.smd-product-item .smd-no-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 2px solid transparent;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.smd-product-item.active img,
.smd-product-item.active .smd-no-thumb {
    border-color: var(--smd-primary);
}

/* EDITOR AREA & TABS */
.smd-editor {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 85px 40px 40px 40px;
    /* Offset na absolutny properties panel */
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.smd-areas-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 0 0 20px 0;
    z-index: 102;
}

.smd-area-tab {
    padding: 10px 24px;
    background: var(--smd-surface-glass);
    border: 1px solid var(--smd-border);
    border-radius: var(--smd-radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--smd-text-muted);
    font-size: 14px;
}

.smd-area-tab:hover {
    background: var(--smd-surface);
    color: var(--smd-text);
}

.smd-area-tab.active {
    background: var(--smd-primary);
    color: white;
    border-color: var(--smd-primary);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.smd-background-wrapper {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: var(--smd-surface);
    /* removed overflow: hidden to allow canvas controls to display over entire editor */
}

.smd-background {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    transform-origin: top left;
    border-radius: 8px;
}

.smd-zone-border {
    position: absolute;
    border: 1px dashed rgba(100, 100, 100, 0.6);
    background: transparent;
    pointer-events: none;
    z-index: 2;
}

/* Wymuszamy aby kanwa przylegała bez skoków */
.smd-canvas-container {
    box-sizing: border-box;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* MODAL / SWITCH OSTRZEGAWCZY */
.smd-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.smd-modal[hidden] {
    display: none !important;
}

.smd-modal-content {
    background: var(--smd-surface);
    padding: 40px;
    border-radius: var(--smd-radius);
    box-shadow: var(--smd-shadow);
    max-width: 520px;
    text-align: center;
    animation: fadeIn 0.15s ease-out;
}

.smd-modal-content h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
    color: var(--smd-text);
}

.smd-modal-content p {
    color: var(--smd-text-muted);
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.5;
}

.smd-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.smd-btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid var(--smd-border);
    background: transparent;
    cursor: pointer;
    color: var(--smd-text);
}

.smd-btn-secondary:hover {
    background: var(--smd-bg);
}

/* RADIAL MENU WARIANTÓW */
.smd-radial-wrap {
    display: flex;
    align-items: center;
}

/* Radial Variation Triggers Labels */
.smd-radial-label {
    font-size: 11px;
    /* Smaller label to fit nicely */
    font-weight: 600;
    color: var(--smd-text-muted);
    margin-right: -4px;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.smd-radial-trigger {
    min-width: 30px;
    height: 30px;
    border-radius: 15px;
    border: 2px solid var(--smd-border);
    background: var(--smd-surface);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
    transition: all 0.2s;
    outline: none;
    box-shadow: var(--smd-shadow-sm);
    position: relative;
    box-sizing: border-box;
    white-space: nowrap;
}

.smd-radial-trigger.is-pill {
    padding: 0 12px;
}

.smd-radial-trigger:hover,
.smd-radial-wrap.open .smd-radial-trigger {
    border-color: var(--smd-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.smd-radial-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    /* Subtle 15% - 25% background as requested */
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.smd-radial-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


.smd-color-dot,
.smd-img-dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.smd-text-dot {
    font-size: 11px;
    font-weight: 700;
    color: var(--smd-text);
    text-transform: uppercase;
}

.smd-item-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--smd-text);
}

/* Prevent injected BR from breaking layout */
.smd-radial-item br {
    display: none !important;
}

.smd-radial-menu {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.smd-radial-wrap.open .smd-radial-menu {
    opacity: 1;
    pointer-events: auto;
}

.smd-radial-item {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    border-radius: 19px;
    /* pill shape */
    border: 2px solid var(--smd-border);
    background: var(--smd-surface);
    cursor: pointer;
    padding: 0 16px;
    /* default for text pill */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s;
    transform: scale(0);
    box-shadow: var(--smd-shadow);
    white-space: nowrap;
}

.smd-radial-item.smd-circle-item {
    width: 38px;
    padding: 2px;
    justify-content: center;
    border-radius: 50%;
}

.smd-radial-item:hover,
.smd-radial-item.active {
    border-color: var(--smd-primary);
    z-index: 201;
}

/* Animation state */
.smd-radial-wrap.open .smd-radial-item {
    opacity: 1;
}

/* SIDEBAR PRAWA STRONA - LISTA PRODUKTOWA */
.smd-right-sidebar {
    width: 140px;
    background: var(--smd-surface-glass);
    border-left: 1px solid var(--smd-border);
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.smd-products-heading {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--smd-text);
    text-align: center;
    border-bottom: 1px solid var(--smd-border);
    padding-bottom: 12px;
}

.smd-products-v-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* RESPONSIVE NAJPROSTSZE */
@media (max-width: 1200px) {
    .smd-container {
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .smd-layout-row {
        flex-direction: column;
    }

    .smd-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid var(--smd-border);
        padding: 12px;
        justify-content: center;
    }

    .smd-right-sidebar {
        width: 100%;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--smd-border);
        padding: 12px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .smd-products-v-list {
        flex-direction: row;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .smd-editor {
        padding: 60px 10px 10px 10px;
    }

    .smd-sidebar {
        padding: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .smd-sidebar::-webkit-scrollbar {
        height: 2px;
    }

    .smd-sidebar::-webkit-scrollbar-thumb {
        background: var(--smd-border-hover);
        border-radius: 2px;
    }

    .smd-tool-btn,
    .smd-tool-btn-small {
        margin-right: 8px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .smd-divider-h {
        width: 1px;
        height: 40px;
        margin: 0 8px;
    }

    .smd-spacer {
        display: none;
    }

    .smd-topbar {
        padding: 10px;
        flex-wrap: wrap;
        height: auto;
        min-height: 60px;
        gap: 15px;
    }

    .smd-history-group {
        order: 1;
    }

    .smd-cart-group {
        order: 2;
        width: 100%;
        margin-left: 0 !important;
        justify-content: space-between !important;
        margin-top: 5px;
    }

    .smd-cart-group .smd-btn-primary {
        padding: 0 16px !important;
        font-size: 13px;
    }

    .smd-side-panel {
        width: 100%;
    }

    .smd-modal-content {
        padding: 24px 16px;
        width: 90%;
        max-width: none;
    }
}

#smd-text-bold.active,
#smd-text-italic.active,
#smd-text-underline.active {
    background-color: var(--smd-primary) !important;
    border-color: var(--smd-primary) !important;
    color: #ffffff !important;
}