.eipd-shell,
.eipd-shell * {
    box-sizing: border-box;
}

.eipd-shell {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 10px 0 0;
    color: #1f2937;
    overflow-x: hidden;

    /* Design tokens */
    --eipd-primary: #f28c1f;
    --eipd-primary-hover: #d97706;
    --eipd-disabled: #9ca3af;
    --eipd-text: #1f2937;
    --eipd-text-muted: #64748b;
    --eipd-border: #e5e7eb;
    --eipd-accent: #d1923f;
    --eipd-bg-panel: #f8f6f0;
}

.eipd-editor-frame {
    position: relative;
    border: 1px solid #d7dbe3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(44, 52, 66, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.eipd-editor-topbar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 10px 8px 0;
    border-bottom: 1px solid var(--eipd-border);
    background: linear-gradient(180deg, #dfdedd 0%, #cbc3b4 100%);
    flex-shrink: 0;
}

.eipd-topbar-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    flex-shrink: 0;
}

.eipd-topbar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    filter: brightness(0) saturate(60%) invert(59%) sepia(89%) saturate(300%) hue-rotate(351deg) brightness(85%) contrast(100%) drop-shadow(0 4px 4px rgba(255, 255, 255, 0.55));
}

/* ── Topbar scroll wrapper (horizontal overflow arrows) ── */
.eipd-topbar-scroll-wrapper {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
    position: relative;
}

.eipd-topbar-scroll-wrapper::before,
.eipd-topbar-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 26px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 1;
}

.eipd-topbar-scroll-wrapper::before {
    left: 30px;
    background: linear-gradient(90deg, rgba(223, 222, 221, 0.96) 0%, rgba(223, 222, 221, 0) 100%);
}

.eipd-topbar-scroll-wrapper::after {
    right: 30px;
    background: linear-gradient(270deg, rgba(203, 195, 180, 0.92) 0%, rgba(203, 195, 180, 0) 100%);
}

.eipd-topbar-scroll-wrapper.has-left-overflow::before,
.eipd-topbar-scroll-wrapper.has-right-overflow::after {
    opacity: 1;
}

.eipd-topbar-scroll-btn {
    flex-shrink: 0;
    width: 26px;
    align-self: stretch;
    border: 1px solid #bcc4cd !important;
    border-radius: 8px;
    background: #eef1f4 !important;
    color: #374151 !important;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0;
    line-height: 1;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.22s ease, visibility 0.22s ease;
}

.eipd-topbar-scroll-btn:hover,
.eipd-topbar-scroll-btn:focus-visible {
    border-color: var(--eipd-accent) !important;
    background: #f3ede3 !important;
    color: #5a4a3a !important;
    outline: none;
}

.eipd-topbar-scroll-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.eipd-topbar-scroll-left {
    margin-right: 4px;
}

.eipd-topbar-scroll-right {
    margin-left: 4px;
}

.eipd-top-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    min-width: 0;
}

.eipd-top-actions::-webkit-scrollbar {
    display: none;
}

.eipd-topbar-group {
    display: inline-flex;
    align-items: stretch;
    gap: 2px;
    padding: 5px;
    border: 1px solid #b9c0c7;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(243, 245, 247, 0.98) 0%, rgba(229, 233, 237, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 1px 2px rgba(62, 76, 94, 0.08);
    flex-shrink: 0;
}

.eipd-top-btn {
    border: 1px solid #bcc4cd !important;
    background: #eef1f4 !important;
    color: #374151 !important;
    border-radius: 7px;
    min-height: 62px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none !important;
}

.eipd-top-icon-btn {
    min-width: 62px;
    max-width: 82px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    line-height: 0.95;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
}

.eipd-top-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.eipd-top-btn-icon svg {
    width: 21px;
    height: 21px;
}

.eipd-top-btn-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 0.92;
}

.eipd-top-btn[aria-pressed="true"] {
    border-color: var(--eipd-accent) !important;
    background: var(--eipd-accent) !important;
    color: #ffffff !important;
}

.eipd-top-btn:hover,
.eipd-top-btn:focus-visible,
.eipd-top-btn.is-active {
    border-color: var(--eipd-accent) !important;
    background: #f3ede3 !important;
    color: #5a4a3a !important;
    outline: none;
}

.eipd-top-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.eipd-op-btn[data-eipd-operation="cut"] {
    color: #b42318 !important;
    border-color: rgba(180, 35, 24, 0.24) !important;
    background: rgba(180, 35, 24, 0.08) !important;
}

.eipd-op-btn[data-eipd-operation="engrave_outline"] {
    color: #175cd3 !important;
    border-color: rgba(23, 92, 211, 0.24) !important;
    background: rgba(23, 92, 211, 0.08) !important;
}

.eipd-op-btn[data-eipd-operation="engrave_fill"] {
    color: #027a48 !important;
    border-color: rgba(2, 122, 72, 0.24) !important;
    background: rgba(2, 122, 72, 0.08) !important;
}

.eipd-op-btn[data-eipd-operation="engrave_fill_outline"] {
    color: #b54708 !important;
    border-color: rgba(181, 71, 8, 0.24) !important;
    background: rgba(181, 71, 8, 0.08) !important;
}

.eipd-op-btn[data-eipd-operation="none"] {
    color: #64748b !important;
    border-color: rgba(100, 116, 139, 0.24) !important;
    background: rgba(100, 116, 139, 0.08) !important;
}

.eipd-op-btn:hover,
.eipd-op-btn:focus-visible {
    filter: saturate(1.06);
}

.eipd-op-btn.is-active[data-eipd-operation="cut"] {
    background: rgba(180, 35, 24, 0.16) !important;
    border-color: #b42318 !important;
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.08), 0 0 0 2px rgba(180, 35, 24, 0.08) !important;
}

.eipd-op-btn.is-active[data-eipd-operation="engrave_outline"] {
    background: rgba(23, 92, 211, 0.16) !important;
    border-color: #175cd3 !important;
    box-shadow: inset 0 0 0 1px rgba(23, 92, 211, 0.08), 0 0 0 2px rgba(23, 92, 211, 0.08) !important;
}

.eipd-op-btn.is-active[data-eipd-operation="engrave_fill"] {
    background: rgba(2, 122, 72, 0.16) !important;
    border-color: #027a48 !important;
    box-shadow: inset 0 0 0 1px rgba(2, 122, 72, 0.08), 0 0 0 2px rgba(2, 122, 72, 0.08) !important;
}

.eipd-op-btn.is-active[data-eipd-operation="engrave_fill_outline"] {
    background: rgba(181, 71, 8, 0.16) !important;
    border-color: #b54708 !important;
    box-shadow: inset 0 0 0 1px rgba(181, 71, 8, 0.08), 0 0 0 2px rgba(181, 71, 8, 0.08) !important;
}

.eipd-op-btn.is-active[data-eipd-operation="none"] {
    background: rgba(100, 116, 139, 0.16) !important;
    border-color: #64748b !important;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08), 0 0 0 2px rgba(100, 116, 139, 0.08) !important;
}

.eipd-editor-body {
    display: grid;
    grid-template-columns: 78px 1fr 320px;
    min-height: 560px;
    background: #f7f9fc;
}

/* ── Toolrail vertical scroll wrapper ── */
.eipd-toolrail-scroll-wrapper {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    border-right: 1px solid var(--eipd-border);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.eipd-toolrail-scroll-wrapper::before,
.eipd-toolrail-scroll-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 44px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 3;
}

