/* Electric Field Simulation - CSS */

#electricFieldContainer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-family: 'Courier New', monospace;
}

.control-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.control-row:last-child {
    margin-bottom: 0;
}

.control-row label {
    min-width: auto;
    font-size: 11px;
    color: #555;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    margin-right: 2px;
    flex-shrink: 0;
}

.control-row input[type="range"],
.control-row input[type="number"],
.control-row select {
    flex: 0 1 auto;
    min-width: 60px;
    max-width: 120px;
    padding: 5px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.control-row input[type="range"] {
    height: 6px;
    -webkit-appearance: none;
    background: #ddd;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: background-color 0.2s;
    min-width: 80px;
}

.btn:hover:not(:disabled) {
    background-color: #45a049;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover:not(:disabled) {
    background-color: #da190b;
}

.control-row span {
    min-width: 35px;
    font-size: 11px;
    color: #333;
    font-family: 'Courier New', monospace;
    text-align: left;
    margin-left: 2px;
    flex-shrink: 0;
}

.simulation-area {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.simulation-title {
    color: #2e7d32;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.electricfield-canvas {
    width: 100%;
    height: 600px;
    display: block;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fafafa;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none;
}

.toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 15px;
}

.charge-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.charge-button:hover {
    border-color: #4CAF50;
    background-color: #f0f8f0;
}

.charge-button.dragging {
    opacity: 0.5;
}

.charge-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.charge-preview.positive {
    background-color: #ff4444;
    color: white;
}

.charge-preview.negative {
    background-color: #4444ff;
    color: white;
}

.charge-preview.test {
    background-color: #ffd700;
    color: #000;
    font-size: 12px;
    font-weight: bold;
}

.charge-button-label {
    font-size: 10px;
    color: #555;
    font-family: 'Courier New', monospace;
}

.info-display {
    background-color: #e8f5e9;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    color: #2e7d32;
    font-family: 'Courier New', monospace;
    margin-top: 10px;
}

/* Custom Color Palette */
.color-palette {
    display: flex;
    gap: 8px;
    margin-left: 10px;
    align-items: center;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.1s, border-color 0.1s;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: #333;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1); /* Double ring effect */
}

