.egh-iphone-mockup-shell {
    --egh-scrollbar-track: #08080a;
    --egh-scrollbar-thumb: #b91c1c;
    --egh-scrollbar-thumb-hover: #ef4444;
    --egh-scrollbar-border: #151518;
    width: 100%;
    max-width: 100%;
    scrollbar-color: var(--egh-scrollbar-thumb) var(--egh-scrollbar-track);
    scrollbar-width: thin;
}

html.egh-iphone-mockup-page,
body.egh-iphone-mockup-page {
    margin: 0;
}

body.egh-iphone-mockup-page {
    overflow-x: hidden;
    scrollbar-color: #b91c1c #08080a;
    scrollbar-width: thin;
}

body.egh-iphone-mockup-page::-webkit-scrollbar,
.egh-iphone-mockup-shell ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body.egh-iphone-mockup-page::-webkit-scrollbar-track,
.egh-iphone-mockup-shell ::-webkit-scrollbar-track {
    background: var(--egh-scrollbar-track, #08080a);
}

body.egh-iphone-mockup-page::-webkit-scrollbar-thumb,
.egh-iphone-mockup-shell ::-webkit-scrollbar-thumb {
    background:
        linear-gradient(180deg, var(--egh-scrollbar-thumb-hover, #ef4444), var(--egh-scrollbar-thumb, #b91c1c));
    border: 3px solid var(--egh-scrollbar-track, #08080a);
    border-radius: 999px;
}

body.egh-iphone-mockup-page::-webkit-scrollbar-thumb:hover,
.egh-iphone-mockup-shell ::-webkit-scrollbar-thumb:hover {
    background: var(--egh-scrollbar-thumb-hover, #ef4444);
}

body.egh-iphone-mockup-page::-webkit-scrollbar-corner,
.egh-iphone-mockup-shell ::-webkit-scrollbar-corner {
    background: var(--egh-scrollbar-track, #08080a);
}

body.egh-iphone-mockup-page .egh-iphone-mockup-shell {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

body.egh-iphone-mockup-page .egh-iphone-mockup-workspace {
    width: 100vw;
    height: 100vh;
    min-height: 100vh !important;
    border-radius: 0;
    padding: 0 !important;
}

body.egh-iphone-mockup-page #scrollUp,
body.egh-iphone-mockup-page #back-to-top,
body.egh-iphone-mockup-page #back_to_top,
body.egh-iphone-mockup-page .back-to-top,
body.egh-iphone-mockup-page .back_to_top,
body.egh-iphone-mockup-page .scroll-to-top,
body.egh-iphone-mockup-page .scroll-top,
body.egh-iphone-mockup-page .scrollup,
body.egh-iphone-mockup-page .go-top,
body.egh-iphone-mockup-page .to-top,
body.egh-iphone-mockup-page #ast-scroll-top,
body.egh-iphone-mockup-page #kt-scroll-up,
body.egh-iphone-mockup-page #scroll-top,
body.egh-iphone-mockup-page #scroll-to-top,
body.egh-iphone-mockup-page .ast-scroll-to-top,
body.egh-iphone-mockup-page .ct-back-to-top,
body.egh-iphone-mockup-page .et_pb_scroll_top,
body.egh-iphone-mockup-page .generate-back-to-top,
body.egh-iphone-mockup-page .kadence-scroll-to-top,
body.egh-iphone-mockup-page .scroll-up,
body.egh-iphone-mockup-page .elementor-widget-theme-post-scroll-to-top,
body.egh-iphone-mockup-page [aria-label="Back to top"],
body.egh-iphone-mockup-page [aria-label="Scroll to top"],
body.egh-iphone-mockup-page [title="Back to top"],
body.egh-iphone-mockup-page [title="Scroll to top"],
body.egh-iphone-mockup-page [class*="scroll-to-top"],
body.egh-iphone-mockup-page [class*="back-to-top"] {
    display: none !important;
}

.egh-iphone-mockup-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.egh-iphone-mockup-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1;
    color: #202124;
    font-weight: 600;
}

.egh-iphone-mockup-toolbar input[type="url"],
.egh-iphone-mockup-toolbar select,
.egh-iphone-mockup-toolbar button {
    height: 34px;
    border-radius: 8px;
    border: 1px solid #c8ced5;
    font-size: 13px;
}

.egh-iphone-mockup-toolbar input[type="url"],
.egh-iphone-mockup-toolbar select {
    min-width: 240px;
    padding: 0 8px;
    background: #ffffff;
}

.egh-iphone-mockup-toolbar input[type="url"] {
    width: min(360px, 42vw);
}

.egh-iphone-mockup-toolbar button {
    padding: 0 12px;
    background: #ffffff;
    color: #1f2933;
    font-weight: 600;
    cursor: pointer;
}

.egh-iphone-mockup-toolbar button:hover {
    background: #f1f5f9;
}

.egh-iphone-control-scale {
    width: 180px;
}

.egh-iphone-scale-value {
    min-width: 45px;
    text-align: right;
    font-family: Menlo, Consolas, monospace;
    font-size: 13px;
    color: #4a4a4a;
}

.egh-iphone-capture-status {
    font-size: 12px;
    color: #1f6f3f;
    min-width: 220px;
}

.egh-iphone-capture-status.is-error {
    color: #c22f2f;
}

.egh-iphone-mockup-workspace {
    width: 100%;
    min-height: 950px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 12px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--egh-iphone-bg, #f0f2f5);
    position: relative;
    overscroll-behavior: contain;
    isolation: isolate;
    scrollbar-color: var(--egh-scrollbar-thumb) var(--egh-scrollbar-track);
    scrollbar-width: thin;
}

.egh-iphone-mockup-workspace::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 220ms ease;
}

.egh-iphone-mockup-workspace[data-bg-preset="solid"]::before {
    background: transparent;
}

.egh-iphone-mockup-workspace[data-bg-preset="ocean"]::before {
    opacity: 1;
    background: linear-gradient(120deg, #0ea5e9, #22d3ee, #14b8a6, #0f766e);
}

.egh-iphone-mockup-workspace[data-bg-preset="sunset"]::before {
    opacity: 1;
    background: linear-gradient(125deg, #f43f5e, #fb7185, #f59e0b, #fde047);
}

.egh-iphone-mockup-workspace[data-bg-preset="mint"]::before {
    opacity: 1;
    background: linear-gradient(130deg, #34d399, #2dd4bf, #38bdf8, #86efac);
}

.egh-iphone-mockup-workspace[data-bg-preset="berry"]::before {
    opacity: 1;
    background: linear-gradient(135deg, #f472b6, #c084fc, #818cf8, #2dd4bf);
}

.egh-iphone-mockup-workspace[data-bg-preset="red"]::before {
    opacity: 1;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 22%),
        linear-gradient(130deg, #7f1d1d, #dc2626, #f97316, #fecaca);
}

.egh-iphone-mockup-workspace[data-bg-preset="violet"]::before {
    opacity: 1;
    background: linear-gradient(135deg, #312e81, #7c3aed, #ec4899, #fb7185);
}

.egh-iphone-mockup-workspace[data-bg-preset="lime"]::before {
    opacity: 1;
    background: linear-gradient(130deg, #14532d, #16a34a, #bef264, #67e8f9);
}

.egh-iphone-mockup-workspace[data-bg-preset="midnight"]::before {
    opacity: 1;
    background:
        radial-gradient(circle at 70% 20%, rgba(125, 211, 252, 0.42), transparent 24%),
        linear-gradient(135deg, #020617, #1e293b, #0f766e, #38bdf8);
}

.egh-iphone-mockup-workspace.egh-bg-rolling::before {
    opacity: 1;
    background-size: 220% 220%;
    animation: eghRollingGradient 28s ease-in-out infinite;
}

.egh-iphone-mockup-workspace > * {
    position: relative;
    z-index: 1;
}

.egh-iphone-mockup-wrapper {
    position: absolute;
    transform: scale(var(--egh-iphone-scale, 1));
    transform-origin: top left;
    left: 0;
    top: 0;
    z-index: 3;
    transition: none;
    will-change: left, top;
    opacity: 1;
}

.egh-iphone-mockup-workspace:fullscreen .egh-iphone-mockup-wrapper {
    transition:
        left 1450ms cubic-bezier(0.22, 1, 0.36, 1),
        top 1450ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 820ms ease;
}

.egh-iphone-mockup-workspace.egh-is-dragging-device .egh-iphone-mockup-wrapper {
    transition: none;
}

.egh-iphone {
    width: var(--egh-device-width, var(--egh-iphone-width, 390px));
    height: var(--egh-device-height, var(--egh-iphone-height, 844px));
    border: 14px solid #1c1c1c;
    border-radius: 50px;
    background: #000000;
    position: relative;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        inset 0 0 0 2px #555555,
        inset 0 0 0 6px #000000;
    display: flex;
    justify-content: center;
}

.egh-iphone__btn-silent {
    position: absolute;
    left: -17px;
    top: 110px;
    width: 3px;
    height: 30px;
    background: #1c1c1c;
    border-radius: 2px 0 0 2px;
}

.egh-iphone__btn-vol-up {
    position: absolute;
    left: -17px;
    top: 160px;
    width: 3px;
    height: 60px;
    background: #1c1c1c;
    border-radius: 2px 0 0 2px;
}

.egh-iphone__btn-vol-down {
    position: absolute;
    left: -17px;
    top: 235px;
    width: 3px;
    height: 60px;
    background: #1c1c1c;
    border-radius: 2px 0 0 2px;
}

.egh-iphone__btn-power {
    position: absolute;
    right: -17px;
    top: 200px;
    width: 3px;
    height: 90px;
    background: #1c1c1c;
    border-radius: 0 2px 2px 0;
}

.egh-device--ipad-landscape {
    border-radius: 36px;
}

.egh-device--ipad-landscape .egh-iphone__btn-silent,
.egh-device--ipad-landscape .egh-iphone__btn-vol-up,
.egh-device--ipad-landscape .egh-iphone__btn-vol-down,
.egh-device--ipad-landscape .egh-iphone__btn-power {
    display: none;
}

.egh-iphone__frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 36px;
    background: #ffffff;
    z-index: 1;
    overscroll-behavior: contain;
}

.egh-snip-frame {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 0;
    height: 0;
    border: 2px dashed #ff2b6a;
    border-radius: 6px;
    background: rgba(255, 43, 106, 0.06);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.08);
    cursor: move;
    display: none;
    z-index: 5;
    touch-action: none;
}

.egh-iphone-mockup-shell.egh-device-drag-mode .egh-iphone-mockup-wrapper {
    cursor: grab;
}

.egh-iphone-mockup-shell.egh-device-drag-mode .egh-iphone-mockup-wrapper:active {
    cursor: grabbing;
}

.egh-iphone-mockup-shell.egh-device-drag-mode .egh-iphone__frame {
    pointer-events: none;
}

.egh-snip-frame.is-visible {
    display: block;
}

.egh-demo-site-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: 80%;
    height: 100%;
    border: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-18px);
    color-scheme: dark;
    scrollbar-color: var(--egh-scrollbar-thumb) var(--egh-scrollbar-track);
    scrollbar-width: thin;
    transition:
        opacity 700ms ease,
        width 1450ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
}

.egh-iphone-mockup-workspace[data-demo-layout="split"],
.egh-iphone-mockup-workspace[data-demo-layout="web"] {
    background: #0b0f14;
}

.egh-iphone-mockup-workspace[data-demo-layout="split"]::before,
.egh-iphone-mockup-workspace[data-demo-layout="web"]::before {
    opacity: 0;
}

.egh-iphone-mockup-workspace[data-demo-layout="split"] .egh-demo-site-panel,
.egh-iphone-mockup-workspace[data-demo-layout="web"] .egh-demo-site-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.egh-iphone-mockup-workspace[data-demo-layout="web"] .egh-demo-site-panel {
    width: 100%;
}

.egh-iphone-mockup-workspace[data-demo-layout="web"] .egh-iphone-mockup-wrapper {
    opacity: 0;
    pointer-events: none;
}

.egh-snip-frame::before,
.egh-snip-frame::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #ff2b6a;
    background: #ffffff;
}

.egh-snip-frame::before {
    left: -9px;
    top: -9px;
}

.egh-snip-frame::after {
    right: -9px;
    bottom: -9px;
}

.egh-snip-frame__label {
    position: absolute;
    left: 6px;
    top: -26px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #a0003d;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ff9ab9;
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
}

.egh-webcam-bubble {
    --egh-webcam-size: clamp(260px, 26vw, 420px);
    position: absolute;
    top: 50%;
    width: var(--egh-webcam-size);
    aspect-ratio: 1;
    border: 7px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.28), transparent 28%),
        rgba(15, 23, 42, 0.72);
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(15, 23, 42, 0.1);
    filter: blur(8px);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-50%) scale(0.64);
    transition:
        opacity 520ms ease,
        filter 760ms ease,
        transform 920ms cubic-bezier(0.18, 1.28, 0.32, 1),
        top 2200ms cubic-bezier(0.22, 1, 0.36, 1),
        width 2200ms cubic-bezier(0.22, 1, 0.36, 1),
        left 2200ms cubic-bezier(0.22, 1, 0.36, 1),
        right 2200ms cubic-bezier(0.22, 1, 0.36, 1),
        border-width 2200ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
}

.egh-webcam-bubble__video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scaleX(-1);
}

.egh-iphone-mockup-workspace[data-webcam-visible="true"] .egh-webcam-bubble {
    filter: blur(0);
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.egh-iphone-mockup-workspace:fullscreen[data-webcam-align="left"] .egh-webcam-bubble {
    left: auto;
    right: clamp(110px, 16vw, 290px);
}

.egh-iphone-mockup-workspace:fullscreen[data-webcam-align="right"] .egh-webcam-bubble {
    left: clamp(110px, 16vw, 290px);
    right: auto;
}

.egh-iphone-mockup-workspace[data-webcam-align="split"] .egh-webcam-bubble {
    --egh-webcam-size: clamp(118px, 11vw, 190px);
    left: clamp(20px, 2.2vw, 42px);
    right: auto;
    top: calc(100% - var(--egh-webcam-size) - clamp(20px, 2.4vw, 46px));
    border-width: 5px;
    transform: translateY(0) scale(1);
}

@keyframes eghRollingGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.egh-iphone-align-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.egh-iphone-align-btn {
    min-width: 92px;
}

.egh-iphone-toggle-fullscreen {
    background: #e8f1ff;
    border-color: #8db7ff;
}

.egh-iphone-toggle-fullscreen:hover {
    background: #dbeafe;
}

.egh-iphone-mockup-workspace:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    padding: 20px;
}

@media (max-width: 640px) {
    .egh-iphone-mockup-workspace {
        justify-content: center;
    }
}