.eipd-toolrail-scroll-wrapper::before {
    top: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
}

.eipd-toolrail-scroll-wrapper::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0) 100%);
}

.eipd-toolrail-scroll-wrapper.has-top-overflow::before,
.eipd-toolrail-scroll-wrapper.has-bottom-overflow::after {
    opacity: 1;
}

.eipd-toolrail-scroll-btn {
    position: absolute;
    left: 50%;
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    height: 44px;
    min-height: 44px;
    border: none !important;
    border-radius: 6px;
    background: #f4f3f1 !important;
    color: #374151 !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.22s ease, visibility 0.22s ease;
    z-index: 4;
}

.eipd-toolrail-scroll-btn:hover,
.eipd-toolrail-scroll-btn:focus-visible {
    background: #f3ede3 !important;
    color: #5a4a3a !important;
    outline: none;
}

.eipd-toolrail-scroll-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.eipd-toolrail-scroll-up {
    top: 0;
    transform: translateX(-50%) rotate(90deg);
}

.eipd-toolrail-scroll-down {
    bottom: 0;
    transform: translateX(-50%) rotate(90deg);
}

.eipd-toolrail {
    background: transparent;
    padding: 16px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    flex: 1;
    min-height: 0;
}

.eipd-toolrail::-webkit-scrollbar {
    display: none;
}

.eipd-tool {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    border: 1px solid #d7dbe3 !important;
    border-radius: 8px;
    background: rgba(182, 177, 170, 0.5) !important;
    color: #5a5754 !important;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(44, 52, 66, 0.12);
    transition: all 0.2s ease;
    cursor: pointer;
}

.eipd-tool.is-active {
    border-color: var(--eipd-accent) !important;
    background: var(--eipd-accent) !important;
    color: #ffffff !important;
}

.eipd-tool:hover {
    border-color: var(--eipd-accent) !important;
    background: var(--eipd-accent) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

.eipd-tool-with-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex-shrink: 0;
}

.eipd-radius-input {
    width: 44px;
    height: 22px;
    padding: 0 4px;
    font-size: 13px;
    text-align: center;
    border: 1px solid #d7dbe3;
    border-radius: 4px;
    color: #1f2937;
    background: #ffffff;
    box-sizing: border-box;
}

.eipd-radius-input:focus {
    border-color: var(--eipd-accent);
    box-shadow: 0 0 0 2px rgba(209, 146, 63, 0.18);
}

.eipd-tool-icon svg {
    display: block;
}

.eipd-stage-wrap {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
    position: relative;
}

.eipd-upload-btn {
    margin-left: auto;
    border: 1px solid #5a4a3a;
    background: #5a4a3a;
    color: #fff;
    border-radius: 8px;
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.eipd-stage {
    position: relative;
    flex: 1;
    min-height: 0; /* Changed for responsive */
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    background: #ece9df;
    overflow: hidden;
    touch-action: none;
}

.eipd-ruler {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    background: #f3ede3;
    border-color: #d7dbe3;
}

.eipd-ruler-top,
.eipd-ruler-bottom {
    left: 30px;
    right: 30px;
    height: 30px;
    background-image: repeating-linear-gradient(
        to right,
        rgba(90,74,58,0.58) 0,
        rgba(90,74,58,0.58) 1px,
        transparent 1px,
        transparent 10px,
        rgba(90,74,58,0.44) 10px,
        rgba(90,74,58,0.44) 11px,
        transparent 11px,
        transparent 50px
    );
}

.eipd-ruler-top {
    top: 0;
    border-bottom: 1px solid #d7dbe3;
}

.eipd-ruler-bottom {
    bottom: 0;
    border-top: 1px solid #d7dbe3;
}

.eipd-ruler-left,
.eipd-ruler-right {
    top: 30px;
    bottom: 30px;
    width: 30px;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(90,74,58,0.58) 0,
        rgba(90,74,58,0.58) 1px,
        transparent 1px,
        transparent 10px,
        rgba(90,74,58,0.44) 10px,
        rgba(90,74,58,0.44) 11px,
        transparent 11px,
        transparent 50px
    );
}

.eipd-ruler-left {
    left: 0;
    border-right: 1px solid #d7dbe3;
}

.eipd-ruler-right {
    right: 0;
    border-left: 1px solid #d7dbe3;
}

.eipd-ruler-corner {
    position: absolute;
    z-index: 6;
    width: 30px;
    height: 30px;
    background: #f3ede3;
    pointer-events: none;
}

.eipd-ruler-corner-tl {
    top: 0;
    left: 0;
    border-bottom: 1px solid #d7dbe3;
    border-right: 1px solid #d7dbe3;
}

.eipd-ruler-corner-tr {
    top: 0;
    right: 0;
    border-bottom: 1px solid #d7dbe3;
    border-left: 1px solid #d7dbe3;
}

.eipd-ruler-corner-bl {
    bottom: 0;
    left: 0;
    border-top: 1px solid #d7dbe3;
    border-right: 1px solid #d7dbe3;
}

.eipd-ruler-corner-br {
    bottom: 0;
    right: 0;
    border-top: 1px solid #d7dbe3;
    border-left: 1px solid #d7dbe3;
}

.eipd-konva-host {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
}

.eipd-stage-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    display: none;
}

.eipd-stage-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .03em;
    z-index: 3;
    pointer-events: none;
}

.eipd-start-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    background: rgba(236, 233, 223, 0.88);
    backdrop-filter: blur(1px);
    padding: 20px;
}

.eipd-start-overlay.is-visible {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 16px;
    overflow-y: auto;
}

.eipd-start-card {
    flex: 0 0 280px;
    max-width: 100%;
    min-height: 150px;
    border: 1px solid #d7cfc1;
    border-radius: 12px;
    background: #f8f6ef;
    color: #5a4a3a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px 20px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(44, 52, 66, 0.12);
    box-sizing: border-box;
}

.eipd-start-card strong {
    font-size: 17px;
}

