.placeholder-node.is-image-lighting-editing .image-node-render-toolbar,
.image-node-card.is-image-lighting-editing .image-node-render-toolbar {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none !important;
}

body.is-image-lighting-mode {
    cursor: default;
}

body.is-image-lighting-mode .placeholder-node:not(.is-image-lighting-editing) {
    opacity: 0.42;
    filter: saturate(0.7) brightness(0.72);
    pointer-events: none;
    transition: opacity 0.18s ease, filter 0.18s ease;
}

body.is-image-lighting-mode .placeholder-node.is-image-lighting-editing {
    transition: box-shadow 0.18s ease, filter 0.18s ease;
    filter: saturate(1.06);
}

body.is-image-lighting-mode .placeholder-node.is-image-lighting-editing .image-node-card,
body.is-image-lighting-mode .placeholder-node.is-image-lighting-editing .image-node-content-wrap {
    box-shadow: 0 0 0 1px rgba(255, 168, 79, 0.32), 0 18px 48px rgba(0, 0, 0, 0.28);
}

.image-lighting-editor {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 220;
    width: max-content;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    transition: opacity 0.18s ease, transform 0.18s ease, left 0.18s ease, top 0.18s ease;
}

.image-lighting-editor.is-open {
    opacity: 1;
    transform: none;
}

.image-lighting-editor.is-dragging {
    transition: none;
}

.image-lighting-panel {
    width: min(560px, calc(100vw - 48px));
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(31, 32, 34, 0.97);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    pointer-events: auto;
    backdrop-filter: blur(18px) saturate(130%);
    transition: width 0.18s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.image-lighting-editor.is-smart .image-lighting-panel {
    width: min(880px, calc(100vw - 48px));
}

.image-lighting-head,
.image-lighting-foot {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
}

.image-lighting-head {
    cursor: grab;
}

.image-lighting-editor.is-dragging .image-lighting-head {
    cursor: grabbing;
}

.image-lighting-head strong {
    font-size: 13px;
    font-weight: 760;
    letter-spacing: 0;
}

.image-lighting-close,
.image-lighting-reset,
.image-lighting-run,
.image-lighting-view-tabs button,
.image-lighting-direction-grid button,
.image-lighting-preset,
.image-lighting-ref {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.image-lighting-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.58);
}

.image-lighting-close:hover,
.image-lighting-view-tabs button:hover,
.image-lighting-view-tabs button.is-active,
.image-lighting-direction-grid button:hover,
.image-lighting-direction-grid button.is-active,
.image-lighting-preset:hover,
.image-lighting-preset.is-active,
.image-lighting-reset:hover,
.image-lighting-ref:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.image-lighting-close svg,
.image-lighting-reset svg,
.image-lighting-ref svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.image-lighting-body {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
    padding: 10px 16px 10px;
}

.image-lighting-editor.is-smart .image-lighting-body {
    grid-template-columns: 180px minmax(290px, 1fr) 306px;
}

.image-lighting-preview-pane {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.image-lighting-view-tabs {
    height: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.image-lighting-view-tabs button {
    font-size: 12px;
    font-weight: 680;
    color: rgba(255, 255, 255, 0.58);
}

.image-lighting-view-tabs button.is-active {
    color: rgba(255, 255, 255, 0.94);
}

.image-lighting-orb {
    position: relative;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: radial-gradient(circle at 48% 38%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 38%, rgba(0, 0, 0, 0.12) 76%), rgba(18, 19, 21, 0.96);
    cursor: crosshair;
}

.image-lighting-orb::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 42px rgba(255, 255, 255, 0.045);
}

.image-lighting-orb-grid {
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent 49.5%, rgba(255, 255, 255, 0.09) 50%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(255, 255, 255, 0.09) 50%, transparent 50.5%);
}

.image-lighting-preview-canvas {
    position: relative;
    z-index: 2;
    width: 64px;
    max-width: 44%;
    height: auto;
    display: block;
    border-radius: 3px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
    opacity: 0;
    transform: perspective(320px) rotateY(-18deg) rotateX(8deg);
    transition: opacity 0.14s ease, transform 0.18s ease;
}

.image-lighting-editor[data-view-mode="front"] .image-lighting-preview-canvas {
    transform: none;
}

.image-lighting-editor.is-ready .image-lighting-preview-canvas {
    opacity: 1;
}

.image-lighting-handle {
    position: absolute;
    z-index: 4;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: #f8fafc;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 22px rgba(255, 255, 255, 0.42);
    transform: translate(-50%, -50%);
}

.image-lighting-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

.image-lighting-editor.is-ready .image-lighting-loading {
    display: none;
}

.image-lighting-controls {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: start;
}

