/* Override painting tool global styles for integration */

/* Reset body and html to allow normal page scrolling */
html, body {
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    overflow-y: auto !important;
}

/* Scope painting tool container */
#painting-tool-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 2rem;
}

/* Make app-container fit within the page layout */
#painting-tool-container .app-container {
    width: 100% !important;
    height: auto !important;
    min-height: 600px;
    position: relative !important;
}

/* Adjust step containers */
#painting-tool-container .step {
    width: 100%;
    height: auto;
    min-height: 500px;
}

/* Fix panel sizing */
#painting-tool-container .panel {
    max-width: 100%;
    margin: 0 auto;
}

/* When in full painting mode (step 4), go fullscreen */
body.painting-active {
    overflow: hidden !important;
}

body.painting-active #painting-tool-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    z-index: 9999;
    margin: 0;
}

body.painting-active #painting-tool-container .app-container {
    width: 100vw !important;
    height: 100vh !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #painting-tool-container {
        padding: 0;
    }

    #painting-tool-container .app-container {
        border-radius: 0;
    }
}
