/* Chemistry layout overrides */

main.chemistry-container {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: #f8fafc; /* Light gray background for better visibility */
    min-height: 100vh;
}

.chemistry-container .main-content-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem);
    box-sizing: border-box;
}

.chemistry-container .visualization-area {
    width: min(96vw, 1280px);
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 2vw, 2.75rem);
}

/* Unified Plot Container Styles */

.unified-plot-card {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95); /* Light background with slight transparency */
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.unified-plot-card .plot-container {
    min-height: clamp(500px, 70vh, 800px);
    background: linear-gradient(135deg, rgba(127, 93, 255, 0.03), rgba(148, 72, 201, 0.03));
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    width: 100%;
}

#main-plot {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .unified-plot-card {
        margin: 1.5rem;
        padding: 1rem;
    }

    .unified-plot-card .plot-container {
        min-height: clamp(400px, 60vh, 600px);
    }
}

@media (max-width: 768px) {
    .unified-plot-card {
        margin: 1rem;
    }

    .unified-plot-card .plot-container {
        min-height: clamp(300px, 50vh, 500px);
    }
}

/* Plot Container Loading State */
.unified-plot-card .plot-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.unified-plot-card .plot-container.loading::after {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 11;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Control Panel Layouts */
.visualization-panel {
    margin: 1rem 0;
    background: transparent;
}

.control-inputs {
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Common Button Styles */
.button-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.button-group button {
    min-width: 100px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn {
    background: #7f5dff;
    color: white;
}

.primary-btn:hover {
    background: #6a4adb;
}

.clear-btn {
    background: #e2e8f0;
    color: #475569;
}

.clear-btn:hover {
    background: #cbd5e1;
}