.eipd-start-card span {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.eipd-start-card:hover,
.eipd-start-card:focus-visible {
    border-color: var(--eipd-accent);
    background: #fff8ea;
    outline: none;
}

.eipd-editor-frame.eipd-pseudo-fullscreen,
.eipd-editor-frame:fullscreen,
.eipd-editor-frame:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

html.eipd-pseudo-fullscreen-active,
body.eipd-pseudo-fullscreen-active {
    overflow: hidden !important;
}

.eipd-editor-frame.eipd-pseudo-fullscreen .eipd-editor-body,
.eipd-editor-frame:fullscreen .eipd-editor-body,
.eipd-editor-frame:-webkit-full-screen .eipd-editor-body {
    flex: 1;
    min-height: 0;
    height: auto !important;
}








/* Tablet/Mobile Fullscreen Material Modal Styles */
@media (max-width: 1240px) {
    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-mat-modal-toggle,
    .eipd-editor-frame:fullscreen .eipd-mat-modal-toggle,
    .eipd-editor-frame:-webkit-full-screen .eipd-mat-modal-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 12px;
        height: 44px;
        border: 1px solid #d7dbe3;
        background: #f8fafc;
        color: #475569;
        font-weight: 600;
        font-size: 13px;
        border-radius: 8px;
        cursor: pointer;
        width: 130px;
        flex: 0 0 auto;
    }

    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-sticky-inner,
    .eipd-editor-frame:fullscreen .eipd-sticky-inner,
    .eipd-editor-frame:-webkit-full-screen .eipd-sticky-inner {
        justify-content: space-between;
        /* Hogy a modal alatt mindig a sticky legyen a fő takaró! */
        z-index: 9999 !important;
    }
    
    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-sticky-right,
    .eipd-editor-frame:fullscreen .eipd-sticky-right,
    .eipd-editor-frame:-webkit-full-screen .eipd-sticky-right {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Modalizált anyagválasztó fullscreen alatt */
    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-side-card--materials,
    .eipd-editor-frame:fullscreen .eipd-side-card--materials,
    .eipd-editor-frame:-webkit-full-screen .eipd-side-card--materials {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0 !important; /* Teljesen lehúzva, a Sticky footer fogja rátakarni az alját! */
        margin: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
        z-index: 9998 !important; /* DIRECTLY UNDER STICKY */
        max-height: 70%;
        background: #ffffff;
        transform: translateY(120%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex !important;
        flex-direction: column;
        padding-bottom: calc(var(--eipd-mobile-sticky-offset, 80px) + 20px) !important; /* Itt toldjuk meg, hogy fel lehessen görgetni a tartalom alját a sticky fölé! */
    }

    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-side-card--materials [data-eipd-material-panel-root],
    .eipd-editor-frame:fullscreen .eipd-side-card--materials [data-eipd-material-panel-root],
    .eipd-editor-frame:-webkit-full-screen .eipd-side-card--materials [data-eipd-material-panel-root] {
        overflow-y: auto !important;
        flex: 1 1 auto;
    }

    .eipd-editor-frame.is-mat-modal-open .eipd-side-card--materials {
        transform: translateY(0) !important;
    }

    
    /* Fade-out a görgető alján, a sticky footer felett */
    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-side-card--materials::before,
    .eipd-editor-frame:fullscreen .eipd-side-card--materials::before,
    .eipd-editor-frame:-webkit-full-screen .eipd-side-card--materials::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--eipd-mobile-sticky-offset, 80px) + 50px);
        background: linear-gradient(to top, rgba(255,255,255,1) calc(var(--eipd-mobile-sticky-offset, 80px)), rgba(255,255,255,0) 100%);
        pointer-events: none;
        z-index: 100;
        border-radius: 0 0 16px 16px;
    }

    /* Backdrop sötétítés */
    .eipd-editor-frame.eipd-pseudo-fullscreen::after,
    .eipd-editor-frame:fullscreen::after,
    .eipd-editor-frame:-webkit-full-screen::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9997 !important; /* Modal ALATT */
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .eipd-editor-frame.is-mat-modal-open::after {
        opacity: 1;
        pointer-events: auto;
    }
}

/* In fullscreen, remove tablet stage constraints */
.eipd-editor-frame.eipd-pseudo-fullscreen .eipd-stage-wrap,
.eipd-editor-frame:fullscreen .eipd-stage-wrap,
.eipd-editor-frame:-webkit-full-screen .eipd-stage-wrap {
    max-height: none;
}

.eipd-editor-frame.eipd-pseudo-fullscreen .eipd-stage,
.eipd-editor-frame:fullscreen .eipd-stage,
.eipd-editor-frame:-webkit-full-screen .eipd-stage {
    min-height: 0;
}

.eipd-editor-frame:fullscreen::backdrop,
.eipd-editor-frame:-webkit-full-screen {
    background: #ece9df;
}

.eipd-stage-status {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 12px;
    color: #475569;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #d9e0eb;
    border-radius: 6px;
    padding: 4px 8px;
    z-index: 3;
}

.eipd-dxf-overlay {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: none;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(1px);
    pointer-events: auto;
}

.eipd-dxf-overlay.is-active {
    display: block;
}

.eipd-drop-overlay {
    position: absolute;
    inset: 0;
    z-index: 85;
    display: none;
    background: rgba(242, 140, 31, 0.18);
    border: 2px dashed rgba(242, 140, 31, 0.85);
    box-sizing: border-box;
    pointer-events: none;
}

.eipd-drop-overlay.is-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eipd-drop-overlay-text {
    font-size: 40px;
    font-weight: 600;
    color: #6b6b6b;
    letter-spacing: 0.01em;
    text-align: center;
    line-height: 1.25;
}

.eipd-dxf-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 280px;
    max-width: 90%;
    background: #ffffff;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(44, 52, 66, 0.18);
    padding: 14px 16px;
}

.eipd-dxf-progress-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.eipd-dxf-progress-stage {
    margin-top: 6px;
    font-size: 12px;
    color: #4b5563;
}

.eipd-dxf-progress-track {
    margin-top: 8px;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--eipd-border);
    overflow: hidden;
}

.eipd-dxf-progress-fill {
    width: 0;
    height: 100%;
    background: var(--eipd-accent);
    transition: width 120ms linear;
}

.eipd-dxf-progress-percent {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
}

.eipd-zoom-controls {
    margin-left: auto;
    display: inline-flex;
    gap: 6px;
}

.eipd-mini-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #d6dde8;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}

.eipd-right-panel {
    border-left: 1px solid var(--eipd-border);
    background: #ffffff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.eipd-side-card {
    border: 1px solid #e1e6ef;
    border-radius: 10px;
    background: #fdfefe;
    padding: 10px;
}