.image-lighting-smart-panel {
    min-width: 0;
    display: none;
    align-content: start;
    gap: 10px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.image-lighting-editor.is-smart .image-lighting-smart-panel {
    display: grid;
}

.image-lighting-row,
.image-lighting-control,
.image-lighting-color-control,
.image-lighting-switch {
    display: flex;
    align-items: center;
}

.image-lighting-row-main {
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    font-weight: 760;
}

.image-lighting-control,
.image-lighting-color-control {
    gap: 12px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
}

.image-lighting-control {
    display: grid;
    grid-template-columns: 94px 1fr;
}

.image-lighting-control b {
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 650;
}

.image-lighting-control input[type="range"] {
    width: 100%;
    accent-color: #f8fafc;
}

.image-lighting-color-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.image-lighting-color-control i {
    width: 22px;
    height: 22px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: var(--lighting-color, #fff);
    box-shadow: inset 0 0 0 2px rgba(20, 22, 26, 0.66), 0 0 0 3px rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.image-lighting-direction-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.image-lighting-direction-grid button {
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    font-weight: 650;
}

.image-lighting-direction-grid button.is-active {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.image-lighting-switch {
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.image-lighting-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.image-lighting-switch i {
    position: relative;
    width: 28px;
    height: 16px;
    display: inline-block;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.image-lighting-switch i::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    transition: transform 0.14s ease;
}

.image-lighting-switch input:checked + i::after {
    transform: translateX(12px);
}

.image-lighting-rim {
    justify-content: space-between;
}

.image-lighting-smart-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
}

.image-lighting-smart-fields textarea {
    min-height: 52px;
    padding: 10px;
    resize: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(14, 17, 22, 0.82);
    color: rgba(255, 255, 255, 0.88);
    font: 12px/1.5 Manrope, Inter, system-ui, sans-serif;
    outline: none;
}

.image-lighting-ref {
    min-height: 52px;
    display: grid;
    place-items: center;
    gap: 4px;
    overflow: hidden;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    cursor: pointer;
}

.image-lighting-ref span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    background-position: center;
    background-size: cover;
    transition: width 0.16s ease, height 0.16s ease, border-radius 0.16s ease;
}

.image-lighting-ref span i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-style: normal;
}

.image-lighting-ref.is-filled {
    border-style: solid;
    border-color: rgba(255, 168, 79, 0.34);
    color: rgba(255, 213, 164, 0.9);
}

.image-lighting-ref.is-filled span {
    width: 46px;
    height: 30px;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.image-lighting-ref.is-filled span i {
    display: none;
}

.image-lighting-smart-title {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 680;
}

.image-lighting-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
}

.image-lighting-preset {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 10.5px;
    font-weight: 700;
    text-align: left;
}

.image-lighting-preset-thumb {
    aspect-ratio: 1 / 0.58;
    display: block;
    border-radius: 8px;
    background:
        radial-gradient(circle at 62% 34%, var(--lighting-preset-color), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02)),
        #111418;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.image-lighting-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.image-lighting-reset {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    font-weight: 680;
}

.image-lighting-energy {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.image-lighting-energy span {
    color: rgba(255, 168, 79, 0.92);
}

.image-lighting-run {
    height: 34px;
    min-width: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 168, 79, 0.5);
    background: rgba(255, 168, 79, 0.12);
    color: #ffb347;
    font-size: 13px;
    font-weight: 760;
}

.image-lighting-run:hover {
    border-color: rgba(255, 179, 71, 0.76);
    background: rgba(255, 168, 79, 0.18);
    color: #ffd3a1;
}

.image-lighting-editor.is-running .image-lighting-run {
    opacity: 0.7;
    pointer-events: none;
}

body[data-theme="light"] .image-lighting-panel {
    border-color: rgba(18, 24, 35, 0.12);
    background: rgba(252, 253, 255, 0.97);
    color: rgba(20, 25, 34, 0.9);
    box-shadow: 0 24px 68px rgba(20, 25, 34, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .image-lighting-close,
body[data-theme="light"] .image-lighting-control,
body[data-theme="light"] .image-lighting-color-control,
body[data-theme="light"] .image-lighting-switch,
body[data-theme="light"] .image-lighting-reset,
body[data-theme="light"] .image-lighting-energy,
body[data-theme="light"] .image-lighting-smart-title,
body[data-theme="light"] .image-lighting-preset {
    color: rgba(20, 25, 34, 0.68);
}

body[data-theme="light"] .image-lighting-close:hover,
body[data-theme="light"] .image-lighting-view-tabs button:hover,
body[data-theme="light"] .image-lighting-view-tabs button.is-active,
body[data-theme="light"] .image-lighting-direction-grid button:hover,
body[data-theme="light"] .image-lighting-direction-grid button.is-active,
body[data-theme="light"] .image-lighting-preset:hover,
body[data-theme="light"] .image-lighting-preset.is-active,
body[data-theme="light"] .image-lighting-reset:hover,
body[data-theme="light"] .image-lighting-ref:hover {
    background: rgba(18, 24, 35, 0.08);
    color: rgba(18, 24, 35, 0.94);
}

body[data-theme="light"] .image-lighting-orb {
    background: radial-gradient(circle at 48% 38%, rgba(20, 25, 34, 0.1), rgba(20, 25, 34, 0.035) 38%, rgba(20, 25, 34, 0.08) 76%), rgba(246, 248, 251, 0.96);
}

body[data-theme="light"] .image-lighting-color-control i {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78), 0 0 0 3px rgba(18, 24, 35, 0.06);
}

body[data-theme="light"] .image-lighting-run {
    border-color: rgba(217, 119, 6, 0.34);
    background: rgba(217, 119, 6, 0.08);
    color: #b45309;
}

body[data-theme="light"] .image-lighting-run:hover {
    border-color: rgba(217, 119, 6, 0.5);
    background: rgba(217, 119, 6, 0.12);
    color: #92400e;
}

body[data-theme="light"] .image-lighting-smart-fields textarea {
    border-color: rgba(18, 24, 35, 0.13);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(18, 24, 35, 0.9);
}

@media (max-width: 760px) {
    .image-lighting-panel {
        width: min(420px, calc(100vw - 28px));
    }

    .image-lighting-editor.is-smart .image-lighting-panel {
        width: min(420px, calc(100vw - 28px));
    }

    .image-lighting-body {
        grid-template-columns: 1fr;
    }

    .image-lighting-editor.is-smart .image-lighting-body {
        grid-template-columns: 1fr;
    }

    .image-lighting-smart-panel {
        padding-left: 0;
        border-left: 0;
    }

    .image-lighting-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
