/* Universal Room Planner - Core Structure */
.urp-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    font-family: inherit;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.urp-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.urp-sidebar h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: inherit;
    font-weight: 700;
}

.urp-sidebar label {
    display: block;
    font-size: 12px;
    margin-bottom: 3px;
    font-weight: 600;
}

.urp-sidebar input[type="text"],
.urp-sidebar input[type="number"],
.urp-sidebar input[type="email"],
.urp-sidebar input[type="tel"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.urp-main-area {
    flex-grow: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

/* MOBILE FIX: Perfect square scaling & Touch override */
.urp-canvas-wrapper {
    border: 1px solid #ccc;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1; 
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    touch-action: none; /* Stops iOS from scrolling the page when interacting with canvas */
}

.urp-canvas-wrapper .canvas-container {
    width: 100% !important;
    height: 100% !important;
}

.urp-canvas-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* CAMERA UI CONTROLS */
.urp-zoom-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.urp-zoom-btn {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    color: #444;
    transition: background 0.2s;
    user-select: none;
}

.urp-zoom-btn:hover, .urp-zoom-btn:active {
    background: #f0f0f0;
}

.urp-bottom-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Button Formatting */
.urp-custom-btn {
    display: block;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease-in-out;
    border: none;
    box-sizing: border-box;
}

.urp-custom-btn.delete-btn {
    background-color: #cc0000 !important;
    color: #ffffff !important;
}

.urp-custom-btn.delete-btn:hover {
    background-color: #a30000 !important;
}

/* Results Panel & Lists */
.results-panel {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow-y: auto;
    background: #fcfcfc;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.product-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 1.4;
}

.product-item:last-child {
    border-bottom: none;
}

.product-item:hover {
    background: #f0f0f0;
}

.product-sku {
    background: #eee;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    color: #555;
}

.shopping-list-item.active-item {
    background: #f0f8ff;
    border-left: 3px solid #000;
}

.shopping-total-box {
    display: flex;
    justify-content: space-between;
    padding: 15px 10px;
    font-weight: bold;
    border-top: 2px solid #ddd;
    background: #f9f9f9;
    border-radius: 0 0 4px 4px;
}

hr {
    border: 0;
    border-top: 1px dashed #ddd;
    margin: 20px 0;
}

/* Lead Capture Modal */
.urp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.urp-modal {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.urp-modal h3 {
    margin-top: 0;
    color: #333;
}

.urp-modal p {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.urp-modal label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.urp-modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.urp-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.urp-close-modal:hover {
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .urp-container {
        flex-wrap: wrap; 
    }
}

@media (max-width: 850px) {
    .urp-container {
        flex-direction: column;
    }
    .urp-sidebar, .urp-main-area {
        width: 100%;
    }
}