.eipd-side-card--materials {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.eipd-warning-bar {
    flex: 0 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-radius: 10px;
    overflow: hidden;
}

.eipd-warning-bar:empty {
    display: none !important;
}

.eipd-warning-bar .eipd-warning {
    border-radius: 0;
    margin: 0;
}

.eipd-warning-bar .eipd-warning:first-child {
    border-radius: 10px 10px 0 0;
}

.eipd-warning-bar .eipd-warning:last-child {
    border-radius: 0 0 10px 10px;
}

.eipd-warning-bar .eipd-warning:only-child {
    border-radius: 10px;
}

@keyframes eipd-warning-bar-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.eipd-warning-bar.is-active {
    animation: eipd-warning-bar-slide-up 280ms ease-out;
}

.eipd-side-card--materials [data-eipd-material-panel-root] {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.eipd-material-qty-row {
    margin-top: 0;
}

.eipd-material-qty-row[hidden] {
    display: none !important;
}

.eipd-material-loading {
    min-height: 132px;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.eipd-material-loading-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #6b7c93;
    background: rgba(107, 124, 147, 0.08);
    box-shadow: inset 0 0 0 1px rgba(107, 124, 147, 0.14);
}

.eipd-qty-input--material {
    height: 100%;
    min-height: 0;
    padding: 0 24px 0 14px !important;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    border: none !important;
    border-radius: 8px;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    text-align: center;
    direction: ltr;
    background: transparent !important;
    box-shadow: none !important;
}
.eipd-qty-input--material:focus {
    outline: none;
    border-color: transparent;
    box-shadow: none;
}

.eipd-qty-input--material::-webkit-outer-spin-button,
.eipd-qty-input--material::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.eipd-qty-input--material[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.eipd-side-card h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.eipd-side-card p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.eipd-shell button,
.eipd-shell input,
.eipd-shell textarea {
    font: inherit;
}

.eipd-shell button {
    -webkit-appearance: none;
    appearance: none;
}

.eipd-sticky-inner {
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
}

.eipd-sticky-inner .eipd-cart-btn {
    margin-left: auto;
    border-color: var(--eipd-primary) !important;
    background: var(--eipd-primary) !important;
    color: #ffffff !important;
}

.eipd-sticky-inner .eipd-cart-btn:hover,
.eipd-sticky-inner .eipd-cart-btn:focus-visible {
    border-color: var(--eipd-primary-hover) !important;
    background: var(--eipd-primary-hover) !important;
    color: #ffffff !important;
    outline: none;
}

.eipd-price-toggle {
    border: none !important;
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    cursor: pointer;
    transition: filter 220ms ease, opacity 220ms ease;
}

.eipd-price-toggle.is-dirty {
    filter: blur(4px);
    opacity: 0.72;
}

.eipd-price-toggle:hover .eipd-price-value,
.eipd-price-toggle:focus-visible .eipd-price-value {
    color: var(--eipd-primary-hover) !important;
}

.eipd-price-toggle:focus-visible {
    outline: 2px solid rgba(217, 119, 6, 0.24);
    outline-offset: 3px;
    border-radius: 8px;
}

.eipd-price-value {
    font-size: 22px;
    line-height: 1.1;
    color: #494949;
}

.eipd-price-secondary {
    font-size: 13px;
    line-height: 1.1;
    color: #64748b;
}

.eipd-material-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
}

.eipd-material-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eipd-material-card-icon {
    height: 15px;
    width: 15px;
    min-width: 15px;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.eipd-material-card-label {
    display: inline-block;
}

.eipd-material-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eipd-material-row-title,
.eipd-qty-label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.eipd-material-options,
.eipd-aux-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eipd-material-options--qty {
    align-items: stretch;
}

.eipd-qty-control {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    width: 70px;
    min-width: 70px;
    height: 30px;
    border: none;
    border-radius: 10px;
    background: #e9eff6;
    box-shadow: none;
    overflow: hidden;
}

.eipd-qty-control::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.55);
    pointer-events: none;
}

.eipd-qty-control:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.16);
}

.eipd-qty-stepper {
    position: absolute;
    top: 3px;
    right: 3px;
    bottom: 3px;
    display: flex;
    flex-direction: column;
    width: 18px;
    gap: 2px;
    background: #ffffff;
    border-radius: 7px;
}

.eipd-qty-step {
    flex: 1 1 50%;
    border: none !important;
    border-radius: 6px;
    background: #ffffff !important;
    color: #475569 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    min-height: 0;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.eipd-qty-step:hover,
.eipd-qty-step:focus-visible {
    background: #ffffff !important;
    color: #1e293b !important;
    outline: none;
}

.eipd-qty-step:active {
    transform: scale(0.96);
}

.eipd-qty-step::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.eipd-qty-step--up::before {
    border-bottom: 6px solid currentColor;
}

.eipd-qty-step--down::before {
    border-top: 6px solid currentColor;
}

.eipd-material-card,
.eipd-option-btn,
.eipd-delivery-btn,
.eipd-qty-input {
    border: 1px solid #d7dbe3 !important;
    background: #fff !important;
    color: #243041 !important;
    border-radius: 10px;
    box-shadow: none !important;
}

.eipd-material-card,
.eipd-option-btn,
.eipd-delivery-btn {
    min-height: 25px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
    line-height: 1.15;
}

.eipd-material-card:hover,
.eipd-option-btn:hover,
.eipd-delivery-btn:hover,
.eipd-material-card:focus-visible,
.eipd-option-btn:focus-visible,
.eipd-delivery-btn:focus-visible {
    border-color: #c38d3e !important;
    background: #fff8ec !important;
    color: #5a4a3a !important;
    outline: none;
}

.eipd-material-card.is-selected,
.eipd-option-btn.is-selected,
.eipd-delivery-btn.is-selected {
    border-color: #c38d3e !important;
    background: #f3ede3 !important;
    color: #5a4a3a !important;
}

.eipd-option-btn.is-backorder,
.eipd-material-card.is-backorder {
    border-style: dashed !important;
}

.eipd-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.eipd-warning {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #ebd8a4;
    background: #fff8df;
    color: #6a4f13;
}

.eipd-warning--engraving {
    border-color: #efc3c3;
    background: #fff1f1;
    color: #8a2d2d;
}

.eipd-warning--no-cutting {
    border-color: #ebd8a4;
    background: #fff8df;
    color: #6a4f13;
}

.eipd-warning--oversize {
    border-color: #efc3c3;
    background: #fff1f1;
    color: #8a2d2d;
}

.eipd-warning--mandatory {
    border-color: #ebd8a4;
    background: #fff8df;
    color: #6a4f13;
}

.eipd-warning-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eipd-warning-bar:empty {
    display: none;
}

.eipd-warning-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
}

.eipd-warning-text,
.eipd-aux-help,
.eipd-cart-help {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.eipd-checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    color: #475569;
}

.eipd-checkbox input {
    margin-top: 2px;
}

.eipd-checkbox-text {
    line-height: 1.45;
}

.eipd-aux-card {
    border: 1px solid #e1e6ef;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eipd-aux-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.eipd-aux-head-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.eipd-aux-title {
    font-size: 12px;
    color: #1f2937;
}

.eipd-aux-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 8px;
    min-height: 22px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.eipd-aux-badge.is-pre {
    background: #e6f6f0;
    color: #166534;
}

.eipd-aux-badge.is-post {
    background: #eef2ff;
    color: #3730a3;
}

