/* Undig Virtual Booth (v2.4.9.1) - Immersive Studio Camera & Mobile-First */

.undig-virtual-booth-wrapper,
.undig-virtual-booth-wrapper *,
.undig-booth-modal-backdrop,
.undig-booth-modal-backdrop * {
    -webkit-tap-highlight-color: transparent !important;
}

.undig-virtual-booth-wrapper {
    width: 100%;
    box-sizing: border-box;
}

/* Card Intro Container */
.undig-booth-card {
    box-sizing: border-box;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.undig-booth-card.undig-booth-boxed {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.05);
}

.undig-booth-card.undig-booth-flat {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.undig-booth-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.undig-booth-desc {
    font-size: 14.5px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 22px;
}

.undig-booth-banner {
    margin: 0 0 22px 0;
    display: inline-block;
    max-width: 100%;
}

.undig-booth-banner img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0 auto;
}

.undig-booth-action {
    display: block;
    width: 100%;
}

.undig-booth-action-inline {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.undig-booth-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #6486db;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    min-height: 48px;
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.undig-booth-trigger-btn:hover {
    background: #5071c7;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(100, 134, 219, 0.32);
}

.undig-booth-trigger-btn:active {
    transform: translateY(0);
}

.undig-booth-trigger-btn .undig-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15em;
    line-height: 1;
}

.undig-booth-trigger-btn .undig-btn-icon svg {
    width: 1.15em;
    height: 1.15em;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

.undig-booth-trigger-btn .undig-btn-icon i {
    font-size: 1.15em;
    display: inline-block;
    vertical-align: middle;
}

/* Floating Trigger Button */
.undig-booth-floating-wrap {
    position: fixed;
    z-index: 999990;
    pointer-events: auto;
}

.undig-booth-floating-wrap.pos-bottom-right {
    bottom: var(--float-offset-y, 24px);
    right: var(--float-offset-x, 24px);
}

.undig-booth-floating-wrap.pos-bottom-left {
    bottom: var(--float-offset-y, 24px);
    left: var(--float-offset-x, 24px);
}

.undig-booth-floating-wrap.pos-middle-right {
    top: 50%;
    right: var(--float-offset-x, 24px);
    transform: translateY(-50%);
}

.undig-booth-floating-wrap.pos-middle-left {
    top: 50%;
    left: var(--float-offset-x, 24px);
    transform: translateY(-50%);
}

.undig-booth-floating-wrap.pos-top-right {
    top: var(--float-offset-y, 24px);
    right: var(--float-offset-x, 24px);
}

.undig-booth-floating-wrap.pos-top-left {
    top: var(--float-offset-y, 24px);
    left: var(--float-offset-x, 24px);
}

.undig-booth-floating-btn {
    position: relative;
    width: var(--floating-btn-size, 56px);
    height: var(--floating-btn-size, 56px);
    min-height: 0;
    min-width: 0;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.undig-booth-floating-btn .undig-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.undig-booth-floating-btn .undig-btn-icon svg {
    width: clamp(12px, calc(var(--floating-btn-size, 56px) * 0.45), 32px);
    height: clamp(12px, calc(var(--floating-btn-size, 56px) * 0.45), 32px);
}

/* Animasi Denyut Halus (Pulse) */
.undig-booth-floating-wrap.has-pulse .undig-booth-floating-btn::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.6;
    animation: undigBoothPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

@keyframes undigBoothPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* Tooltip Tombol Melayang */
.undig-booth-floating-tooltip {
    position: absolute;
    background: rgba(14, 16, 21, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.pos-bottom-right .undig-booth-floating-tooltip,
.pos-top-right .undig-booth-floating-tooltip,
.pos-middle-right .undig-booth-floating-tooltip {
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
}

.pos-bottom-left .undig-booth-floating-tooltip,
.pos-top-left .undig-booth-floating-tooltip,
.pos-middle-left .undig-booth-floating-tooltip {
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}

.undig-booth-floating-btn:hover .undig-booth-floating-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Body & HTML Scroll Lock saat modal booth aktif */
body.undig-booth-modal-open {
    overflow: hidden !important;
    touch-action: none !important;
    overscroll-behavior: contain !important;
}

html.undig-booth-modal-open {
    overflow: hidden !important;
}

/* Modal Backdrop & Container (Immersive Fullscreen) */
.undig-booth-modal-backdrop {
    --booth-backdrop: rgba(0, 0, 0, 0.94);
    --booth-window-bg: #0e1015;
    --booth-accent: #e2b774;
    --booth-text: #ffffff;
    --booth-border: rgba(255, 255, 255, 0.08);
    --booth-radius: 24px;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    height: var(--booth-vh, 100dvh);
    max-height: var(--booth-vh, 100dvh);
    background: var(--booth-backdrop);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    animation: undigBoothFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes undigBoothFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.undig-booth-modal-window {
    background: var(--booth-window-bg);
    color: var(--booth-text);
    border-radius: var(--booth-radius);
    border: 1px solid var(--booth-border);
    width: 100%;
    max-width: 440px;
    height: 100%;
    max-height: 94vh;
    max-height: var(--booth-vh, 94vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    box-sizing: border-box;
}

/* Modal Header */
.undig-booth-header {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    gap: 12px;
}

.undig-booth-header-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.undig-booth-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.undig-header-icon {
    color: var(--booth-accent, #e2b774);
    flex-shrink: 0;
}

.undig-booth-header-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.undig-booth-close-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    position: relative;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.undig-booth-close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
}

.undig-booth-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
    transform: scale(1.05);
}

/* Modal Body (Expands to Fill Screen) */
.undig-booth-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

/* Camera Viewport (Strict 9:16 Aspect Ratio, Never Gepeng) */
.undig-booth-viewport {
    position: relative;
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    background: #020617;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    flex-shrink: 1;
}

.undig-booth-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
}

.undig-booth-video.facing-env {
    transform: none;
}

/* Multi-Cell Live Viewport Grid (Instagram Layout Style) */
.undig-booth-grid-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    z-index: 2;
    background: #000;
}

.undig-booth-grid-container.is-grid-single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
}

.undig-booth-grid-container.is-grid-grid_2x2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    background: rgba(255, 255, 255, 0.15);
}

.undig-booth-grid-container.is-grid-strip_3 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 3px;
    background: rgba(255, 255, 255, 0.15);
}

