// Visual Builder Layout Styles
// Using direct color values

html.h-100,
body.vb-body {
    height: 100vh !important;
    overflow: hidden;
}

.vb-container {
    height: calc(100vh - 60px);
}

.vb-header {
    height: 60px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;

    .badge {
        animation: pulse 2s infinite;
    }
}

.vb-sidebar {
    width: 400px;
    max-width: 40%;
    min-width: 320px;
    position: relative;
}

.vb-preview {
    background: #f8f9fa;
    padding: 1.5rem;

    [data-bs-theme="dark"] & {
        background: #0f172a;
    }

    .vb-preview-frame-container {
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;

        iframe {
            width: 100%;
            height: 100%;
        }

        &.device-desktop {
            width: 100%;
            height: 100%;
        }

        &.device-tablet {
            width: 768px;
            height: 1024px;
            max-width: calc(100% - 3rem);
            max-height: calc(100% - 3rem);
            box-shadow: 0 0 0 10px #dee2e6;
            border-radius: 0.375rem;

            [data-bs-theme="dark"] & {
                box-shadow: 0 0 0 10px #475569;
            }

            iframe {
                border-radius: 0.375rem;
            }
        }

        &.device-mobile {
            width: 375px;
            height: 667px;
            max-width: calc(100% - 3rem);
            max-height: calc(100% - 3rem);
            box-shadow: 0 0 0 10px #dee2e6;
            border-radius: 0.375rem;

            [data-bs-theme="dark"] & {
                box-shadow: 0 0 0 10px #475569;
            }

            iframe {
                border-radius: 0.375rem;
            }
        }
    }

    &.loaded {
        .vb-preview-loading {
            display: none !important;
        }

        .vb-preview-frame-container {
            display: flex !important;
        }
    }

    &.error {
        .vb-preview-loading {
            display: none !important;
        }

        .vb-preview-error {
            display: block !important;
        }
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

// Responsive
@media (max-width: 1024px) {
    .vb-sidebar {
        width: 320px;
        max-width: 50%;
    }
}