.eipd-aux-toggle {
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #d7dbe3 !important;
    background: #ffffff !important;
    color: #5a4a3a !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.eipd-aux-toggle:hover,
.eipd-aux-toggle:focus-visible {
    border-color: #c38d3e !important;
    background: #fff8ec !important;
    outline: none;
}

.eipd-notes {
    min-height: 92px;
    width: 100%;
    resize: vertical;
    border: 1px solid #d7dbe3;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: #243041;
}

.eipd-notes.is-max {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.eipd-notes-counter {
    text-align: right;
    font-size: 11px;
    color: #64748b;
}

.eipd-notes-counter.is-max {
    color: #dc2626;
}

.eipd-cart-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eipd-qty-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eipd-qty-input {
    padding: 0 10px;
    width: 100%;
}

.eipd-qty-input--material {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.eipd-upload-btn:disabled,
.eipd-cart-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.eipd-hidden-feature {
    display: none !important;
}

.eipd-mat-modal-toggle {
    display: none;
}

.eipd-sticky-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1;
}

@media (max-width: 1240px) {
    .eipd-editor-body {
        grid-template-columns: 78px 1fr;
        min-height: auto;
        height: auto !important;
    }

    .eipd-topbar-left {
        width: 78px;
    }

    .eipd-toolrail-scroll-wrapper {
        width: 78px;
        min-width: 78px;
        max-width: 78px;
        min-height: 0;
        height: calc(100dvh - var(--eipd-editor-topbar-height, 0px) - var(--eipd-mobile-sticky-offset, 72px));
        max-height: calc(100dvh - var(--eipd-editor-topbar-height, 0px) - var(--eipd-mobile-sticky-offset, 72px));
    }

    .eipd-stage-wrap {
        height: calc(100dvh - var(--eipd-editor-topbar-height, 0px) - var(--eipd-mobile-sticky-offset, 72px));
        min-height: calc(100dvh - var(--eipd-editor-topbar-height, 0px) - var(--eipd-mobile-sticky-offset, 72px));
        max-height: none;
    }

    .eipd-stage {
        min-height: 100%;
    }

    .eipd-right-panel {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid var(--eipd-border);
        padding-bottom: calc(var(--eipd-mobile-sticky-offset, 72px) + 10px);
    }

    .eipd-side-card--materials {
        flex: 0 0 auto;
        overflow: visible;
    }

    .eipd-side-card--materials [data-eipd-material-panel-root] {
        flex: 0 0 auto;
        overflow: visible;
        padding-right: 0;
    }

                /* ── Sticky footer: price + cart (tablet) ── */
    .eipd-sticky-inner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
        padding: 10px 16px;
        background: #fff;
    }

    .eipd-sticky-inner .eipd-cart-btn {
        min-height: 44px;
    }
    
    /* MODAL MÓD: Ha FULLSCREEN és az Anyag gomb látszik */
    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-sticky-inner,
    .eipd-editor-frame:fullscreen .eipd-sticky-inner,
    .eipd-editor-frame:-webkit-full-screen .eipd-sticky-inner {
        justify-content: space-between;
    }

    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-sticky-inner .eipd-cart-btn,
    .eipd-editor-frame:fullscreen .eipd-sticky-inner .eipd-cart-btn,
    .eipd-editor-frame:-webkit-full-screen .eipd-sticky-inner .eipd-cart-btn {
        margin-left: 0;
    }

    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-sticky-right,
    .eipd-editor-frame:fullscreen .eipd-sticky-right,
    .eipd-editor-frame:-webkit-full-screen .eipd-sticky-right {
        flex: 0 0 auto;
        gap: 30px;
        justify-content: flex-end;
    }

    .eipd-editor-frame.eipd-pseudo-fullscreen .eipd-price-toggle,
    .eipd-editor-frame:fullscreen .eipd-price-toggle,
    .eipd-editor-frame:-webkit-full-screen .eipd-price-toggle {
        align-items: flex-end;
        text-align: right;
    }
}

@media (max-width: 1240px) {
    /* ── Warning bar: fixed above sticky footer on tablet/mobile ── */
    .eipd-warning-bar {
        position: fixed;
        bottom: calc(var(--eipd-mobile-sticky-offset, 62px) + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        z-index: 9998;
        border-radius: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    }

    .eipd-warning-bar .eipd-warning,
    .eipd-warning-bar .eipd-warning:first-child,
    .eipd-warning-bar .eipd-warning:last-child,
    .eipd-warning-bar .eipd-warning:only-child {
        border-radius: 0;
    }

    @keyframes eipd-warning-bar-slide-up-tablet {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .eipd-warning-bar.is-active {
        animation: eipd-warning-bar-slide-up-tablet 300ms ease-out;
    }
}

@media (max-width: 768px) {
    /* ── Hide logo on mobile ── */
    .eipd-topbar-left {
        display: none;
    }

    .eipd-editor-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 6px 8px;
    }

    .eipd-topbar-scroll-wrapper {
        width: 100%;
    }

    .eipd-topbar-scroll-wrapper::before {
        left: 24px;
    }

    .eipd-topbar-scroll-wrapper::after {
        right: 24px;
    }

    .eipd-top-actions {
        width: 100%;
    }

    .eipd-topbar-group {
        padding: 4px;
    }

    .eipd-top-icon-btn {
        min-width: 58px;
        max-width: 72px;
    }

    .eipd-top-btn-label {
        min-height: 18px;
        font-size: 9px;
    }

    /* ── Editor body: flex column on mobile ── */
    .eipd-editor-body {
        display: flex;
        flex-direction: column;
        height: auto !important;
        min-height: 0;
    }

    /* ── Toolrail becomes horizontal scrollable row ── */
    .eipd-toolrail-scroll-wrapper {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        float: none;
        height: auto;
        max-height: none;
        flex: 0 0 auto;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--eipd-border);
    }

    .eipd-toolrail-scroll-wrapper::before,
    .eipd-toolrail-scroll-wrapper::after {
        top: 0;
        bottom: 0;
        left: auto;
        right: auto;
        width: 26px;
        height: auto;
    }

    .eipd-toolrail-scroll-wrapper::before {
        left: 26px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 100%);
    }

    .eipd-toolrail-scroll-wrapper::after {
        right: 26px;
        background: linear-gradient(270deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0) 100%);
    }

    .eipd-toolrail-scroll-btn {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 26px;
        min-width: 26px;
        max-width: 26px;
        height: auto;
        min-height: unset;
        align-self: stretch;
        transform: none;
    }

    .eipd-toolrail-scroll-up {
        transform: none;
    }

    .eipd-toolrail-scroll-down {
        transform: none;
    }

    .eipd-toolrail {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px;
        gap: 8px;
        min-height: 60px;
        align-items: center;
    }

    .eipd-tool {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
    }

    .eipd-tool-with-input {
        flex-direction: row;
        align-items: center;
        gap: 4px;
        width: auto;
    }

    .eipd-radius-input {
        width: 38px;
        height: 40px;
    }

    .eipd-stage-wrap {
        padding: 10px;
        margin-left: 0;
        flex: 0 0 auto;
        min-height: 0;
        height: var(--eipd-mobile-stage-height, calc(100dvh - 240px));
        height: var(--eipd-mobile-stage-height, calc(100vh - 240px));
    }

    .eipd-stage {
        min-height: 0;
        height: 100%;
    }

    .eipd-upload-inline {
        flex-wrap: wrap;
    }

    .eipd-upload-btn {
        margin-left: 0;
    }

        /* ── Sticky footer: price + cart ── */
    .eipd-sticky-inner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
    }

    .eipd-sticky-inner .eipd-cart-btn {
        min-height: 44px;
    }

    /* ── Push right panel bottom so it doesn't overlap sticky ── */
    .eipd-right-panel {
        flex: 0 0 auto;
        padding-bottom: calc(var(--eipd-mobile-sticky-offset, 72px) + env(safe-area-inset-bottom, 0px));
    }

}

/* ── Text Modal (EPD stílus) ── */
.eipd-text-modal {
    position: absolute;
    top: 58px;
    left: 12px;
    z-index: 50;
    width: 300px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 70px);
    border: 1px solid #c0c0c0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
}

.eipd-text-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid var(--eipd-border);
    background: linear-gradient(90deg, rgba(209, 146, 63, 0.95), rgba(209, 146, 63, 0.65));
    cursor: grab;
    user-select: none;
}

.eipd-text-modal-title {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    margin: 0;
}

.eipd-text-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px;
    overflow: auto;
    max-height: calc(100% - 38px);
}

.eipd-tm-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.eipd-tm-label {
    font-size: 12px;
    color: #5a5754;
}

.eipd-tm-input {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--eipd-border);
    background: rgba(182, 177, 170, 0.22);
    color: #5a5754;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.eipd-tm-input:focus {
    border-color: var(--eipd-accent);
}

input.eipd-tm-input,
select.eipd-tm-input {
    height: 34px;
}

textarea.eipd-tm-input {
    min-height: 52px;
    resize: vertical;
    line-height: 1.25;
    font-family: inherit;
}

.eipd-tm-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
}

.eipd-tm-row .eipd-tm-field {
    flex: 1 1 0;
    min-width: 0;
}