.undig-booth-grid-container.is-grid-strip_2 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    background: rgba(255, 255, 255, 0.15);
}

.undig-booth-grid-container.is-grid-polaroid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 12px 12px 48px 12px;
    background: #ffffff;
    box-sizing: border-box;
}

.undig-booth-slot-cell {
    position: relative;
    width: 100%;
    height: 100%;
    background: #070c18;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease;
}

.undig-booth-slot-cell.is-active-slot {
    box-shadow: inset 0 0 0 2.5px var(--booth-accent, #6486db);
    z-index: 4;
}

.undig-booth-slot-cell.is-active-slot::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--booth-accent, #6486db);
    pointer-events: none;
    animation: undigCellPulse 1.4s infinite ease-in-out;
}

@keyframes undigCellPulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.undig-booth-cell-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 600;
}

.undig-booth-cell-placeholder .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.undig-booth-cell-freeze {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: undigFreezePop 0.18s ease-out;
}

@keyframes undigFreezePop {
    from { opacity: 0.7; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
}

/* Frame Overlay Image (Live Preview) */
.undig-booth-frame-overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 6;
    display: block;
}

/* Text Overlay Canvas (Live Preview - Event Text & Branding) */
.undig-booth-text-overlay-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 7;
    display: block;
}

/* Flash Overlay */
.undig-booth-flash-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 12;
}

.undig-booth-flash-overlay.do-flash {
    animation: undigShutterFlash 0.3s ease-out;
}

@keyframes undigShutterFlash {
    0% { opacity: 0.96; }
    100% { opacity: 0; }
}

