/* css/spanning-set.css */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f4f6f9;
    overflow-y: auto;
    overflow-x: hidden;
}

#app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

#controls {
    width: 320px;
    flex-shrink: 0;
    background: white;
    padding: 25px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 20;
    overflow-y: auto;
    box-sizing: border-box;
}

#controls::-webkit-scrollbar {
    width: 6px;
}

#controls::-webkit-scrollbar-track {
    background: transparent;
}

#controls::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: #999;
}

h2 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

h3 {
    font-size: 13px;
    margin: 12px 0 8px 0;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group {
    margin-bottom: 12px;
}

select {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: #fff;
}

.vector-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.vector-label {
    width: 30px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.coord-input {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
}

input[type="number"] {
    width: 45px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

span.axis-label {
    font-size: 10px;
    color: #999;
    margin-left: 2px;
    margin-right: 6px;
}

#status-box {
    margin-top: 15px;
    padding: 15px;
    background: #eef2f5;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    border-left: 4px solid #3498db;
}

.badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    font-size: 11px;
    margin-left: 4px;
}

.badge-green {
    background: #27ae60;
}

.badge-red {
    background: #c0392b;
}

.badge-blue {
    background: #2980b9;
}

/* Plot Area */
#plot {
    flex-grow: 1;
    position: relative;
    /* REQUIRED FOR ABSOLUTE CANVAS/SVG */
    min-height: 500px;
}

/* THE FIX */
#plot canvas,
#plot svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

@media (max-width: 900px) {
    #app-container {
        flex-direction: column;
    }

    #controls {
        width: 100%;
        min-height: auto;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    #plot {
        min-height: 60vh;
    }
}