.eipd-tm-align-field {
    flex-basis: 100%;
}

.eipd-tm-align-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.eipd-tm-align-btn {
    width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--eipd-border);
    border-radius: 8px;
    background: rgba(182, 177, 170, 0.5);
    color: #5a5754;
    cursor: pointer;
    transition: background 0.15s;
}

.eipd-text-modal .eipd-tm-align-btn:not([aria-pressed="true"]),
.eipd-text-modal .eipd-tm-align-btn:not([aria-pressed="true"]):hover,
.eipd-text-modal .eipd-tm-align-btn:not([aria-pressed="true"]):focus,
.eipd-text-modal .eipd-tm-align-btn:not([aria-pressed="true"]):active {
    background: rgba(182, 177, 170, 0.5) !important;
    border-color: var(--eipd-border) !important;
    color: #5a5754 !important;
}

.eipd-tm-align-btn[aria-pressed="true"] {
    background: var(--eipd-accent);
    border-color: var(--eipd-accent);
    color: #fff;
}

.eipd-tm-align-btn:focus-visible {
    outline: 2px solid var(--eipd-accent);
    outline-offset: 2px;
}

/* ── Select Properties Modal (same style as Text Modal) ── */
.eipd-select-props-modal {
    position: absolute;
    top: 58px;
    left: 12px;
    z-index: 50;
    width: 300px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 70px);
    border: 1px solid #c0c0c0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
}

.eipd-select-props-modal .eipd-text-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid var(--eipd-border);
    background: linear-gradient(90deg, rgba(209, 146, 63, 0.95), rgba(209, 146, 63, 0.65));
    cursor: grab;
    user-select: none;
}

.eipd-select-props-modal .eipd-text-modal-title {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    margin: 0;
}

.eipd-select-props-modal .eipd-text-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px;
    overflow: auto;
    max-height: calc(100% - 38px);
}

.eipd-persistence-overlay[hidden],
.eipd-persistence-status[hidden] {
    display: none !important;
}

.eipd-persistence-overlay {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(34, 25, 17, 0.28);
    backdrop-filter: blur(3px);
}

.eipd-persistence-modal {
    width: min(420px, calc(100% - 24px));
    max-height: min(78vh, 760px);
    border: 1px solid #c0c0c0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(44, 34, 22, 0.18);
    backdrop-filter: blur(2px);
    overflow: hidden;
}

.eipd-persistence-modal--wide {
    width: min(920px, calc(100% - 24px));
}

.eipd-persistence-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--eipd-border);
    background: linear-gradient(90deg, rgba(209, 146, 63, 0.96), rgba(209, 146, 63, 0.68));
}

.eipd-persistence-modal-title {
    margin: 0;
    color: #fff;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.2;
}

.eipd-persistence-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    background: rgba(95, 99, 105, 0.16) !important;
    color: #ffffff !important;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.eipd-persistence-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 12px;
    overflow: auto;
}

.eipd-persistence-usage,
.eipd-persistence-copy {
    margin: 0;
    color: #6d5c45;
    font-size: 13px;
    line-height: 1.45;
}

.eipd-persistence-copy--secondary {
    margin-top: 8px;
    color: #8a7d6b;
    font-size: 12px;
}

.eipd-persistence-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eipd-persistence-label {
    color: #5f513e;
    font-size: 12px;
    font-weight: 600;
}

.eipd-persistence-input {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--eipd-border);
    border-radius: 8px;
    background: rgba(182, 177, 170, 0.22);
    color: #5a5754;
    font-size: 12px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.eipd-persistence-input:focus {
    outline: none;
    border-color: var(--eipd-accent);
}

.eipd-persistence-status {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 244, 227, 0.95);
    color: #744f13;
    font-size: 12px;
}

.eipd-persistence-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 12px 12px;
}

.eipd-persistence-modal-actions--split {
    justify-content: space-between;
}

.eipd-persistence-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 104px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #bcc4cd !important;
    border-radius: 8px;
    background: #eef1f4 !important;
    color: #374151 !important;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none !important;
}

.eipd-persistence-btn:disabled,
.eipd-persistence-close:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.eipd-persistence-btn--secondary {
    background: #eef1f4 !important;
    color: #374151 !important;
}

.eipd-persistence-btn--ghost {
    background: #eef1f4 !important;
    color: #374151 !important;
}

.eipd-persistence-btn:hover,
.eipd-persistence-btn:focus-visible,
.eipd-persistence-close:hover,
.eipd-persistence-close:focus-visible {
    border-color: var(--eipd-accent) !important;
    background: #f3ede3 !important;
    color: #5a4a3a !important;
    outline: none;
}

.eipd-persistence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.eipd-persistence-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(190, 166, 130, 0.42);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(57, 43, 27, 0.08);
}

.eipd-persistence-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(185, 165, 138, 0.35);
    background: linear-gradient(135deg, rgba(240, 233, 222, 0.92), rgba(252, 248, 241, 0.98));
}

.eipd-persistence-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eipd-persistence-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eipd-persistence-card-title,
.eipd-persistence-card .eipd-persistence-card-title {
    margin: 0;
    color: #433628;
    font-size: 16px !important;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
}

.eipd-persistence-card-date {
    color: #7a6852;
    font-size: 12px;
}

.eipd-persistence-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.eipd-persistence-card-actions .eipd-persistence-btn {
    min-width: 0;
    height: 34px;
    font-size: 12px;
}

.eipd-persistence-card-actions .eipd-persistence-btn:first-child {
    flex: 1 1 auto;
}