/* Live Countdown Ring */
.undig-booth-countdown {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.undig-booth-countdown-inner {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    font-weight: 800;
    color: #ffffff;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: undigCountPulse 0.95s infinite ease;
}

@keyframes undigCountPulse {
    0% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* Slot Progress Dots */
.undig-booth-slot-progress {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 8;
}

.undig-booth-slot-indicator {
    flex: 1;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: background 0.2s ease;
}

.undig-booth-slot-indicator.is-done {
    background: #10b981;
}

.undig-booth-slot-indicator.is-active {
    background: var(--booth-accent, #e2b774);
}

/* Camera Flip Button with Authentic Icon */
.undig-booth-camera-flip-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.undig-booth-camera-flip-btn:hover {
    background: rgba(226, 183, 116, 0.25);
    border-color: var(--booth-accent, #e2b774);
    transform: scale(1.08);
}

.undig-booth-camera-flip-btn svg {
    width: 19px;
    height: 19px;
    display: block;
}

/* Floating Filter Intensity Slider */
.undig-booth-filter-slider-wrap {
    position: absolute;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(14, 16, 21, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    padding: 7px 16px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 26;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: undigSliderPop 0.18s ease-out;
    width: min(280px, calc(100% - 40px));
}

@keyframes undigSliderPop {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.undig-slider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--booth-accent, #e2b774);
    flex-shrink: 0;
}

.undig-booth-filter-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    margin: 0;
    cursor: pointer;
}

.undig-booth-filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--booth-accent, #e2b774);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.undig-booth-filter-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.undig-booth-filter-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--booth-accent, #e2b774);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.undig-slider-val {
    font-size: 11.5px;
    font-weight: 600;
    color: #ffffff;
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Floating Popover Drawer (Tray Pilihan Muncul di Bawah - Frosted Glassmorphism) */
.undig-booth-popover-tray {
    position: absolute;
    bottom: 12px;
    left: 10px;
    right: 10px;
    background: rgba(14, 16, 21, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 10px 12px;
    display: none;
    z-index: 25;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: undigDrawerPop 0.18s ease-out;
}

.undig-booth-popover-inner {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 10px;
    align-items: center;
    scrollbar-width: none;
}

.undig-booth-popover-inner::-webkit-scrollbar {
    display: none;
}

@keyframes undigDrawerPop {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Miniature Items in Popover */
.undig-booth-drawer-item {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.15s ease;
    flex-shrink: 0;
    min-width: 62px;
}

.undig-booth-drawer-item:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.undig-booth-drawer-item.is-active {
    background: rgba(226, 183, 116, 0.18);
    color: #ffffff;
    border-color: var(--booth-accent, #e2b774);
    box-shadow: 0 0 0 1px var(--booth-accent, #e2b774);
}

/* Miniature Previews */
.mini-grid-icon {
    width: 22px;
    height: 30px;
    display: block;
    color: currentColor;
}

.mini-frame-thumb {
    width: 28px;
    height: 38px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-frame-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-filter-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: block;
}

/* Footer Control Center */
.undig-booth-footer {
    padding: 8px 16px 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* Category Icons Toolbar (Vertical Icon + Label Layout) */
.undig-booth-category-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 2px 0 6px 0;
}

.undig-booth-cat-btn {
    background: transparent;
    border: none;
    color: #8e95a5;
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
    min-height: 48px;
    min-width: 52px;
    position: relative;
}

.undig-booth-cat-btn svg {
    display: block;
    transition: color 0.15s ease;
}

.undig-booth-cat-btn span {
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.undig-booth-cat-btn:hover {
    color: #f1f5f9;
}

.undig-booth-cat-btn.is-active {
    color: #ffffff;
}

.undig-booth-cat-btn.is-active svg {
    color: var(--booth-accent, #e2b774);
}

.undig-booth-cat-btn.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2.5px;
    background: var(--booth-accent, #e2b774);
    border-radius: 2px;
}

/* Controls Dock (Gallery + Classic Shutter + Flip Camera) */
.undig-booth-controls-dock {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    width: 100%;
    padding: 4px 6px 2px 6px;
    box-sizing: border-box;
}

.undig-booth-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.undig-booth-dock-item.is-left {
    justify-self: start;
    padding-left: 6px;
}

.undig-booth-dock-item.is-center {
    justify-self: center;
}

.undig-booth-dock-item.is-right {
    justify-self: end;
    padding-right: 6px;
}

.undig-booth-gallery-btn,
.undig-booth-dock-flip-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    border-radius: 14px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 56px;
    min-height: 48px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.undig-booth-gallery-btn span,
.undig-booth-dock-flip-btn span {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1;
}

.undig-booth-gallery-btn:hover,
.undig-booth-dock-flip-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.undig-booth-gallery-btn:hover span,
.undig-booth-dock-flip-btn:hover span {
    color: #ffffff;
}

/* Classic Shutter Button */
.undig-booth-shutter-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: transparent;
    border: 3.5px solid #ffffff;
    padding: 4.5px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s ease, opacity 0.15s ease;
}

.undig-booth-shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.35);
    transition: transform 0.12s ease, background 0.12s ease;
}

.undig-booth-shutter-btn:hover .undig-booth-shutter-inner {
    background: #f1f5f9;
    transform: scale(0.94);
}

.undig-booth-shutter-btn:active {
    transform: scale(0.93);
}

.undig-booth-shutter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.undig-booth-shutter-label {
    font-size: 11.5px;
    font-weight: 500;
    color: #cbd5e1;
    margin-top: 6px;
    letter-spacing: 0.2px;
    text-align: center;
}

.undig-booth-file-input {
    display: none;
}

/* Processing / Loading View (antislop-ui & antislop-human) */
.undig-booth-processing-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 40;
    box-sizing: border-box;
    padding: 20px;
    animation: undigFadeIn 0.2s ease-out;
}

.undig-booth-processing-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-sizing: border-box;
}

.undig-booth-spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--booth-accent, #e2b774);
    border-radius: 50%;
    animation: undigBoothSpin 0.8s linear infinite;
    box-sizing: border-box;
}

.undig-booth-processing-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #f1f5f9;
    margin: 0;
}

@keyframes undigBoothSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes undigFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Result Canvas View (Large Preview & Compact Actions) */
.undig-booth-result-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-height: 100%;
    width: 100%;
    padding: 6px 12px 12px 12px;
    box-sizing: border-box;
    gap: 8px;
    overflow: hidden;
    position: relative;
}

.undig-booth-result-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
}

.undig-booth-result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    flex-shrink: 0;
}

