/* --- Flexbox Layout --- */
.main-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start; /* Changed from center to allow different heights */
    width: 100%;
    min-height: 700px;
    padding: 60px 0;
    gap: 60px;
}

.left-container {
    width: 450px; /* Slightly wider for form inputs */
    display: flex;
    flex-direction: column;
}

.right-container {
    width: 600px;
    height: 600px;
    position: sticky; /* Keeps viewer in view while scrolling form */
    top: 100px;
}

/* --- Viewer Box --- */
#viewer {
    border: 1px solid #e2e8f0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%); /* Slight gradient for 3D feel */
    border-radius: 16px;
    position: relative; 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
}

/* Placeholder */
#viewer-placeholder {
    position: absolute; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    text-align: center;
    color: #94a3b8;
    z-index: 10;
    pointer-events: none;
}
#viewer-placeholder .icon { font-size: 3rem; margin-bottom: 10px; opacity: 0.5; }
#viewer-placeholder h3 { margin: 0; font-size: 1.2rem; color: var(--navy); font-weight: 600; }
#viewer-placeholder p { margin: 5px 0 0 0; font-size: 0.9rem; }

/* --- Form & Configuration Styling --- */
.section h2 { margin: 0; font-size: 1.1rem; color: var(--navy); }

/* The Grid for inputs (2 columns) */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-left: 2px;
}

/* Input & Select Styling */
.form-control {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-family: "Poppins", sans-serif;
    font-size: 0.9rem;
    color: var(--navy);
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 122, 77, 0.15);
}

textarea.form-control {
    resize: vertical;
}

/* File Input Styling */
input[type="file"] {
    padding: 8px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    background: #f8fafc;
}
input[type="file"]:hover { border-color: var(--orange); }

/* Checkbox Row */
.form-row-full {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(24, 49, 73, 0.03);
    border-radius: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-wrapper label {
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* --- Quote Result Box --- */
.quote-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(24, 49, 73, 0.08);
    text-align: left;
}

.quote-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.quote-grid {
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 15px 0;
    margin-bottom: 20px;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-label { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.quote-value.highlight { color: var(--orange); font-size: 1.8rem; font-weight: 700; }
.small { font-size: 0.75rem; color: #94a3b8; line-height: 1.5; margin-top: 10px; }

/* Responsive */
@media (max-width: 1100px) {
    .main-container { flex-direction: column; align-items: center; height: auto; }
    .right-container { 
        width: 90%; 
        height: 400px; 
        position: relative; 
        top: 0; 
    }
    .left-container { width: 90%; }
}