.eipd-persistence-btn--icon {
    flex: 0 0 34px !important;
    width: 34px;
    min-width: 34px;
    padding: 0;
    margin-left: auto;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.eipd-persistence-btn--icon svg {
    pointer-events: none;
}

.eipd-toast-stack {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    width: max-content;
    max-width: none;
    pointer-events: none;
}

.eipd-toast-stack--global {
    position: fixed;
}

.eipd-notification {
    width: fit-content;
    max-width: none;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #18a957;
    box-shadow: 0 10px 30px rgba(44, 34, 22, 0.16);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: auto;
}

.eipd-notification--success {
    background: #18a957;
    border-color: rgba(24, 169, 87, 0.96);
    color: #ffffff;
}

.eipd-notification--info {
    background: #18a957;
    border-color: rgba(24, 169, 87, 0.96);
    color: #ffffff;
}

.eipd-notification--error {
    background: #b94141;
    border-color: rgba(185, 65, 65, 0.92);
    color: #ffffff;
}

.eipd-notification--fade {
    opacity: 0;
    transform: translateY(8px);
}

@media (max-width: 767px) {
    .eipd-persistence-overlay {
        padding: 12px;
    }

    .eipd-persistence-modal,
    .eipd-persistence-modal--wide {
        width: 100%;
        max-height: min(88vh, 100dvh - 24px);
    }

    .eipd-persistence-grid {
        grid-template-columns: 1fr;
    }

    .eipd-persistence-modal-actions,
    .eipd-persistence-modal-actions--split {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .eipd-persistence-modal-actions .eipd-persistence-btn {
        flex: 1 1 100%;
    }

    .eipd-persistence-btn--icon {
        flex: 0 0 40px !important;
        width: 40px;
        min-width: 40px;
    }
}

.eipd-rotate-angle-badge {
    position: absolute;
    z-index: 70;
    transform: translateY(-50%);
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(209, 146, 63, 0.95);
    background: rgba(255, 255, 255, 0.96);
    color: #5a4a3a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.eipd-resize-dim-badge {
    position: absolute;
    z-index: 69;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(209, 146, 63, 0.95);
    background: rgba(255, 255, 255, 0.96);
    color: #5a4a3a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

/* ── Image Modal (Képszerkesztő) ── */
.eipd-image-modal {
    right: 12px;
    left: auto;
    top: 58px;
}

.eipd-image-modal-body {
    padding: 8px 10px;
}

/* Prevent dimension/rotation rows and vectorize block from shrinking */
.eipd-image-modal-body > .eipd-row,
.eipd-image-modal-body > .eipd-field {
    flex-shrink: 0;
}

.eipd-image-modal .eipd-mini-btn,
.eipd-image-modal .eipd-image-modal-close-btn {
    background: var(--eipd-border) !important;
    border: 1px solid #cfd4dc !important;
    color: #4b5563 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    text-align: center !important;
}

.eipd-image-modal .eipd-mini-btn:hover,
.eipd-image-modal .eipd-image-modal-close-btn:hover {
    background: #d8dde5 !important;
    border-color: #bcc3ce !important;
}

.eipd-image-modal .eipd-image-modal-close-btn {
    width: 26px;
    height: 26px;
    padding: 0 !important;
    border-radius: 6px;
    margin-left: auto;
    cursor: pointer;
}

.eipd-image-modal .eipd-mini-btn svg,
.eipd-image-modal .eipd-image-modal-close-btn svg {
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

/* ── Shared field / row styles (Image + pipeline) ── */
.eipd-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 0;
    min-width: 0;
}

.eipd-field-label {
    font-size: 11px;
    color: #5a5754;
    white-space: nowrap;
}

.eipd-field-input {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--eipd-border);
    background: rgba(182, 177, 170, 0.18);
    color: #5a5754;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.eipd-field-input:focus {
    border-color: var(--eipd-accent);
}

input.eipd-field-input,
select.eipd-field-input {
    height: 30px;
}

.eipd-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: flex-end;
    width: 100%;
}

/* Lock button alignment in transform row */
.eipd-image-modal .eipd-row > .eipd-mini-btn {
    flex: 0 0 auto;
    margin-bottom: 1px;
}

/* ── Pipeline Steps ── */
.eipd-pipeline-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}

.eipd-pipeline-step {
    border: 1px solid var(--eipd-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
}

.eipd-pipeline-step-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background: rgba(182, 177, 170, 0.12);
    border-bottom: 1px solid #ececec;
}

.eipd-pipeline-step-handle {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1;
    user-select: none;
    flex: 0 0 auto;
}

.eipd-pipeline-step-title {
    flex: 1 1 auto;
    font-size: 11px;
    font-weight: 600;
    color: #5a5754;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eipd-pipeline-step-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}

.eipd-pipeline-step-controls input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: var(--eipd-accent);
}

.eipd-pipeline-step-controls .eipd-mini-btn,
.eipd-pipeline-step-header .eipd-mini-btn {
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 1;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0;
    background: var(--eipd-border) !important;
    border: 1px solid #cfd4dc !important;
    color: #4b5563 !important;
    border-radius: 4px;
    cursor: pointer;
}

.eipd-pipeline-step-controls .eipd-mini-btn:hover {
    background: #d8dde5 !important;
    border-color: #bcc3ce !important;
}

.eipd-pipeline-step-controls .eipd-mini-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.eipd-pipeline-step-controls .eipd-mini-btn svg {
    display: block;
    pointer-events: none;
}

.eipd-pipeline-step-params {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eipd-pipeline-step-params input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 4px;
    cursor: pointer;
    accent-color: var(--eipd-accent);
}

.eipd-pipeline-step-params input[type="number"] {
    width: 52px;
    flex: 0 0 52px;
}

/* ── Vectorize Block ── */
.eipd-vectorize-block {
    border: 1px solid var(--eipd-accent);
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 6px;
    background: #fdf8f0;
    flex-shrink: 0;
}

.eipd-vectorize-block .eipd-pipeline-step-header {
    gap: 4px;
}

.eipd-vectorize-block .eipd-pipeline-step-title {
    font-weight: 600;
    color: #b47d2e;
}

.eipd-vectorize-params {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
    border-top: 1px solid #e8dcc8;
    margin-top: 6px;
}

.eipd-vectorize-params .eipd-field {
    margin: 0;
}

.eipd-vectorize-params .eipd-field-label {
    font-size: 11px;
    color: #7c6f5d;
    margin-bottom: 1px;
}

.eipd-vectorize-params .eipd-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.eipd-vectorize-params input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 4px;
    cursor: pointer;
    accent-color: var(--eipd-accent);
}

.eipd-vectorize-params input[type="number"] {
    width: 52px;
    flex: 0 0 52px;
}

.eipd-vectorize-block .eipd-mini-btn[aria-pressed="true"] {
    background: var(--eipd-accent) !important;
    color: #fff !important;
    border-color: #b47d2e !important;
}