.undig-result-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--booth-text, #f8fafc);
    letter-spacing: 0.5px;
}

.undig-result-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--booth-text, #f8fafc);
    cursor: pointer;
    transition: background 0.15s ease;
}

.undig-result-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.undig-booth-result-canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.undig-booth-result-canvas-wrap canvas {
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    display: block;
    flex-shrink: 1;
}

/* Ergonomic Circular Actions (Ala Gambar 1 & 2) */
.undig-booth-result-actions {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 24px;
    width: 100%;
    padding: 4px 12px 2px 12px;
    box-sizing: border-box;
    flex-shrink: 0;
    z-index: 5;
}

.undig-booth-action-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.undig-booth-circle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.undig-booth-circle-btn svg {
    display: block;
}

.undig-booth-circle-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.undig-booth-circle-btn:active {
    transform: translateY(0);
}

.undig-booth-circle-btn.is-loading {
    cursor: wait;
    pointer-events: none;
    opacity: 0.92;
}

.undig-booth-circle-btn.is-loading svg {
    display: none !important;
}

.undig-booth-circle-btn.is-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: undigBoothSpin 0.7s linear infinite;
    display: block;
    box-sizing: border-box;
}

.undig-booth-action-col.is-primary .undig-booth-circle-btn.is-loading::after {
    border-color: rgba(14, 16, 21, 0.25);
    border-top-color: #0e1015;
}

/* Download: Center Prominent Button */
.undig-booth-action-col.is-primary .undig-booth-circle-btn {
    width: 66px;
    height: 66px;
    background: var(--booth-accent, #e2b774);
    border: none;
    color: #0e1015;
    box-shadow: 0 8px 24px rgba(226, 183, 116, 0.35);
}

.undig-booth-action-col.is-primary .undig-booth-circle-btn:hover {
    background: #d4a762;
    box-shadow: 0 10px 28px rgba(226, 183, 116, 0.5);
    transform: translateY(-2px) scale(1.03);
}

.undig-booth-action-label {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.2px;
    text-align: center;
}

.undig-booth-action-label.is-primary {
    color: #ffffff;
    font-weight: 600;
}


/* Toast Message */
.undig-booth-toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    z-index: 10000001;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: undigToastSlide 0.2s ease-out;
}