/* ── Image Delete Button ── */
.eipd-image-delete-btn {
    width: auto;
    padding: 4px 10px;
    font-size: 12px;
    color: #4b5563 !important;
    border-color: #cfd4dc !important;
    background: var(--eipd-border) !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.eipd-image-delete-btn:hover {
    background: #d8dde5 !important;
    border-color: #bcc3ce !important;
}

/* ── Select dropdown theme override ── */
.eipd-image-modal select.eipd-field-input,
.eipd-image-modal select {
    background: rgba(182, 177, 170, 0.18) !important;
    border: 1px solid var(--eipd-border) !important;
    color: #5a5754 !important;
    border-radius: 6px;
    font-size: 12px;
    padding: 4px 6px;
    outline: none;
    appearance: auto;
    -webkit-appearance: auto;
}

.eipd-image-modal select.eipd-field-input:focus,
.eipd-image-modal select:focus {
    border-color: var(--eipd-accent) !important;
}

.eipd-image-modal select.eipd-field-input option,
.eipd-image-modal select option {
    background: #fff;
    color: #5a5754;
}

.eipd-image-modal select.eipd-field-input option:checked,
.eipd-image-modal select option:checked {
    background: var(--eipd-accent);
    color: #fff;
}

/* EIPD Visual Polish */
@keyframes eipd-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes eipd-text-sharpen {
    0% {
        filter: blur(6px);
        opacity: 0.42;
        letter-spacing: 0.08em;
        transform: translateY(0.5px) scale(0.985);
    }
    65% {
        opacity: 1;
    }
    100% {
        filter: blur(0);
        opacity: 1;
        letter-spacing: 0;
        transform: translateY(0) scale(1);
    }
}

.eipd-loading-spinner {
    animation: eipd-spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

.eipd-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    white-space: nowrap;
    transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.eipd-cart-btn-label {
    display: inline-block;
    will-change: filter, opacity, transform, letter-spacing;
}

.eipd-cart-btn-label--sharpen {
    animation: eipd-text-sharpen 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eipd-cart-btn-spinner {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.eipd-sticky-inner .eipd-cart-btn:disabled {
    background: var(--eipd-disabled) !important;
    border-color: var(--eipd-disabled) !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.eipd-radius-input {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
}

.eipd-radius-input::-webkit-outer-spin-button,
.eipd-radius-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.eipd-radius-input[type="number"] {
    -moz-appearance: textfield;
}

/* =============================================================================
   FLYING CART ANIMATION (Repülő kosár animáció)
   ============================================================================= */

@keyframes cartBump {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

/* =============================================================================
   CONTEXT MENU
   ============================================================================= */
.eipd-context-menu {
    position: absolute;
    z-index: 99999;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #c0c0c0;
    border-radius: 10px;
    padding: 4px 0;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #3a3632;
    backdrop-filter: blur(6px);
    overflow: hidden;
    box-sizing: border-box;
}
.eipd-ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 12px);
    padding: 5px 12px;
    margin: 2px 6px;
    border: 1px solid #d6d9df !important;
    border-radius: 6px;
    background: #eef1f4 !important;
    color: #3a3632 !important;
    font: inherit;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
    box-sizing: border-box;
}
.eipd-ctx-item:hover,
.eipd-ctx-item:focus-visible {
    background: #e2e6eb !important;
    border-color: #c4c9d1 !important;
    color: #2a2420 !important;
    outline: none;
}
.eipd-ctx-item kbd {
    font-size: 11px;
    opacity: 0.45;
    font-family: inherit;
    white-space: nowrap;
}
.eipd-ctx-item:hover kbd { opacity: 0.65; }
.eipd-ctx-separator {
    height: 1px;
    background: #ddd;
    margin: 6px 10px;
}
.eipd-ctx-op-cut span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff0000; margin-right: 6px; vertical-align: middle; }
.eipd-ctx-op-engrave span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #0066ff; margin-right: 6px; vertical-align: middle; }
.eipd-ctx-op-fill span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #00aa00; margin-right: 6px; vertical-align: middle; }
.eipd-ctx-op-both span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff8c00; margin-right: 6px; vertical-align: middle; }
.eipd-ctx-op-none span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; margin-right: 6px; vertical-align: middle; }

/* ── Group selection badge ── */
.eipd-group-badge {
    position: absolute;
    z-index: 99998;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #c0c0c0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    color: #6b7280;
    pointer-events: none;
    backdrop-filter: blur(2px);
}
.eipd-group-badge svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =============================================================================
   KEYBOARD SHORTCUTS MODAL
   ============================================================================= */
.eipd-shortcut-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.eipd-shortcut-modal {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #c0c0c0;
    border-radius: 12px;
    width: 520px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    color: #3a3632;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}
.eipd-shortcut-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid #d9d5d0;
    background: linear-gradient(90deg, rgba(209, 146, 63, 0.95), rgba(209, 146, 63, 0.65));
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.eipd-shortcut-modal-close {
    background: var(--eipd-border) !important;
    border: 1px solid #cfd4dc !important;
    color: #4b5563 !important;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: 6px;
}
.eipd-shortcut-modal-close:hover {
    background: #d8dde5 !important;
    border-color: #bcc3ce !important;
}
.eipd-shortcut-modal-body {
    overflow-y: auto;
    padding: 14px 18px 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 28px;
}
@media (max-width: 540px) {
    .eipd-shortcut-modal-body { grid-template-columns: 1fr; }
}
.eipd-shortcut-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(180, 120, 40, 0.9);
    margin-bottom: 4px;
}
.eipd-shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 13px;
}
.eipd-shortcut-row kbd {
    display: inline-block;
    background: #f0ece7;
    border: 1px solid #d4cfc8;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-family: inherit;
    min-width: 24px;
    text-align: center;
    white-space: nowrap;
    color: #5a5754;
}
.eipd-shortcut-row span {
    color: #5a5754;
}

/* ── Grid Tuning Modal (admin-only) ── */
.eipd-grid-tuning-overlay[hidden] {
    display: none !important;
}
.eipd-grid-tuning-overlay {
    position: absolute;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 40px 12px 24px;
    background: transparent;
    pointer-events: none;
}
.eipd-grid-tuning-modal {
    width: 340px;
    max-height: calc(100% - 48px);
    overflow-y: auto;
    border: 1px solid #c0c0c0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 36px rgba(44, 34, 22, 0.16);
    pointer-events: auto;
}
.eipd-grid-tuning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--eipd-border);
    background: linear-gradient(90deg, rgba(103, 99, 90, 0.92), rgba(103, 99, 90, 0.68));
    border-radius: 10px 10px 0 0;
}
.eipd-grid-tuning-title {
    margin: 0;
    color: #fff;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.2;
}
.eipd-grid-tuning-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    background: rgba(95, 99, 105, 0.16) !important;
    color: #ffffff !important;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px !important;
    line-height: 1 !important;
    box-shadow: none !important;
}
.eipd-grid-tuning-zoom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid #ece7de;
    background: rgba(244, 240, 233, 0.9);
}
.eipd-grid-tuning-zoom-label {
    font-size: 11px;
    color: #6a665f;
}
.eipd-grid-tuning-zoom-value {
    font-size: 12px;
    color: #3f3b35;
    font-variant-numeric: tabular-nums;
}
.eipd-grid-tuning-body {
    padding: 8px 10px 4px;
}
.eipd-grid-tuning-section {
    margin: 0 0 10px;
    padding: 6px 8px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f8f6;
}
.eipd-grid-tuning-section legend {
    font-size: 11px;
    font-weight: 700;
    color: #67635a;
    padding: 0 4px;
}
.eipd-grid-tuning-row {
    display: grid;
    grid-template-columns: 100px 1fr 84px;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}
.eipd-grid-tuning-row label {
    font-size: 11px;
    color: #5a5754;
    white-space: nowrap;
}
.eipd-grid-tuning-slider {
    width: 100%;
    height: 4px;
    accent-color: #67635a;
    cursor: pointer;
}
.eipd-grid-tuning-num {
    width: 84px;
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    background: #fff;
    font-variant-numeric: tabular-nums;
}
.eipd-grid-tuning-footer {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    padding: 6px 10px 10px;
    border-top: 1px solid #eee;
}
.eipd-grid-tuning-btn {
    padding: 4px 10px;
    font-size: 11px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #f0efec;
    color: #5a5754;
    cursor: pointer;
}
.eipd-grid-tuning-btn:hover {
    background: #e6e4e0;
}
.eipd-grid-tuning-btn--primary {
    background: #67635a;
    color: #fff;
    border-color: #67635a;
}
.eipd-grid-tuning-btn--primary:hover {
    background: #5a5754;
}


@keyframes eipd-pulse-warning {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); background-color: rgba(239, 68, 68, 0.08); }
    50%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);  background-color: rgba(239, 68, 68, 0.18); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);  background-color: rgba(239, 68, 68, 0.08); }
}

.eipd-warning-pulse {
    animation: eipd-pulse-warning 0.6s ease-in-out 4;
}


/* ── Általános Modal Görgés és Layout ── */
/* display: flex (NEM !important) – az inline style.display='none' felülírja,
   de style.display='' esetén a CSS flex érvényesül → scroll működik. */
.eipd-text-modal,
.eipd-select-props-modal,
.eipd-grid-tuning-modal,
.eipd-image-modal,
.eipd-shortcut-modal,
.eipd-persistence-modal {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.eipd-text-modal-content,
.eipd-grid-tuning-body,
.eipd-image-modal-body,
.eipd-shortcut-modal-body,
.eipd-persistence-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