@keyframes undigToastSlide {
    from { transform: translate(-50%, 15px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Elementor Editor Live Preview Wrapper */
.undig-booth-editor-preview-wrap {
    margin-top: 24px;
    padding: 16px;
    background: #090d16;
    border-radius: 18px;
    border: 2px dashed var(--booth-accent, #e2b774);
}

.undig-booth-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--booth-accent, #e2b774);
    background: rgba(226, 183, 116, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.undig-booth-editor-preview-window {
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    max-height: none;
}


/* Keyboard Accessibility (antislop-human & R-32 - High Contrast Focus Indicator) */
.undig-booth-trigger-btn:focus-visible,
.undig-booth-close-btn:focus-visible,
.undig-booth-cat-btn:focus-visible,
.undig-booth-drawer-item:focus-visible,
.undig-booth-circle-btn:focus-visible,
.undig-booth-gallery-btn:focus-visible,
.undig-booth-dock-flip-btn:focus-visible,
.undig-booth-camera-flip-btn:focus-visible,
.undig-booth-shutter-btn:focus-visible {
    outline: 2px solid var(--booth-accent, #e2b774);
    outline-offset: 2px;
}

/* Mobile Responsiveness (antislop-layoutmobile - Immersive Fullscreen & Safe Area) */
@media (max-width: 767.98px) {
    .undig-booth-modal-backdrop {
        padding: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        height: var(--booth-vh, 100dvh) !important;
        max-height: var(--booth-vh, 100dvh) !important;
        overflow: hidden !important;
    }

    .undig-booth-modal-window {
        max-width: 100vw !important;
        width: 100vw !important;
        max-height: var(--booth-vh, 100dvh) !important;
        height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .undig-booth-header {
        padding: 8px 14px;
        gap: 8px;
    }

    .undig-booth-body {
        padding: 4px 8px;
    }

    .undig-booth-viewport {
        border-radius: 12px;
    }

    .undig-booth-footer {
        padding: 4px 10px max(10px, env(safe-area-inset-bottom, 10px)) 10px;
        gap: 4px;
    }

    .undig-booth-category-bar {
        gap: 20px;
        padding: 0;
    }

    .undig-booth-controls-dock {
        padding: 2px 4px 0 4px;
    }

    .undig-booth-result-view {
        padding: 4px 8px max(10px, env(safe-area-inset-bottom, 10px)) 8px;
        gap: 6px;
    }

    .undig-booth-result-actions {
        gap: 16px;
        padding: 2px 6px;
    }

    .undig-booth-circle-btn {
        width: 50px;
        height: 50px;
    }

    .undig-booth-action-col.is-primary .undig-booth-circle-btn {
        width: 60px;
        height: 60px;
    }

    .undig-booth-action-label {
        font-size: 11px;
    }

    .undig-booth-shutter-btn {
        width: 64px;
        height: 64px;
    }

    .undig-booth-card.undig-booth-boxed {
        padding: 24px 18px;
    }
}

/* Compact Mobile Height (Short Screens, URL Bars, Camera Permission Banners) */
@media (max-height: 620px) {
    .undig-booth-header {
        padding: 6px 12px;
    }

    .undig-booth-header-subtitle {
        display: none !important;
    }

    .undig-booth-footer {
        padding-top: 2px;
        gap: 2px;
    }

    .undig-booth-category-bar {
        padding: 0;
        gap: 16px;
    }

    .undig-booth-cat-btn {
        min-height: 40px;
        padding: 2px 6px;
    }

    .undig-booth-cat-btn span {
        font-size: 10px;
    }

    .undig-booth-controls-dock {
        padding: 0 4px;
    }

    .undig-booth-shutter-btn {
        width: 56px;
        height: 56px;
    }

    .undig-booth-shutter-label {
        display: none;
    }

    .undig-booth-result-view {
        gap: 4px;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
    }

    .undig-booth-circle-btn {
        width: 46px;
        height: 46px;
    }

    .undig-booth-action-col.is-primary .undig-booth-circle-btn {
        width: 54px;
        height: 54px;
    }
}

/* ==========================================================================
   LAYOUT: SOCIAL STORY / IMMERSIVE HUD (Instagram / TikTok Style)
   ========================================================================== */
.undig-booth-modal-backdrop.is-layout-social {
    padding: 0;
    background: #000000;
}

.undig-booth-modal-backdrop.is-layout-social .undig-booth-modal-window {
    max-width: 480px;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #000000;
    position: relative;
}

@media (min-width: 768px) {
    .undig-booth-modal-backdrop.is-layout-social {
        padding: 16px;
    }
    .undig-booth-modal-backdrop.is-layout-social .undig-booth-modal-window {
        height: 94vh;
        height: var(--booth-vh, 94vh);
        max-height: 880px;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
    }
}

.undig-booth-modal-backdrop.is-layout-social .undig-booth-body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* RATA ATAS! */
}

.undig-booth-modal-backdrop.is-layout-social .undig-booth-viewport {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
}


.is-layout-social .undig-booth-frame-overlay-img,
.is-layout-social .undig-booth-text-overlay-canvas {
    object-fit: fill;
}

.is-layout-social .undig-booth-camera-flip-btn {
    display: none;
}

.is-layout-social .undig-booth-hud-rail-btn.is-active::after {
    display: none;
}

/* Floating Top-Left Close Button */
.undig-booth-hud-btn.hud-close-btn {
    position: absolute;
    top: max(16px, env(safe-area-inset-top, 16px));
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(18, 22, 32, 0.84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 60;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.undig-booth-hud-btn.hud-close-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.undig-booth-hud-btn.hud-close-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
}

.undig-booth-hud-btn.hud-close-btn:active {
    transform: scale(0.92);
}

/* Floating Top-Right Tool Rail */
.undig-booth-hud-rail {
    position: absolute;
    top: max(16px, env(safe-area-inset-top, 16px));
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 60;
}

.undig-booth-hud-rail-btn {
    width: 50px;
    min-height: 56px;
    padding: 8px 4px;
    border-radius: 18px;
    background: rgba(18, 22, 32, 0.84);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.undig-booth-hud-rail-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.undig-booth-hud-rail-btn span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
    color: #f8fafc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.undig-booth-hud-rail-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

.undig-booth-hud-rail-btn.is-active {
    background: linear-gradient(135deg, #e2b774 0%, #c4974f 100%);
    border-color: #fef08a;
    color: #0f172a;
    box-shadow: 0 0 20px rgba(226, 183, 116, 0.65), 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: scale(1.06);
}

.undig-booth-hud-rail-btn.is-active svg {
    color: #0f172a;
    filter: none;
}

.undig-booth-hud-rail-btn.is-active span {
    color: #0f172a;
    font-weight: 800;
    text-shadow: none;
}

/* Floating Bottom HUD Container */
.undig-booth-hud-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 max(16px, env(safe-area-inset-bottom, 16px)) 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 50%, transparent 100%);
    pointer-events: none;
}

.undig-booth-hud-bottom > * {
    pointer-events: auto;
}

/* Filter Cluster: Active Title + Slider + Circular Swatches */
.undig-booth-filter-cluster {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.undig-booth-filter-active-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(14, 16, 21, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.undig-booth-filter-active-title .undig-filter-check {
    color: #10b981;
    font-size: 11px;
}

/* Filter Slider Wrap in Social Layout (Relative & Sleek, No Collision) */
.is-layout-social .undig-booth-filter-slider-wrap {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    animation: none;
    background: rgba(18, 22, 32, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 5px 14px;
    width: 210px;
    max-width: 80%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Filter Circular Swatches Scroll Row */
.undig-booth-filter-swatches-scroll {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 20px;
    box-sizing: border-box;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.undig-booth-filter-swatches-scroll::-webkit-scrollbar {
    display: none;
}

.mini-filter-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    scroll-snap-align: center;
}

.mini-filter-circle-bg {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

.mini-filter-circle:hover .mini-filter-circle-bg {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.85);
}

.mini-filter-circle.is-active .mini-filter-circle-bg {
    width: 40px;
    height: 40px;
    border: 3px solid #e2b774;
    box-shadow: 0 0 16px rgba(226, 183, 116, 0.7);
    transform: scale(1.08);
}

/* Minimalist Shutter Deck */
.undig-booth-shutter-deck {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 24px;
    box-sizing: border-box;
}

.undig-booth-hud-circle-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(18, 22, 32, 0.84);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.undig-booth-hud-circle-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.undig-booth-hud-circle-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

.undig-booth-hud-circle-btn:active {
    transform: scale(0.92);
}

.undig-deck-placeholder {
    width: 46px;
    height: 46px;
}

/* Big Social Shutter Button */
.is-layout-social .undig-booth-shutter-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.is-layout-social .undig-booth-shutter-btn {
    border: 4px solid #ffffff;
    padding: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(0, 0, 0, 0.3);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-layout-social .undig-booth-shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.18s ease;
}

.is-layout-social .undig-booth-shutter-btn:hover {
    transform: scale(1.05);
}

.is-layout-social .undig-booth-shutter-btn:active .undig-booth-shutter-inner {
    transform: scale(0.85);
    background: #e2b774;
}

@media (max-width: 767.98px) {
    .is-layout-social .undig-booth-shutter-btn {
        width: 64px;
        height: 64px;
    }
}

@media (max-height: 620px) {
    .is-layout-social .undig-booth-shutter-btn {
        width: 56px;
        height: 56px;
    }
}

/* Semi-transparent popover tray in Social layout */
.is-layout-social .undig-booth-popover-tray {
    position: absolute;
    bottom: 88px;
    left: 12px;
    right: 12px;
    background: rgba(18, 20, 26, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    z-index: 58;
}

/* Result View: Centered Framed Card */
.is-layout-social .undig-booth-result-view {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    z-index: 80;
    animation: undigBoothFadeIn 0.2s ease-out;
}

/* Floating Close Button: Selalu berada di pojok kanan atas layar hasil */
.undig-result-floating-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.undig-result-floating-close:hover {
    background: rgba(0, 0, 0, 0.88);
    transform: scale(1.08);
}

.undig-result-floating-close:focus-visible {
    outline: 2px solid var(--booth-accent, #e2b774);
    outline-offset: 2px;
}

/* Hilangkan redundansi tombol tutup di layar hasil: Tombol melayang hanya tampil di mobile, tombol kartu di desktop */
@media (min-width: 601px) {
    .undig-result-floating-close {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .undig-result-close-btn {
        display: none !important;
    }
    .undig-result-floating-close {
        display: flex !important;
    }
}

.is-layout-social .undig-booth-result-card {
    background: rgba(18, 22, 32, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 380px;
    height: auto;
    max-height: calc(var(--booth-vh, 100vh) - 24px);
    overflow: hidden;
    padding: 14px 14px 18px 14px;
    box-sizing: border-box;
    gap: 10px;
    animation: undigDrawerPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.is-layout-social .undig-booth-result-card-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    flex-shrink: 0;
}

.is-layout-social .undig-result-badge {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.is-layout-social .undig-result-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.is-layout-social .undig-result-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.06);
}

.is-layout-social .undig-booth-hud-btn:focus-visible,
.is-layout-social .undig-booth-hud-rail-btn:focus-visible,
.is-layout-social .undig-booth-hud-circle-btn:focus-visible,
.is-layout-social .undig-result-close-btn:focus-visible,
.is-layout-social .mini-filter-circle:focus-visible {
    outline: 2px solid var(--booth-accent, #e2b774);
    outline-offset: 2px;
}

.is-layout-social .undig-booth-result-canvas-wrap {
    flex: 1 1 0%;
    min-height: 0;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.is-layout-social .undig-booth-result-canvas-wrap canvas {
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.is-layout-social .undig-booth-result-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 4px 0 0 0;
    flex-shrink: 0;
    gap: 12px;
}

/* Kunci Interaksi Kontrol Saat Sesi Pemotretan / Countdown Berjalan */
.is-shooting .undig-booth-cat-btn,
.is-shooting .undig-booth-hud-btn,
.is-shooting .undig-booth-hud-circle-btn,
.is-shooting .mini-filter-circle,
.is-shooting .undig-booth-filter-slider,
.is-shooting [data-frame-idx],
.is-shooting [data-filter],
.is-shooting [data-grid] {
    pointer-events: none !important;
    opacity: 0.6;
    cursor: not-allowed;
}
